]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
unify modprobe alias lookups
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 11 Jun 2013 22:17:33 +0000 (22:17 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 11 Jun 2013 22:17:33 +0000 (22:17 +0000)
svn-id: @12693

rc.d/rc.sysinit

index 15b471afe8be8c391cfd84c4f667d041c58f8636..60271b04d32db61cffe2abb87a43555ebdd9a867 100755 (executable)
@@ -488,7 +488,7 @@ if ! is_yes "$VSERVER"; then
        # Initialize USB controllers
        usb=0
        if [ -z "$nousb" ] && ! is_fsmounted usbfs /proc/bus/usb; then
-               aliases=$(modprobe_c | awk '/^alias[\t ]+usb-controller/ { print $3 }')
+               aliases=$(modprobe_c | awk '/^alias[[:space:]]+usb-controller[[:space:]]+/{ print $3 }')
                if [ -n "$aliases" -a "$aliases" != "off" ] ; then
                        modprobe -s usbcore
                        for alias in $aliases ; do
@@ -703,7 +703,7 @@ if ! is_yes "$VSERVER"; then
 
        # Load firewire devices
        if [ -z "$nofirewire" ]; then
-               aliases=$(modprobe_c | awk '/^alias ieee1394-controller/ { print $3 }')
+               aliases=$(modprobe_c | awk '/^alias[[:space:]]+ieee1394-controller[[:space:]]+/{ print $3 }')
                if [ -n "$aliases" -a "$aliases" != "off" ] ; then
                        for alias in $aliases ; do
                                [ "$alias" = "off" ] && continue
@@ -716,12 +716,12 @@ if ! is_yes "$VSERVER"; then
        # Load sound modules if they need persistent DMA buffers
        if modprobe_c | grep -q "^options sound dmabuf=1"; then
                RETURN=0
-               alias=$(modprobe_c | grep -sE "^alias[[:space:]]+sound[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
+               alias=$(modprobe_c | awk '/^alias[[:space:]]+sound[[:space:]]+/{ print $3 }')
                if [ -n "$alias" -a "$alias" != "off" ] ; then
                        run_cmd "$(nls 'Loading sound module') ($alias)" modprobe -s $alias
                        RETURN=$?
                fi
-               alias=$(modprobe_c | grep -sE "^alias[[:space:]]+sound-slot-0[[:space:]]+" 2>/dev/null | awk '{ print $3 }')
+               alias=$(modprobe_c | awk '/^alias[[:space:]]+sound-slot-0[[:space:]]+/ { print $3 }')
                if [ -n "$alias" -a "$alias" != "off" ] ; then
                        run_cmd "$(nls 'Loading sound module') ($alias)" modprobe -s $alias
                        RETURN=$?
This page took 0.185522 seconds and 4 git commands to generate.