[package] base-files: fix whitespaces
authorLuka Perkov <luka@openwrt.org>
Mon, 9 Dec 2013 11:30:14 +0000 (11:30 +0000)
committerLuka Perkov <luka@openwrt.org>
Mon, 9 Dec 2013 11:30:14 +0000 (11:30 +0000)
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 39006

19 files changed:
package/base-files/files/bin/ipcalc.sh
package/base-files/files/etc/config/network
package/base-files/files/etc/init.d/sysctl
package/base-files/files/etc/init.d/umount
package/base-files/files/etc/preinit
package/base-files/files/etc/uci-defaults/11_migrate-sysctl
package/base-files/files/lib/functions/network.sh
package/base-files/files/lib/functions/service.sh
package/base-files/files/lib/preinit/10_indicate_failsafe
package/base-files/files/lib/preinit/10_indicate_preinit
package/base-files/files/lib/preinit/30_failsafe_wait
package/base-files/files/lib/preinit/40_run_failsafe_hook
package/base-files/files/lib/preinit/50_indicate_regular_preinit
package/base-files/files/lib/preinit/70_initramfs_test
package/base-files/files/lib/preinit/99_10_failsafe_login
package/base-files/files/lib/preinit/99_10_run_init
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/sbin/sysupgrade
package/base-files/files/sbin/wifi

index 7463d6bdda9cdabb0d10fefb7bb82a8a00e46a4c..27a52d6f83d72d56c7a74e08c0dd8f7b445c341f 100755 (executable)
@@ -11,7 +11,7 @@ function bitcount(c) {
 }
 
 function ip2int(ip) {
 }
 
 function ip2int(ip) {
-       for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x]) 
+       for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x])
        return ret
 }
 
        return ret
 }
 
index 87b124aa3b657540c9cdd2dd8d64b4a989fc8d5c..3c9c30a59f3c69da1ebb1fc2d9e34a1291a781f6 100644 (file)
@@ -15,7 +15,7 @@ config interface lan
        option ip6assign 60
 
 config interface wan6
        option ip6assign 60
 
 config interface wan6
-       option ifname   @wan
+       option ifname   @wan
        option proto    dhcpv6
 
 config globals globals
        option proto    dhcpv6
 
 config globals globals
