summaryrefslogtreecommitdiffstats
path: root/release/rc.local
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-09-15 11:51:06 -0300
committerRenato Botelho <renato@netgate.com>2017-09-15 11:53:19 -0300
commitf82c1fa9268a7e8a20a72efd2786d87f0795f582 (patch)
treeabcf1b5660cc09a6c3afc82b008f09a9fe5274d2 /release/rc.local
parent0e4ce86bc1f290a06d84ca56cb5361fd9f5bfc4c (diff)
downloadFreeBSD-src-f82c1fa9268a7e8a20a72efd2786d87f0795f582.zip
FreeBSD-src-f82c1fa9268a7e8a20a72efd2786d87f0795f582.tar.gz
Mount a partition from USB stick running installer to prevent it to be listed as a valid target to install
Diffstat (limited to 'release/rc.local')
-rwxr-xr-xrelease/rc.local7
1 files changed, 7 insertions, 0 deletions
diff --git a/release/rc.local b/release/rc.local
index e6ceb30..9976645 100755
--- a/release/rc.local
+++ b/release/rc.local
@@ -18,6 +18,13 @@ if ! mdconfig -l | grep -q md3; then
mount /dev/md3 /etc
fi
+# Mount /dev/ufs/pfSense_Install on factory to prevent USB stick disk used
+# to boot to be shown as an option to install
+if [ -e /dev/ufs/pfSense_Install -a ! -d /tmp/usb_install_media ]; then
+ mkdir -p /tmp/usb_install_media
+ mount /dev/ufs/pfSense_Install /tmp/usb_install_media
+fi
+
MACHINE=`uname -m`
# resolv.conf from DHCP ends up in here, so make sure the directory exists
OpenPOWER on IntegriCloud