diff --git a/plist b/plist index b01819201..209a4e46e 100644 --- a/plist +++ b/plist @@ -912,6 +912,8 @@ /usr/local/sbin/ntpdate_sync_once.sh /usr/local/sbin/openvpn.attributes.sh /usr/local/sbin/opnsense-auth +/usr/local/sbin/opnsense-importer +/usr/local/sbin/opnsense-installer /usr/local/sbin/ovpn-linkdown /usr/local/sbin/ovpn-linkup /usr/local/sbin/ovpn_auth_verify diff --git a/src/etc/rc b/src/etc/rc index ce09225ee..9531d5641 100755 --- a/src/etc/rc +++ b/src/etc/rc @@ -100,7 +100,7 @@ fi /etc/rc.d/syscons onestart # run the config importer during early startup -/usr/local/etc/rc.importer || exit 1 +/usr/local/etc/rc.importer -b || exit 1 # Enable console output if its muted. /sbin/conscontrol mute off > /dev/null diff --git a/src/etc/rc.importer b/src/etc/rc.importer index e781de52c..5b2499493 100755 --- a/src/etc/rc.importer +++ b/src/etc/rc.importer @@ -27,6 +27,20 @@ INSTALL="/.probe.for.install.media" MNT="/tmp/hdrescue" +DO_BOOT= + +while getopts b OPT; do + case ${OPT} in + b) + DO_BOOT="-b" + ;; + *) + echo "Unknown argument during import." >&2 + exit 0 + ;; + esac +done + bootstrap_and_exit() { # ensure config directory structure @@ -49,9 +63,11 @@ bootstrap_and_exit() exit 0 } -touch ${INSTALL} 2> /dev/null -if [ -f ${INSTALL} -a -f /conf/config.xml ]; then - bootstrap_and_exit +if [ -n "${DO_BOOT}" ]; then + touch ${INSTALL} 2> /dev/null + if [ -f ${INSTALL} -a -f /conf/config.xml ]; then + bootstrap_and_exit + fi fi timeout_prompt() diff --git a/src/sbin/opnsense-importer b/src/sbin/opnsense-importer new file mode 100755 index 000000000..f00bec815 --- /dev/null +++ b/src/sbin/opnsense-importer @@ -0,0 +1,4 @@ +#!/bin/sh + +# launch the real utility from here +/usr/local/sbin/opnsense-importer "${@}" diff --git a/src/sbin/opnsense-installer b/src/sbin/opnsense-installer new file mode 100755 index 000000000..43c5522ba --- /dev/null +++ b/src/sbin/opnsense-installer @@ -0,0 +1,4 @@ +#!/bin/sh + +# launch the real utility from here +/usr/local/etc/rc.installer "${@}"