slitaz-boot-scripts diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/usr/share/slitaz/network.conf_migration Mon Mar 23 02:01:21 2015 +0200 1.3 @@ -0,0 +1,116 @@ 1.4 +# Migrate existing settings to a new format file 1.5 +# Sourced and executed by /etc/init.d/network.sh 1.6 + 1.7 +if [ "$NETWORK_CONF_VERSION" != '2' ]; then 1.8 + echo "Moving old settings to $CONF.old" 1.9 + mv -f $CONF $CONF.old 1.10 + 1.11 + echo "Migrate existing settings to a new format $CONF" 1.12 + cat > $CONF << EOT 1.13 +# /etc/network.conf: SliTaz system wide networking configuration. 1.14 +# Config file used by: /etc/init.d/network.sh 1.15 +# 1.16 + 1.17 +NETWORK_CONF_VERSION="2" 1.18 + 1.19 +# Set default interface. 1.20 +INTERFACE="$INTERFACE" 1.21 + 1.22 +# Dynamic IP address. 1.23 +# Enable/disable DHCP client at boot time. 1.24 +DHCP="$DHCP" 1.25 + 1.26 + 1.27 +# 1.28 +# Settings only for static IP address. 1.29 +# 1.30 + 1.31 +# Enable/disable static IP at boot time. 1.32 +STATIC="$STATIC" 1.33 + 1.34 +# Set IP address and netmask for a static IP. 1.35 +IP="$IP" 1.36 +NETMASK="$NETMASK" 1.37 + 1.38 +# Set broadcast address 1.39 +BROADCAST="$BROADCAST" 1.40 + 1.41 +# Set route gateway for a static IP. 1.42 +GATEWAY="$GATEWAY" 1.43 + 1.44 +# Set domain name 1.45 +DOMAIN="$DOMAIN" 1.46 + 1.47 +# Set DNS server for a static IP. 1.48 +DNS_SERVER="$DNS_SERVER" 1.49 + 1.50 + 1.51 +# 1.52 +# Wi-Fi settings. 1.53 +# 1.54 + 1.55 +# Enable/disable wireless connection at boot time. 1.56 +WIFI="$WIFI" 1.57 + 1.58 +# Set "yes" if you don't want to store networks you're already connected. 1.59 +WIFI_BLANK_NETWORKS="$WIFI_BLANK_NETWORKS" 1.60 + 1.61 + 1.62 +# 1.63 +# Wi-Fi settings for iwconfig. 1.64 +# 1.65 + 1.66 +# Wi-Fi interface. It can auto-search interface if value below is fail. 1.67 +WIFI_INTERFACE="$WIFI_INTERFACE" 1.68 + 1.69 +# WPA driver; default is "wext" (Wireless Extension). 1.70 +WIFI_WPA_DRIVER="$WIFI_WPA_DRIVER" 1.71 + 1.72 +# Set the operating mode of the device. The mode can be "Ad-Hoc", "Managed", 1.73 +# "Master", "Repeater", "Secondary", "Monitor" or "Auto". 1.74 +WIFI_MODE="$WIFI_MODE" 1.75 + 1.76 +# Set the operating channel in the device. Empty by default. 1.77 +WIFI_CHANNEL="$WIFI_CHANNEL" 1.78 + 1.79 +# Force the card to register to the Access Point given by the address, if it 1.80 +# possible. Empty by default to automatic mode. 1.81 +WIFI_AP="$WIFI_AP" 1.82 + 1.83 + 1.84 +# 1.85 +# Wi-Fi settings for wpa_supplicant (for given network). 1.86 +# 1.87 + 1.88 +# SSID (network name) 1.89 +WIFI_ESSID="$WIFI_ESSID" 1.90 + 1.91 +# BSSID (optional), use this block to associate with the AP 1.92 +WIFI_BSSID="$WIFI_BSSID" 1.93 + 1.94 +# Wi-Fi security. Empty ("") for open network; "ANY" for trying many methods; 1.95 +# "WEP" for WEP; "WPA" for WPA/WPA2-PSK; "EAP" for 802.1x EAP. 1.96 +WIFI_KEY_TYPE="$WIFI_KEY_TYPE" 1.97 + 1.98 +# Password for WEP, WPA, EAP, WAPI, and ANY; both in ASCII or HEX form. 1.99 +WIFI_KEY="$WIFI_KEY" 1.100 + 1.101 +# Method for EAP: "PEAP", "TLS", "TTLS", "PWD". 1.102 +WIFI_EAP_METHOD="$WIFI_EAP_METHOD" 1.103 + 1.104 +# File path to CA certificate file (PEM/DER). 1.105 +WIFI_CA_CERT="$WIFI_CA_CERT" 1.106 + 1.107 +# File path to client certificate file (PEM/DER). 1.108 +WIFI_CLIENT_CERT="$WIFI_CLIENT_CERT" 1.109 + 1.110 +# Identity string for EAP. 1.111 +WIFI_IDENTITY="$WIFI_IDENTITY" 1.112 + 1.113 +# Anonymous identity string for EAP. 1.114 +WIFI_ANONYMOUS_IDENTITY="$WIFI_ANONYMOUS_IDENTITY" 1.115 + 1.116 +# Inner authentication parameters: "", "PAP", "MSCHAP", "MSCHAPV2", "GTC". 1.117 +WIFI_PHASE2="$WIFI_PHASE2" 1.118 +EOT 1.119 +fi