summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 1fe2744..538fc43 100755
--- a/etc/rc
+++ b/etc/rc
@@ -86,9 +86,11 @@ if [ -f /etc/rc.disable_hdd_apm ]; then
fi
#Eject CD devices on 3G modems
-MANUFATURER="huawei|zte"
-CDDEVICE=`dmesg |egrep -ei "($MANUFACTURER)" | awk '/cd/ {print $1}'`
-cdcontrol -f /dev/"$CDDEVICE" eject
+MANUFACTURER="huawei|zte"
+CDDEVICE=`dmesg |egrep -ie "($MANUFACTURER)" | awk -F: '/cd/ {print $1}'`
+if [ "$CDDEVICE" != "" ]; then
+ cdcontrol -f /dev/"$CDDEVICE" eject
+fi
if [ ! "$PLATFORM" = "jail" ]; then
# Check to see if a compact flash mountpoint exists
OpenPOWER on IntegriCloud