Commit d2471552 authored by Franco Fichtner's avatar Franco Fichtner

firmware: more work on the backend firmware script for #814

o Allow side-stepping flock(1) if not installed for rc script
o Pass arguments to subroutine script to allow passing modes
o Print a busy message when e.g. the GUI is running the upgrade
parent c660d3ec
......@@ -26,6 +26,15 @@
# SUCH DAMAGE.
LOCKFILE="/tmp/pkg_upgrade.progress"
FLOCK="/usr/local/bin/flock -n -o"
FLOCK="/usr/local/bin/flock"
ARGS="-n -o ${LOCKFILE}"
${FLOCK} ${LOCKFILE} /usr/local/etc/rc.firmware.subr
if [ ! -f ${FLOCK} ]; then
# backwards-compat to be removed post-16.7
/usr/local/etc/rc.firmware.subr "${@}"
exit 0
fi
if ! ${FLOCK} ${ARGS} /usr/local/etc/rc.firmware.subr "${@}"; then
echo "A firmware update is currently in progress."
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment