diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-02-01 00:32:46 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-02-01 00:32:46 +0000 |
commit | e367f5434ac49f709b9c6d9df6ecb1c5e0b79543 (patch) | |
tree | ec2f9b06f3f7c0cd6823ff488603a00c37c36ad0 /package/base-files/files/lib/preinit/10_indicate_preinit | |
parent | 34c0c72a6e045340d7ecd9c7b2673c299d7f2d9b (diff) | |
download | upstream-e367f5434ac49f709b9c6d9df6ecb1c5e0b79543.tar.gz upstream-e367f5434ac49f709b9c6d9df6ecb1c5e0b79543.tar.bz2 upstream-e367f5434ac49f709b9c6d9df6ecb1c5e0b79543.zip |
base-files: preinit: get rid of /dev/null redirections and use grep -q where applicable
SVN-Revision: 19478
Diffstat (limited to 'package/base-files/files/lib/preinit/10_indicate_preinit')
-rw-r--r-- | package/base-files/files/lib/preinit/10_indicate_preinit | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit index cd3ca5571a..ab69305180 100644 --- a/package/base-files/files/lib/preinit/10_indicate_preinit +++ b/package/base-files/files/lib/preinit/10_indicate_preinit @@ -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" ] && |