From: Arkadiusz Miƛkiewicz Date: Tue, 8 Mar 2011 20:49:06 +0000 (+0000) Subject: Revert previous commit. Fix is_module instead to do not match partial module names. X-Git-Tag: 0.4.4.0~4 X-Git-Url: http://git.pld-linux.org/?p=projects%2Frc-scripts.git;a=commitdiff_plain;h=63d30ecf66bd5052bebb183d4763e0e59c67e25b Revert previous commit. Fix is_module instead to do not match partial module names. svn-id: @12198 --- diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index e25549c5..15f867a9 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -939,7 +939,7 @@ confirm() { is_module() { # module name without .o at end if ! lsmod | grep -q "$1"; then - if ls -R /lib/modules/$(uname -r)/ 2> /dev/null | grep -q "${1}.\(\|k\)o\(\|.gz\)"; then + if ls -1R /lib/modules/$(uname -r)/ 2> /dev/null | grep -q "^${1}.\(\|k\)o\(\|.gz\)"; then # true return 0 fi diff --git a/sysconfig/network-scripts/functions.network b/sysconfig/network-scripts/functions.network index 15183517..86b72f04 100644 --- a/sysconfig/network-scripts/functions.network +++ b/sysconfig/network-scripts/functions.network @@ -346,16 +346,12 @@ set_down_loopback() modprobe_net() { - if is_yes "$IPV6_NETWORKING" && \ - [ "$(awk '$1 ~ /^TCPv6/ { print $8 }' /proc/net/protocols 2> /dev/null)" != "kernel" ] && \ - is_module "ipv6"; then - _modprobe single ipv6 + if is_yes "$IPV6_NETWORKING" && is_module "ipv6"; then + _modprobe single ipv6 fi - if is_yes "$IPX" && \ - [ "$(awk '$1 ~ /^IPX/ { print $8 }' /proc/net/protocols 2> /dev/null)" != "kernel" ] && \ - is_module "ipx"; then - _modprobe single ipx + if is_yes "$IPX" && is_module "ipx"; then + _modprobe single ipx fi }