Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
sysconfig
> sysconfig_hwup_quote_variable_DRIVERS.234532.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File sysconfig_hwup_quote_variable_DRIVERS.234532.patch of Package sysconfig (Revision 1)
Currently displaying revision
1
,
show latest
--- scripts/hardware/hwup 2007-02-03 17:01:09.000000000 +0000 +++ scripts/hardware/hwup 2007-02-03 17:02:34.000000000 +0000 @@ -208,7 +208,7 @@ if [ -n "$DRIVER" -a "$DRIVER" != skip ] ; then info_mesg "Binding device to driver '$DRIVER'" SYSFS_DRIVER_PATH="/sys/bus/$HWD_BUSNAME/drivers/$DRIVER" - echo -n $HWD_BUSID > $SYSFS_DRIVER_PATH/bind + echo -n $HWD_BUSID > "$SYSFS_DRIVER_PATH/bind" test "$DRIVER" == ipw3945 && ipw3945_start_daemon fi fi @@ -511,11 +511,11 @@ if [ -n "$DRIVER" ]; then SYSFS_DRIVER_PATH="/sys/bus/$HWD_BUSNAME/drivers/$DRIVER" - if [ -L $SYSFS_DRIVER_PATH/$HWD_BUSID ] ; then + if [ -L "$SYSFS_DRIVER_PATH/$HWD_BUSID" ] ; then info_mesg "Device '$HWD_BUSID' is already bound to driver '$DRIVER'" else mesg "hwup: binding device $HWD_BUSID to driver $DRIVER." - echo -n $HWD_BUSID > $SYSFS_DRIVER_PATH/bind + echo -n $HWD_BUSID > "$SYSFS_DRIVER_PATH/bind" test "$DRIVER" == ipw3945 && ipw3945_start_daemon fi else @@ -525,13 +525,13 @@ if [ "$SCRIPTNAME" = hwdown -a "$HOTPLUG" != yes -a "$NOBIND" != yes ] ; then - SYSFS_DRIVER_PATH=`ls -d /sys/bus/$HWD_BUSNAME/drivers/*/$HWD_BUSID 2>/dev/null` - SYSFS_DRIVER_PATH=${SYSFS_DRIVER_PATH%/$HWD_BUSID} + SYSFS_DRIVER_PATH="`ls -d /sys/bus/$HWD_BUSNAME/drivers/*/$HWD_BUSID 2>/dev/null`" + SYSFS_DRIVER_PATH="${SYSFS_DRIVER_PATH%/$HWD_BUSID}" if [ -n "$SYSFS_DRIVER_PATH" ]; then # unbind the device from the module mesg "hwup: unbinding device $HWD_BUSID from driver $HWD_DRIVER." - echo -n $HWD_BUSID > $SYSFS_DRIVER_PATH/unbind + echo -n $HWD_BUSID > "$SYSFS_DRIVER_PATH/unbind" # save driver name echo "DRIVER=$HWD_DRIVER" > $DRIVER_FILE else @@ -541,10 +541,9 @@ fi if [ "$SCRIPTNAME" = hwstatus ] ; then - SYSFS_DRIVER_PATH=`ls -d /sys/bus/$HWD_BUSNAME/drivers/*/$HWD_BUSID \ - 2>/dev/null` - SYSFS_DRIVER_PATH=${SYSFS_DRIVER_PATH%/$HWD_BUSID} - SYSFS_MODULE_PATH=$(cd $SYSFS_DRIVER_PATH 2>/dev/null && + SYSFS_DRIVER_PATH="`ls -d /sys/bus/$HWD_BUSNAME/drivers/*/$HWD_BUSID 2>/dev/null`" + SYSFS_DRIVER_PATH="${SYSFS_DRIVER_PATH%/$HWD_BUSID}" + SYSFS_MODULE_PATH=$(cd "$SYSFS_DRIVER_PATH" 2>/dev/null && cd module 2>/dev/null; pwd -P) SYSFS_MODULE=${SYSFS_MODULE_PATH##*/} echo DRIVER=${SYSFS_DRIVER_PATH##*/}