From: Steven Barth Date: Thu, 11 Sep 2008 12:23:20 +0000 (+0000) Subject: Prevent unwanted shell expansion X-Git-Tag: reboot~25602 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5a4e88710bb3d3a00756a3d4ac7921ee829bb8b6;p=openwrt%2Fstaging%2Fpepe2k.git Prevent unwanted shell expansion SVN-Revision: 12568 --- diff --git a/package/base-files/files/sbin/usb-storage b/package/base-files/files/sbin/usb-storage index 23be38593e..e02efa8115 100755 --- a/package/base-files/files/sbin/usb-storage +++ b/package/base-files/files/sbin/usb-storage @@ -9,10 +9,10 @@ while [ $i -le 10 ]; do for blk in `find host* -type d 2>/dev/null`; do [ -d /sys/${DEVPATH}/${blk}/block/ ] && { cd - for disc in `find /sys/${DEVPATH}/${blk}/block -name sd*`; do + for disc in `find /sys/${DEVPATH}/${blk}/block -name "sd*"`; do sleep 2 cd $disc - for node in `find . -name sd* | cut -d "/" -f2`; do + for node in `find . -name "sd*" | cut -d "/" -f2`; do echo "mounting /dev/${node} on /mnt/usbdrive" mkdir -p /mnt/usbdrive mount /dev/${node} /mnt/usbdrive