aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/preinit/10_indicate_preinit
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/lib/preinit/10_indicate_preinit')
-rw-r--r--package/base-files/files/lib/preinit/10_indicate_preinit45
1 files changed, 22 insertions, 23 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index da70b97c40..dc22f577ea 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -3,48 +3,47 @@
# 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() {
- [ -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 && {
- {
+ {
[ "$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"
- }
+ }
}
preinit_echo() {
- preinit_net_echo $1
- echo $1
+ preinit_net_echo $1
+ echo $1
}
pi_indicate_led() {
- set_state preinit
+ set_state 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
-