|
@@ -1203,12 +1203,6 @@ function change_system_name {
|
1203
|
1203
|
}
|
1204
|
1204
|
|
1205
|
1205
|
function set_dynamic_IP {
|
1206
|
|
- NETWORK_IS_STATIC=0
|
1207
|
|
- read_config_param "NETWORK_IS_STATIC"
|
1208
|
|
- if [ ${NETWORK_IS_STATIC} -eq 0 ]; then
|
1209
|
|
- return
|
1210
|
|
- fi
|
1211
|
|
-
|
1212
|
1206
|
revert_to_dynamic=
|
1213
|
1207
|
dialog --title $"Return to using a dynamic IP address" \
|
1214
|
1208
|
--backtitle $"Freedombone Control Panel" \
|
|
@@ -1293,8 +1287,22 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_
|
1293
|
1287
|
|
1294
|
1288
|
email_change_relay "$NEW_STATIC_IP"
|
1295
|
1289
|
|
1296
|
|
- if [[ $(config_param_exists "WIFI_INTERFACE") == "0" ]]; then
|
|
1290
|
+ static_wifi_address=
|
|
1291
|
+ if [[ $(config_param_exists "WIFI_INTERFACE") == "1" ]]; then
|
|
1292
|
+ dialog --title $"Static local IP address" \
|
|
1293
|
+ --backtitle $"Freedombone Control Panel" \
|
|
1294
|
+ --yesno $"\nSet a static address for the wifi adapter?\n\nIf you select 'no' then wired ethernet will be used." 10 60
|
|
1295
|
+ sel=$?
|
|
1296
|
+ case $sel in
|
|
1297
|
+ 0) static_wifi_address=1
|
|
1298
|
+ write_config_param "NETWORK_IS_STATIC" "1"
|
|
1299
|
+ ;;
|
|
1300
|
+ esac
|
|
1301
|
+ fi
|
|
1302
|
+
|
|
1303
|
+ if [ ! $static_wifi_address ]; then
|
1297
|
1304
|
# wired network
|
|
1305
|
+ remove_wifi_startup_script
|
1298
|
1306
|
echo '# This file describes the network interfaces available on your system' > /etc/network/interfaces
|
1299
|
1307
|
echo '# and how to activate them. For more information, see interfaces(5).' >> /etc/network/interfaces
|
1300
|
1308
|
echo '' >> /etc/network/interfaces
|
|
@@ -1330,6 +1338,9 @@ Enter a static local IP address for this system.\n\nIt will typically be ${IPv4_
|
1330
|
1338
|
echo '# netmask 255.255.255.0' >> /etc/network/interfaces
|
1331
|
1339
|
echo '# network 192.168.7.0' >> /etc/network/interfaces
|
1332
|
1340
|
echo '# gateway 192.168.7.1' >> /etc/network/interfaces
|
|
1341
|
+ else
|
|
1342
|
+ # wifi network
|
|
1343
|
+ wifi_settings
|
1333
|
1344
|
fi
|
1334
|
1345
|
|
1335
|
1346
|
clear
|