allow targets to define a default subtarget when using automatic subtarget detection...
[openwrt.git] / package / base-files / files / lib / preinit / 10_indicate_preinit
index cd3ca55..ab69305 100644 (file)
@@ -9,19 +9,19 @@ preinit_ip() {
        pi_ifname=$ifname    
     fi
 
-    [ -n "$pi_ifname" ] && grep "$pi_ifname" /proc/net/dev >/dev/null && {
+    [ -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 "$pi_ifname" /proc/net/dev >/dev/null && {
+    [ -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 "$pi_ifname" /proc/net/dev >/dev/null && {
+       [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
                { 
                        [ "$pi_preinit_net_messages" = "y" ] || {
                                [ "$pi_failsafe_net_message"  = "true" ] && 
This page took 0.018922 seconds and 4 git commands to generate.