]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
use is_empty_file function on /etc/mactab
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Mar 2012 21:33:34 +0000 (21:33 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Mar 2012 21:33:34 +0000 (21:33 +0000)
svn-id: @12522

rc.d/init.d/network

index 9878733d25feed77cfd8266f82aa99fb9d727049..c4ebabd1046815bc97e9614edafe02c6c5952cff 100755 (executable)
@@ -48,7 +48,7 @@ network_init() {
        modprobe_net
 
        # Setup interfaces names
-       if [ -x /sbin/nameif -a -f /etc/mactab -a -x /usr/bin/wc ] && [ $(grep -vsE '^(#| *$)' /etc/mactab | wc -l) -gt 0 ]; then
+       if ! is_empty_file /etc/mactab && [ -x /sbin/nameif ]; then
                run_cmd "Setting interfaces names (nameif)" /sbin/nameif
        fi
 
This page took 0.371055 seconds and 4 git commands to generate.