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" ] &&
# that's why we use /dev/pty/m0 and m1 (or equivalent) as replacement
# for /dev/console if there's no serial console available
- if grep devfs /proc/filesystems > /dev/null; then
+ if grep -q devfs /proc/filesystems; then
M0=/dev/pty/m0
M1=/dev/pty/m1
M2=/dev/pty/m1