Changeset 19480


Ignore:
Timestamp:
2010-02-01T01:34:10+01:00 (7 years ago)
Author:
jow
Message:

[brcm-2.4] preinit: use grep -q where applicable

Location:
trunk/target/linux/brcm-2.4/base-files/lib/preinit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm-2.4/base-files/lib/preinit/05_set_failsafe_switch_brcm

    r19336 r19480  
    77        } 
    88         
    9         [ -n "$pi_ifname" ] && grep "$pi_ifname" /proc/net/dev >/dev/null && { 
     9        [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { 
    1010                ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up 
    1111        } 
  • trunk/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm

    r19344 r19480  
    22 
    33port_net_echo() { 
    4         [ -n "$pi_ifname" ] && grep "$pi_ifname" /proc/net/dev >/dev/null && { 
     4        [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { 
    55                if [ "$pi_preinit_net_messages" = "y" ] || [ "$pi_failsafe_net_message" = "true" ] && [ "$pi_preinit_no_failsafe_netmsg" != "y" ]; then  
    66                        netmsg $pi_broadcast "$1" 
     
    1313                ifconfig $ifname 0.0.0.0 down 
    1414        else 
    15                 grep "$pi_ifname" /proc/net/dev >/dev/null && { 
     15                grep -q "$pi_ifname" /proc/net/dev && { 
    1616                        ifconfig $pi_ifname 0.0.0.0 down 
    1717                } 
Note: See TracChangeset for help on using the changeset viewer.