From 19248ae0bedf88a3a519d0a7ab4a52b865cedde3 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sun, 21 Jan 2001 19:04:42 +0000 Subject: only load the module if there is one to load. --- rc.d/init.d/network | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 65650447..374cb46c 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -60,7 +60,9 @@ case "$1" in for i in $interfaces; do if egrep -L "^ONBOOT=\"?[Nn][Oo]\"?" ifcfg-$i >/dev/null 2>&1 && [ "${i##eth}" != "$i" ]; then # Probe module to preserve interface ordering - /sbin/ifconfig $i >/dev/null 2>&1 + if [ -n "`modprobe -vn $i | grep -v Note:`" ]; then + /sbin/ifconfig $i >/dev/null 2>&1 + fi else # If we're in confirmation mode, get user confirmation [ -n "$CONFIRM" ] && -- cgit v1.2.1