summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-20 20:00:54 +0200
committersmos <seth.mos@dds.nl>2012-05-20 20:01:39 +0200
commit793d3c961dfc19f69819c995dfaec0084b0f2222 (patch)
tree1f75a16530cee5595817c76f5369a4d4a7332f6e /etc/rc
parent1de3cd8749db653be0b6700653e74279837d9f1b (diff)
downloadpfsense-793d3c961dfc19f69819c995dfaec0084b0f2222.zip
pfsense-793d3c961dfc19f69819c995dfaec0084b0f2222.tar.gz
Attempt to Eject the CD device on 3G sticks for Huawei and ZTE devices.
Diffstat (limited to 'etc/rc')
-rwxr-xr-xetc/rc5
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index a8c6ca5..1fe2744 100755
--- a/etc/rc
+++ b/etc/rc
@@ -85,6 +85,11 @@ if [ -f /etc/rc.disable_hdd_apm ]; then
/etc/rc.disable_hdd_apm
fi
+#Eject CD devices on 3G modems
+MANUFATURER="huawei|zte"
+CDDEVICE=`dmesg |egrep -ei "($MANUFACTURER)" | awk '/cd/ {print $1}'`
+cdcontrol -f /dev/"$CDDEVICE" eject
+
if [ ! "$PLATFORM" = "jail" ]; then
# Check to see if a compact flash mountpoint exists
# If it fails to mount then run a fsck -fy
OpenPOWER on IntegriCloud