slitaz-boot-scripts view usr/share/slitaz/network.conf_migration @ rev 393

network.sh: better handle WEP connections, handle EAP, store Wi-Fi neworks by default; network.conf: migrate to extended format to support EAP arguments, and few more.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 23 02:01:21 2015 +0200 (2015-03-23)
parents
children 7acd64a8f538
line source
1 # Migrate existing settings to a new format file
2 # Sourced and executed by /etc/init.d/network.sh
4 if [ "$NETWORK_CONF_VERSION" != '2' ]; then
5 echo "Moving old settings to $CONF.old"
6 mv -f $CONF $CONF.old
8 echo "Migrate existing settings to a new format $CONF"
9 cat > $CONF << EOT
10 # /etc/network.conf: SliTaz system wide networking configuration.
11 # Config file used by: /etc/init.d/network.sh
12 #
14 NETWORK_CONF_VERSION="2"
16 # Set default interface.
17 INTERFACE="$INTERFACE"
19 # Dynamic IP address.
20 # Enable/disable DHCP client at boot time.
21 DHCP="$DHCP"
24 #
25 # Settings only for static IP address.
26 #
28 # Enable/disable static IP at boot time.
29 STATIC="$STATIC"
31 # Set IP address and netmask for a static IP.
32 IP="$IP"
33 NETMASK="$NETMASK"
35 # Set broadcast address
36 BROADCAST="$BROADCAST"
38 # Set route gateway for a static IP.
39 GATEWAY="$GATEWAY"
41 # Set domain name
42 DOMAIN="$DOMAIN"
44 # Set DNS server for a static IP.
45 DNS_SERVER="$DNS_SERVER"
48 #
49 # Wi-Fi settings.
50 #
52 # Enable/disable wireless connection at boot time.
53 WIFI="$WIFI"
55 # Set "yes" if you don't want to store networks you're already connected.
56 WIFI_BLANK_NETWORKS="$WIFI_BLANK_NETWORKS"
59 #
60 # Wi-Fi settings for iwconfig.
61 #
63 # Wi-Fi interface. It can auto-search interface if value below is fail.
64 WIFI_INTERFACE="$WIFI_INTERFACE"
66 # WPA driver; default is "wext" (Wireless Extension).
67 WIFI_WPA_DRIVER="$WIFI_WPA_DRIVER"
69 # Set the operating mode of the device. The mode can be "Ad-Hoc", "Managed",
70 # "Master", "Repeater", "Secondary", "Monitor" or "Auto".
71 WIFI_MODE="$WIFI_MODE"
73 # Set the operating channel in the device. Empty by default.
74 WIFI_CHANNEL="$WIFI_CHANNEL"
76 # Force the card to register to the Access Point given by the address, if it
77 # possible. Empty by default to automatic mode.
78 WIFI_AP="$WIFI_AP"
81 #
82 # Wi-Fi settings for wpa_supplicant (for given network).
83 #
85 # SSID (network name)
86 WIFI_ESSID="$WIFI_ESSID"
88 # BSSID (optional), use this block to associate with the AP
89 WIFI_BSSID="$WIFI_BSSID"
91 # Wi-Fi security. Empty ("") for open network; "ANY" for trying many methods;
92 # "WEP" for WEP; "WPA" for WPA/WPA2-PSK; "EAP" for 802.1x EAP.
93 WIFI_KEY_TYPE="$WIFI_KEY_TYPE"
95 # Password for WEP, WPA, EAP, WAPI, and ANY; both in ASCII or HEX form.
96 WIFI_KEY="$WIFI_KEY"
98 # Method for EAP: "PEAP", "TLS", "TTLS", "PWD".
99 WIFI_EAP_METHOD="$WIFI_EAP_METHOD"
101 # File path to CA certificate file (PEM/DER).
102 WIFI_CA_CERT="$WIFI_CA_CERT"
104 # File path to client certificate file (PEM/DER).
105 WIFI_CLIENT_CERT="$WIFI_CLIENT_CERT"
107 # Identity string for EAP.
108 WIFI_IDENTITY="$WIFI_IDENTITY"
110 # Anonymous identity string for EAP.
111 WIFI_ANONYMOUS_IDENTITY="$WIFI_ANONYMOUS_IDENTITY"
113 # Inner authentication parameters: "", "PAP", "MSCHAP", "MSCHAPV2", "GTC".
114 WIFI_PHASE2="$WIFI_PHASE2"
115 EOT
116 fi