slitaz-boot-scripts rev 454
Remove ashism ==
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Feb 26 08:21:44 2019 +0100 (2019-02-26) |
parents | d6f110850f61 |
children | 8d6928ce9c2c |
files | etc/init.d/network.sh etc/init.d/rcS |
line diff
1.1 --- a/etc/init.d/network.sh Tue Feb 05 08:08:51 2019 +0100 1.2 +++ b/etc/init.d/network.sh Tue Feb 26 08:21:44 2019 +0100 1.3 @@ -14,8 +14,8 @@ 1.4 1.5 # Change LXPanel Network applet settings 1.6 1.7 -if [ "$1" == 'netapplet' ]; then 1.8 - if [ "$WIFI" == 'yes' ]; then 1.9 +if [ "$1" = 'netapplet' ]; then 1.10 + if [ "$WIFI" = 'yes' ]; then 1.11 interface="$WIFI_INTERFACE" 1.12 else 1.13 interface="$INTERFACE" 1.14 @@ -109,7 +109,7 @@ 1.15 # Reconnect to the given network 1.16 1.17 reconnect_wifi_network() { 1.18 - if [ "$WIFI" == 'yes' ]; then 1.19 + if [ "$WIFI" = 'yes' ]; then 1.20 # Wpa_supplicant will auto-connect to the first network 1.21 # notwithstanding to priority when scan_ssid=1 1.22 current_ssid="$(wpa_cli list_networks 2>/dev/null | fgrep '[CURRENT]' | cut -f2)" 1.23 @@ -140,7 +140,7 @@ 1.24 # ESSID="any" will work and the interface is autodetected. 1.25 1.26 wifi() { 1.27 - if [ "$WIFI" == 'yes' ]; then 1.28 + if [ "$WIFI" = 'yes' ]; then 1.29 ifconfig $INTERFACE down 1.30 1.31 # Confirm if $WIFI_INTERFACE is the Wi-Fi interface 1.32 @@ -170,7 +170,7 @@ 1.33 [ "$WIFI_ESSID" != 'any' ] && remove_network 'any' 1.34 1.35 # Clean all / add / change stored networks settings 1.36 - if [ "$WIFI_BLANK_NETWORKS" == 'yes' ]; then 1.37 + if [ "$WIFI_BLANK_NETWORKS" = 'yes' ]; then 1.38 echo "Creating new $WPA_CONF" 1.39 cat /etc/wpa/wpa_empty.conf > $WPA_CONF 1.40 else 1.41 @@ -245,7 +245,7 @@ 1.42 key_mgmt=WPA-EAP IEEE8021X 1.43 eap=$WIFI_EAP_METHOD 1.44 EOT 1.45 - if [ "$WIFI_EAP_METHOD" == 'PWD' ]; then 1.46 + if [ "$WIFI_EAP_METHOD" = 'PWD' ]; then 1.47 WIFI_PHASE2=''; WIFI_CA_CERT=''; WIFI_USER_CERT=''; WIFI_ANONYMOUS_IDENTITY='' 1.48 fi 1.49 [ -n "$WIFI_CA_CERT" ] && echo -e "\tca_cert=\"$WIFI_CA_CERT\"" 1.50 @@ -286,10 +286,10 @@ 1.51 # For a dynamic IP with DHCP 1.52 1.53 dhcp() { 1.54 - if [ "$DHCP" == 'yes' ]; then 1.55 + if [ "$DHCP" = 'yes' ]; then 1.56 echo "Starting udhcpc client on: $INTERFACE..." 1.57 # Is wpa wireless && wpa_ctrl_open interface up? 1.58 - if [ -d /var/run/wpa_supplicant ] && [ "$WIFI" == 'yes' ]; then 1.59 + if [ -d /var/run/wpa_supplicant ] && [ "$WIFI" = 'yes' ]; then 1.60 wpa 1.61 else 1.62 # fallback on udhcpc: wep, eth 1.63 @@ -303,7 +303,7 @@ 1.64 # For a static IP 1.65 1.66 static_ip() { 1.67 - if [ "$STATIC" == 'yes' ]; then 1.68 + if [ "$STATIC" = 'yes' ]; then 1.69 echo "Configuring static IP on $INTERFACE: $IP..." 1.70 if [ -n "$BROADCAST" ]; then 1.71 /sbin/ifconfig $INTERFACE $IP netmask $NETMASK broadcast $BROADCAST up
2.1 --- a/etc/init.d/rcS Tue Feb 05 08:08:51 2019 +0100 2.2 +++ b/etc/init.d/rcS Tue Feb 26 08:21:44 2019 +0100 2.3 @@ -23,7 +23,7 @@ 2.4 status 2.5 2.6 # Trigger udev and handle hotplug events 2.7 - if [ "$UDEV" == 'yes' ]; then 2.8 + if [ "$UDEV" = 'yes' ]; then 2.9 action 'Mounting devtmpfs filesystem on /dev' 2.10 mount -t devtmpfs devtmpfs /dev 2.11 status 2.12 @@ -90,7 +90,7 @@ 2.13 2.14 # Clean up the system and set up tmp dirs. 2.15 # */run/* are tmpfs so they are cleaned up at shutdown. 2.16 - if [ "$CLEAN_UP_SYSTEM" == 'yes' ]; then 2.17 + if [ "$CLEAN_UP_SYSTEM" = 'yes' ]; then 2.18 action 'Cleaning up the system...' 2.19 rm -rf /tmp 2.20 mkdir -p /tmp/.X11-unix /tmp/.ICE-unix 2.21 @@ -165,7 +165,7 @@ 2.22 2.23 # Call udevadm trigger to ensure /dev is fully populated now that all 2.24 # modules are loaded. 2.25 - if [ "$UDEV" == 'yes' ]; then 2.26 + if [ "$UDEV" = 'yes' ]; then 2.27 action 'Triggering udev events: --action=add' 2.28 udevadm trigger --action=add 2.29 status