From 5e212fb145ee5483f7b3134217b9527b18cbd33e Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 4 May 2004 05:34:10 +0000 Subject: handle multiple spaces correctly (#118583, ) --- rc.d/rc.sysinit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rc.d/rc.sysinit') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 5c8f8c01..e0087501 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -200,7 +200,7 @@ fi update_boot_stage RCusb usb=0 if ! strstr "$cmdline" nousb && ! strstr "$cmdline" nomodules ; then - aliases=`/sbin/modprobe -c | awk '/^alias usb-controller/ { print $3 }'` + aliases=`/sbin/modprobe -c | awk '/^alias[[:space:]]+usb-controller/ { print $3 }'` if [ -n "$aliases" -a "$aliases" != "off" ]; then modprobe usbcore >/dev/null 2>&1 for alias in $aliases ; do @@ -440,12 +440,12 @@ if [ -n "$PNP" -a -f /proc/isapnp -a -x /sbin/sndconfig ]; then fi # Load sound modules if and only if they need persistent DMA buffers -if LC_ALL=C fgrep -q "options sound dmabuf=1" /etc/modules.conf 2>/dev/null ; then - alias=`/sbin/modprobe -c | awk '/^alias sound / { print $3 }'` +if LC_ALL=C grep -q "options[[:space:]]\+sound[[:space:]].*dmabuf=1" /etc/modules.conf 2>/dev/null ; then + alias=`/sbin/modprobe -c | awk '/^alias[[:space:]]+sound[[:space:]]/ { print $3 }'` if [ -n "$alias" -a "$alias" != "off" ]; then action $"Loading sound module ($alias): " modprobe sound fi - alias=`/sbin/modprobe -c | awk '/^alias sound-slot-0 / { print $3 }'` + alias=`/sbin/modprobe -c | awk '/^alias[[:space:]]+sound-slot-0[[:space:]]/ { print $3 }'` if [ -n "$alias" -a "$alias" != "off" ]; then action $"Loading sound module ($alias): " modprobe sound-slot-0 fi @@ -748,7 +748,7 @@ fi # Ooh, firewire too. if ! strstr "$cmdline" nofirewire && ! strstr "$cmdline" nomodules ; then - aliases=`/sbin/modprobe -c | awk '/^alias ieee1394-controller/ { print $3 }'` + aliases=`/sbin/modprobe -c | awk '/^alias[[:space:]]+ieee1394-controller/ { print $3 }'` if [ -n "$aliases" -a "$aliases" != "off" ]; then for alias in $aliases ; do [ "$alias" = "off" ] && continue -- cgit v1.2.1