index 3480d66410ee21761eb21ff5a2f76a18c2a7bda2..36e29eabcb8c4a4a42d2211cb2a3c14e8d179f87 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org 
+# Copyright (C) 2006 OpenWrt.org
 
 START=11
 start() {
 
 START=11
 start() {
index 5a750b93c6602b3608039cf0db3cbca3acfa711a..13ac61a81200af563b3153583a2dc3911d42d2fb 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org 
+# Copyright (C) 2006 OpenWrt.org
 
 STOP=99
 stop() {
 
 STOP=99
 stop() {
index ff26f96d687f5bd2305bec54d709f847d615080a..3fa0d6204667e14b052b959591043d6b2d3b2eac 100755 (executable)
@@ -32,7 +32,7 @@ boot_hook_init initramfs
 boot_hook_init preinit_mount_root
 
 for pi_source_file in /lib/preinit/*; do
 boot_hook_init preinit_mount_root
 
 for pi_source_file in /lib/preinit/*; do
-    . $pi_source_file
+       . $pi_source_file
 done
 
 boot_run_hook preinit_essential
 done
 
 boot_run_hook preinit_essential
@@ -42,4 +42,3 @@ pi_jffs2_mount_success=false
 pi_failsafe_net_message=false
 
 boot_run_hook preinit_main
 pi_failsafe_net_message=false
 
 boot_run_hook preinit_main
-
index b3796a4d2d8092320c5b4225d8421cf56ec177eb..464e275779ceec1d99a7323b6cbf7901aaa9fbb4 100644 (file)
@@ -14,4 +14,3 @@ if [ "$fingerprint" = "1b05ebb41f72cb84e5510573cd4aca26" ] || \
 fi
 
 exit 0
 fi
 
 exit 0
-
index ead69aa626621f12e4614a5b6ff78e0c81b63152..0ff11c3ca19e8567509f3ac005d0ec58d9f6d88b 100644 (file)
@@ -222,7 +222,7 @@ __network_ipaddr()
 # determine first IPv4 address of given logical interface
 # 1: destination variable
 # 2: interface
 # determine first IPv4 address of given logical interface
 # 1: destination variable
 # 2: interface
-network_get_ipaddr()  { __network_ipaddr "$1" "$2" "address4" "%%/*" 0; }
+network_get_ipaddr() { __network_ipaddr "$1" "$2" "address4" "%%/*" 0; }
 
 # determine first IPv6 address of given logical interface
 # 1: destination variable
 
 # determine first IPv6 address of given logical interface
 # 1: destination variable
@@ -232,7 +232,7 @@ network_get_ipaddr6() { __network_ipaddr "$1" "$2" "address6" "%%/*" 0; }
 # determine first IPv4 subnet of given logical interface
 # 1: destination variable
 # 2: interface
 # determine first IPv4 subnet of given logical interface
 # 1: destination variable
 # 2: interface
-network_get_subnet()  { __network_ipaddr "$1" "$2" "address4" "%% *" 0; }
+network_get_subnet() { __network_ipaddr "$1" "$2" "address4" "%% *" 0; }
 
 # determine first IPv6 subnet of given logical interface
 # 1: destination variable
 
 # determine first IPv6 subnet of given logical interface
 # 1: destination variable
@@ -247,7 +247,7 @@ network_get_prefix6() { __network_ipaddr "$1" "$2" "prefix6" "%% *" 0; }
 # determine all IPv4 addresses of given logical interface
 # 1: destination variable
 # 2: interface
 # determine all IPv4 addresses of given logical interface
 # 1: destination variable
 # 2: interface
-network_get_ipaddrs()  { __network_ipaddr "$1" "$2" "address4" "%%/*" 1; }
+network_get_ipaddrs() { __network_ipaddr "$1" "$2" "address4" "%%/*" 1; }
 
 # determine all IPv6 addresses of given logical interface
 # 1: destination variable
 
 # determine all IPv6 addresses of given logical interface
 # 1: destination variable
@@ -257,7 +257,7 @@ network_get_ipaddrs6() { __network_ipaddr "$1" "$2" "address6" "%%/*" 1; }
 # determine all IPv4 subnets of given logical interface
 # 1: destination variable
 # 2: interface
 # determine all IPv4 subnets of given logical interface
 # 1: destination variable
 # 2: interface
-network_get_subnets()  { __network_ipaddr "$1" "$2" "address4" "" 1; }
+network_get_subnets() { __network_ipaddr "$1" "$2" "address4" "" 1; }
 
 # determine all IPv6 subnets of given logical interface
 # 1: destination variable
 
 # determine all IPv6 subnets of given logical interface
 # 1: destination variable
@@ -292,9 +292,9 @@ __network_gateway()
 # 1: destination variable
 # 2: interface
 # 3: consider inactive gateway if "true" (optional)
 # 1: destination variable
 # 2: interface
 # 3: consider inactive gateway if "true" (optional)
-network_get_gateway()  { __network_gateway "$1" "$2" 4 "${3:-0}"; }
+network_get_gateway() { __network_gateway "$1" "$2" 4 "${3:-0}"; }
 
 
-# determine  IPv6 gateway of given logical interface
+# determine IPv6 gateway of given logical interface
 # 1: destination variable
 # 2: interface
 # 3: consider inactive gateway if "true" (optional)
 # 1: destination variable
 # 2: interface
 # 3: consider inactive gateway if "true" (optional)
@@ -354,7 +354,7 @@ __network_wan()
 # find the logical interface which holds the current IPv4 default route
 # 1: destination variable
 # 2: consider inactive default routes if "true" (optional)
 # find the logical interface which holds the current IPv4 default route
 # 1: destination variable
 # 2: consider inactive default routes if "true" (optional)
-network_find_wan()  { __network_wan "$1" 4 "${2:-0}"; }
+network_find_wan() { __network_wan "$1" 4 "${2:-0}"; }
 
 # find the logical interface which holds the current IPv6 default route
 # 1: destination variable
 
 # find the logical interface which holds the current IPv6 default route
 # 1: destination variable
@@ -384,12 +384,12 @@ network_is_up()
 # determine the layer 3 linux network device of the given logical interface
 # 1: destination variable
 # 2: interface
 # determine the layer 3 linux network device of the given logical interface
 # 1: destination variable
 # 2: interface
-network_get_device()  { __network_device "$1" "$2" l3_device; }
+network_get_device() { __network_device "$1" "$2" l3_device; }
 
 # determine the layer 2 linux network device of the given logical interface
 # 1: destination variable
 # 2: interface
 
 # determine the layer 2 linux network device of the given logical interface
 # 1: destination variable
 # 2: interface
-network_get_physdev() { __network_device "$1" "$2" device;    }
+network_get_physdev() { __network_device "$1" "$2" device; }
 
 
 __network_defer()
 
 
 __network_defer()
index cbb717d4d0ca637035657f5981a0e185c5ab90fc..d352a441cc4477ce21e4ab72f58889497ce5fe7f 100644 (file)
@@ -4,27 +4,27 @@
 # Usage: service ACTION EXEC ARGS...
 #
 # Action:
 # Usage: service ACTION EXEC ARGS...
 #
 # Action:
-#   -C   check if EXEC is alive
-#   -S   start EXEC, passing it ARGS as its arguments
-#   -K   kill EXEC, sending it a TERM signal if not specified otherwise
+#   -C check if EXEC is alive
+#   -S start EXEC, passing it ARGS as its arguments
+#   -K kill EXEC, sending it a TERM signal if not specified otherwise
 #
 # Environment variables exposed:
 #
 # Environment variables exposed:
-#   SERVICE_DAEMONIZE    run EXEC in background
-#   SERVICE_WRITE_PID    create a pid-file and use it for matching
-#   SERVICE_MATCH_EXEC   use EXEC command-line for matching (default)
-#   SERVICE_MATCH_NAME   use EXEC process name for matching
-#   SERVICE_USE_PID      assume EXEC create its own pid-file and use it for matching
-#   SERVICE_NAME         process name to use (default to EXEC file part)
-#   SERVICE_PID_FILE     pid file to use (default to /var/run/$SERVICE_NAME.pid)
-#   SERVICE_SIG          signal to send when using -K
-#   SERVICE_SIG_RELOAD   default signal used when reloading
-#   SERVICE_SIG_STOP     default signal used when stopping
-#   SERVICE_STOP_TIME    time to wait for a process to stop gracefully before killing it
-#   SERVICE_UID          user EXEC should be run as
-#   SERVICE_GID          group EXEC should be run as
+#   SERVICE_DAEMONIZE  run EXEC in background
+#   SERVICE_WRITE_PID  create a pid-file and use it for matching
+#   SERVICE_MATCH_EXEC use EXEC command-line for matching (default)
+#   SERVICE_MATCH_NAME use EXEC process name for matching
+#   SERVICE_USE_PID    assume EXEC create its own pid-file and use it for matching
+#   SERVICE_NAME       process name to use (default to EXEC file part)
+#   SERVICE_PID_FILE   pid file to use (default to /var/run/$SERVICE_NAME.pid)
+#   SERVICE_SIG                signal to send when using -K
+#   SERVICE_SIG_RELOAD default signal used when reloading
+#   SERVICE_SIG_STOP   default signal used when stopping
+#   SERVICE_STOP_TIME  time to wait for a process to stop gracefully before killing it
+#   SERVICE_UID                user EXEC should be run as
+#   SERVICE_GID                group EXEC should be run as
 #
 #
-#   SERVICE_DEBUG        don't do anything, but show what would be done
-#   SERVICE_QUIET        don't print anything
+#   SERVICE_DEBUG      don't do anything, but show what would be done
+#   SERVICE_QUIET      don't print anything
 #
 
 SERVICE_QUIET=1
 #
 
 SERVICE_QUIET=1
@@ -124,6 +124,3 @@ __END_OF_WARNING__
                        while grep -qs "$name" "/proc/$pid/cmdline"; do sleep 1; done
        done
 }
                        while grep -qs "$name" "/proc/$pid/cmdline"; do sleep 1; done
        done
 }
-
-
-
index 7761fd3be69a17b13264ff0f9db32a79b4593c86..6afae410b681e51c9cad0762f2347c5ad7729f92 100644 (file)
@@ -5,14 +5,13 @@
 # commands for emitting messages to network in failsafe mode
 
 indicate_failsafe_led () {
 # commands for emitting messages to network in failsafe mode
 
 indicate_failsafe_led () {
-    set_state failsafe
+       set_state failsafe
 }
 
 indicate_failsafe() {
 }
 
 indicate_failsafe() {
-    echo "- failsafe -"
-    preinit_net_echo "Entering Failsafe!\n"
-    indicate_failsafe_led
+       echo "- failsafe -"
+       preinit_net_echo "Entering Failsafe!\n"
+       indicate_failsafe_led
 }
 
 boot_hook_add failsafe indicate_failsafe
 }
 
 boot_hook_add failsafe indicate_failsafe
-
index da70b97c409a932282510e627114f5bfeed16abd..dc22f577ea7627f500266458e295c1a985420b07 100644 (file)
@@ -3,48 +3,47 @@
 # Copyright (C) 2010 Vertical Communications
 
 preinit_ip() {
 # Copyright (C) 2010 Vertical Communications
 
 preinit_ip() {
-    # if the preinit interface isn't specified and ifname is set in 
-    # preinit.arch use that interface
-    if [ -z "$pi_ifname" ]; then
-       pi_ifname=$ifname    
-    fi
-
-    [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
-       ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
-    }
+       # if the preinit interface isn't specified and ifname is set in
+       # preinit.arch use that interface
+       if [ -z "$pi_ifname" ]; then
+               pi_ifname=$ifname
+       fi
+
+       [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
+               ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
+       }
 }
 
 preinit_ip_deconfig() {
 }
 
 preinit_ip_deconfig() {
-    [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
-       ifconfig $pi_ifname 0.0.0.0 down
-    }
+       [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
+               ifconfig $pi_ifname 0.0.0.0 down
+       }
 }
 
 preinit_net_echo() {
        [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
 }
 
 preinit_net_echo() {
        [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
-               { 
+               {
                        [ "$pi_preinit_net_messages" = "y" ] || {
                        [ "$pi_preinit_net_messages" = "y" ] || {
-                               [ "$pi_failsafe_net_message"  = "true" ] && 
-                                   [ "$pi_preinit_no_failsafe_netmsg" != "y" ] 
-                        }
+                               [ "$pi_failsafe_net_message" = "true" ] &&
+                                       [ "$pi_preinit_no_failsafe_netmsg" != "y" ]
+                       }
                } && netmsg $pi_broadcast "$1"
                } && netmsg $pi_broadcast "$1"
-       }
+       }
 }
 
 preinit_echo() {
 }
 
 preinit_echo() {
-    preinit_net_echo $1
-    echo $1
+       preinit_net_echo $1
+       echo $1
 }
 
 pi_indicate_led() {
 }
 
 pi_indicate_led() {
-    set_state preinit
+       set_state preinit
 }
 
 pi_indicate_preinit() {
 }
 
 pi_indicate_preinit() {
-    preinit_net_echo "Doing OpenWRT Preinit\n"
-    pi_indicate_led
+       preinit_net_echo "Doing OpenWRT Preinit\n"
+       pi_indicate_led
 }
 
 boot_hook_add preinit_main preinit_ip
 boot_hook_add preinit_main pi_indicate_preinit
 }
 
 boot_hook_add preinit_main preinit_ip
 boot_hook_add preinit_main pi_indicate_preinit
-
index 522565940cccc88ecf30cf1499bda3c8fb3c4deb..3d69baf3a4b34397086f00297485ff85c7a16171 100644 (file)
@@ -3,95 +3,94 @@
 # Copyright (C) 2010 Vertical Communications
 
 fs_wait_for_key () {
 # Copyright (C) 2010 Vertical Communications
 
 fs_wait_for_key () {
-    local timeout=$3
-    local timer
-    local do_keypress
-    local keypress_true="$(mktemp)"
-    local keypress_wait="$(mktemp)"
-    local keypress_sec="$(mktemp)"
-    if [ -z "$keypress_wait" ]; then
-       keypress_wait=/tmp/.keypress_wait
-       touch $keypress_wait
-    fi
-    if [ -z "$keypress_true" ]; then
-       keypress_true=/tmp/.keypress_true
-       touch $keypress_true
-    fi
-    if [ -z "$keypress_sec" ]; then
-       keypress_sec=/tmp/.keypress_sec
-       touch $keypress_sec
-    fi
+       local timeout=$3
+       local timer
+       local do_keypress
+       local keypress_true="$(mktemp)"
+       local keypress_wait="$(mktemp)"
+       local keypress_sec="$(mktemp)"
+       if [ -z "$keypress_wait" ]; then
+               keypress_wait=/tmp/.keypress_wait
+               touch $keypress_wait
+       fi
+       if [ -z "$keypress_true" ]; then
+               keypress_true=/tmp/.keypress_true
+               touch $keypress_true
+       fi
+       if [ -z "$keypress_sec" ]; then
+               keypress_sec=/tmp/.keypress_sec
+               touch $keypress_sec
+       fi
 
 
-    trap "echo 'true' >$keypress_true; lock -u $keypress_wait ; rm -f $keypress_wait" INT
-    trap "echo 'true' >$keypress_true; lock -u $keypress_wait ; rm -f $keypress_wait" USR1
+       trap "echo 'true' >$keypress_true; lock -u $keypress_wait ; rm -f $keypress_wait" INT
+       trap "echo 'true' >$keypress_true; lock -u $keypress_wait ; rm -f $keypress_wait" USR1
 
 
-    [ -n "$timeout" ] || timeout=1
-    [ $timeout -ge 1 ] || timeout=1
-    timer=$timeout
-    lock $keypress_wait
-    {
-       while [ $timer -gt 0 ]; do
-            echo "$timer" >$keypress_sec
-           timer=$(($timer - 1))
-           sleep 1
-       done
-       lock -u $keypress_wait
-       rm -f $keypress_wait
-    } &
-
-    echo "Press the [$1] key and hit [enter] $2"
-    echo "Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level"
-    # if we're on the console we wait for input
-    { 
-       while [ -r $keypress_wait ]; do
-           timer="$(cat $keypress_sec)"
-
-           [ -n "$timer" ] || timer=1
-           timer="${timer%%\ *}"
-           [ $timer -ge 1 ] || timer=1
-           do_keypress=""
-           {
-               read -t "$timer" do_keypress
-               case "$do_keypress" in
-               $1)
-                       echo "true" >$keypress_true
-                       ;;
-               1 | 2 | 3 | 4)
-                       echo "$do_keypress" >/tmp/debug_level
-                       ;;
-               *)
-                       continue;
-                       ;;
-               esac
+       [ -n "$timeout" ] || timeout=1
+       [ $timeout -ge 1 ] || timeout=1
+       timer=$timeout
+       lock $keypress_wait
+       {
+               while [ $timer -gt 0 ]; do
+                       echo "$timer" >$keypress_sec
+                       timer=$(($timer - 1))
+                       sleep 1
+               done
                lock -u $keypress_wait
                rm -f $keypress_wait
                lock -u $keypress_wait
                rm -f $keypress_wait
-           }
-       done
-    }
-    lock -w $keypress_wait
+       } &
+
+       echo "Press the [$1] key and hit [enter] $2"
+       echo "Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level"
+       # if we're on the console we wait for input
+       {
+               while [ -r $keypress_wait ]; do
+                       timer="$(cat $keypress_sec)"
+
+                       [ -n "$timer" ] || timer=1
+                       timer="${timer%%\ *}"
+                       [ $timer -ge 1 ] || timer=1
+                       do_keypress=""
+                       {
+                               read -t "$timer" do_keypress
+                               case "$do_keypress" in
+                               $1)
+                                       echo "true" >$keypress_true
+                                       ;;
+                               1 | 2 | 3 | 4)
+                                       echo "$do_keypress" >/tmp/debug_level
+                                       ;;
+                               *)
+                                       continue;
+                                       ;;
+                               esac
+                               lock -u $keypress_wait
+                               rm -f $keypress_wait
+                       }
+               done
+       }
+       lock -w $keypress_wait
 
 
-    keypressed=1
-    [ "$(cat $keypress_true)" = "true" ] && keypressed=0
-    
-    rm -f $keypress_true
-    rm -f $keypress_wait
-    rm -f $keypress_sec
-    
-    return $keypressed
+       keypressed=1
+       [ "$(cat $keypress_true)" = "true" ] && keypressed=0
+
+       rm -f $keypress_true
+       rm -f $keypress_wait
+       rm -f $keypress_sec
+
+       return $keypressed
 }
 
 failsafe_wait() {
 }
 
 failsafe_wait() {
-    FAILSAFE=
-    grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
-    if [ "$FAILSAFE" != "true" ]; then
-      pi_failsafe_net_message=true
-      preinit_net_echo "Please press button now to enter failsafe"
-      pi_failsafe_net_message=false
-      fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
-      [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
-      [ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
-    fi
+       FAILSAFE=
+       grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
+       if [ "$FAILSAFE" != "true" ]; then
+               pi_failsafe_net_message=true
+               preinit_net_echo "Please press button now to enter failsafe"
+               pi_failsafe_net_message=false
+               fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
+               [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
+               [ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
+       fi
 }
 
 boot_hook_add preinit_main failsafe_wait
 }
 
 boot_hook_add preinit_main failsafe_wait
-
index faa043c17158467b84f4522b3b2f032bdc3427cc..cb43ad39cbae07c533af63d7ff445d41a5b988df 100644 (file)
@@ -10,4 +10,3 @@ run_failsafe_hook() {
 }
 
 boot_hook_add preinit_main run_failsafe_hook
 }
 
 boot_hook_add preinit_main run_failsafe_hook
-
index c200dad6716b6a21bfcbfac67c17c21818cda0ce..bc223b358eaeea15e70a4792ba6f6bf9dbff3fb8 100644 (file)
@@ -3,9 +3,8 @@
 # Copyright (C) 2010 Vertical Communications
 
 indicate_regular_preinit() {
 # Copyright (C) 2010 Vertical Communications
 
 indicate_regular_preinit() {
-    preinit_net_echo "Continuing with Regular Preinit\n"
-    pi_indicate_led
+       preinit_net_echo "Continuing with Regular Preinit\n"
+       pi_indicate_led
 }
 
 boot_hook_add preinit_main indicate_regular_preinit
 }
 
 boot_hook_add preinit_main indicate_regular_preinit
-
index 15c0dcd902a665c222c8cbbb369624ec780daeba..8504e34db091fc5f10e699f0475c3b0f2efe10c4 100644 (file)
@@ -3,12 +3,11 @@
 # Copyright (C) 2010 Vertical Communications
 
 initramfs_test() {
 # Copyright (C) 2010 Vertical Communications
 
 initramfs_test() {
-    if [ -n "$INITRAMFS" ]; then
-       boot_run_hook initramfs
-       preinit_ip_deconfig
-       break
-    fi
+       if [ -n "$INITRAMFS" ]; then
+               boot_run_hook initramfs
+               preinit_ip_deconfig
+               break
+       fi
 }
 
 boot_hook_add preinit_main initramfs_test
 }
 
 boot_hook_add preinit_main initramfs_test
-
index 05d6b7787b69c7a6cdf611505a04d43443be1cf2..15dcbd884f1f2ec4fd84c92482a9b656d1a26dd7 100644 (file)
@@ -3,16 +3,14 @@
 # Copyright (C) 2010 Vertical Communications
 
 failsafe_netlogin () {
 # Copyright (C) 2010 Vertical Communications
 
 failsafe_netlogin () {
-    telnetd -l /bin/login.sh <> /dev/null 2>&1    
+       telnetd -l /bin/login.sh <> /dev/null 2>&1
 }
 
 failsafe_shell() {
 }
 
 failsafe_shell() {
-    lock /tmp/.failsafe
-    ash --login
-    echo "Please reboot system when done with failsafe network logins"
+       lock /tmp/.failsafe
+       ash --login
+       echo "Please reboot system when done with failsafe network logins"
 }
 
 }
 
-
 boot_hook_add failsafe failsafe_netlogin
 boot_hook_add failsafe failsafe_shell
 boot_hook_add failsafe failsafe_netlogin
 boot_hook_add failsafe failsafe_shell
-
index a8f330f8926f02b07bf70052f4c2a13d278e9c95..b4f0ec203d3e0ccb32af296f1462ab1b0adaf2f0 100644 (file)
@@ -3,8 +3,7 @@
 # Copyright (C) 2010 Vertical Communications
 
 run_init() {
 # Copyright (C) 2010 Vertical Communications
 
 run_init() {
-    preinit_ip_deconfig
+       preinit_ip_deconfig
 }
 
 boot_hook_add preinit_main run_init
 }
 
 boot_hook_add preinit_main run_init
-
index 6122ae7712085015c8cdac3666c259ea187c4918..15ee70325b5c6fc3a0207ad34ca7f75846962207 100644 (file)
@@ -38,7 +38,7 @@ supivot() { # <new_root> <old_root>
        mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \
        mount -o noatime,move /proc $1/proc && \
        pivot_root $1 $1$2 || {
        mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \
        mount -o noatime,move /proc $1/proc && \
        pivot_root $1 $1$2 || {
-        umount -l $1 $1
+               umount -l $1 $1
                return 1
        }
 
                return 1
        }
 
@@ -50,10 +50,10 @@ supivot() { # <new_root> <old_root>
 }
 
 run_ramfs() { # <command> [...]
 }
 
 run_ramfs() { # <command> [...]
-       install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount        \
-               /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd   \
-               /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" \
-               /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump          \
+       install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount        \
+               /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd   \
+               /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" \
+               /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump          \
                /bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc
 
        install_bin /sbin/mtd
                /bin/sleep /bin/zcat /usr/bin/bzcat /usr/bin/printf /usr/bin/wc
 
        install_bin /sbin/mtd
@@ -94,7 +94,7 @@ kill_remaining() { # [ <signal> ]
                local cmdline
                read cmdline < /proc/$pid/cmdline
 
                local cmdline
                read cmdline < /proc/$pid/cmdline
 
-               # Skip kernel threads 
+               # Skip kernel threads
                [ -n "$cmdline" ] || continue
 
                case "$name" in
                [ -n "$cmdline" ] || continue
 
                case "$name" in
index 14b09eb0b56ed4e62a4181830bead1aac0263416..56e9a92424556d8a981e3f313561becaf6228e3e 100755 (executable)
@@ -20,7 +20,7 @@ export FORCE=0
 export TEST=0
 
 # parse options
 export TEST=0
 
 # parse options
-while [ -n "$1" ]; do 
+while [ -n "$1" ]; do
        case "$1" in
                -i) export INTERACTIVE=1;;
                -d) export DELAY="$2"; shift;;
        case "$1" in
                -i) export INTERACTIVE=1;;
                -d) export DELAY="$2"; shift;;
index f40cd7febb377effe80f2bd7f3cbd288b59220dc..897ee4ff14083a4a6b90a84a07dabae064cc3c88 100755 (executable)
@@ -64,7 +64,7 @@ prepare_key_wep() {
        [ "${#key}" -eq 10 -a $hex -eq 1 ] || \
        [ "${#key}" -eq 26 -a $hex -eq 1 ] || {
                [ "${key:0:2}" = "s:" ] && key="${key#s:}"
        [ "${#key}" -eq 10 -a $hex -eq 1 ] || \
        [ "${#key}" -eq 26 -a $hex -eq 1 ] || {
                [ "${key:0:2}" = "s:" ] && key="${key#s:}"
-               key="$(echo -n "$key" | hexdump -ve '1/1 "%02x" ""')"
+               key="$(echo -n "$key" | hexdump -ve '1/1 "%02x" ""')"
        }
        echo "$key"
 }
        }
        echo "$key"
 }
@@ -91,7 +91,7 @@ wifi_fixup_hwmode() {
                ;;
                *)
                        hwmode=
                ;;
                *)
                        hwmode=
-                       if [ "${channel:-0}" -gt 0 ]; then 
+                       if [ "${channel:-0}" -gt 0 ]; then
                                if [ "${channel:-0}" -gt 14 ]; then
                                        hwmode=a
                                else
                                if [ "${channel:-0}" -gt 14 ]; then
                                        hwmode=a
                                else
@@ -211,7 +211,7 @@ scan_wifi() {
                case "$TYPE" in
                        wifi-iface)
                                config_get device "$CONFIG_SECTION" device
                case "$TYPE" in
                        wifi-iface)
                                config_get device "$CONFIG_SECTION" device
-                               config_get vifs "$device" vifs 
+                               config_get vifs "$device" vifs
                                append vifs "$CONFIG_SECTION"
                                config_set "$device" vifs "$vifs"
                        ;;
                                append vifs "$CONFIG_SECTION"
                                config_set "$device" vifs "$vifs"
                        ;;