rc: do not leak banner.php script location

This commit is contained in:
Franco Fichtner 2018-06-10 20:00:23 +00:00
parent 177ca71909
commit 185d8fab90
2 changed files with 7 additions and 2 deletions

View File

@ -200,7 +200,7 @@ rm /var/run/booting
echo -n "Root file system: "
mount | grep ' on / ' | awk '{ print $1 }'
/usr/local/opnsense/scripts/shell/banner.php
/usr/local/sbin/opnsense-shell banner
/usr/local/etc/rc.subr.d/livemode
exit 0

View File

@ -9,6 +9,7 @@
trap : 2
trap : 3
CMD_BANNER="/usr/local/opnsense/scripts/shell/banner.php"
CMD_DEFAULTS="/usr/local/opnsense/scripts/shell/defaults.php"
CMD_FIRMWARE="/usr/local/opnsense/scripts/shell/firmware.sh"
CMD_HALT="/usr/local/opnsense/scripts/shell/halt.php"
@ -54,6 +55,10 @@ fi
# The invoke using "opnsense-shell cmd" will launch the
# utility without presenting and looping the menu.
case "${1}" in
banner)
shift
exec ${CMD_BANNER} "${@}"
;;
defaults)
shift
exec ${CMD_DEFAULTS} "${@}"
@ -173,6 +178,6 @@ case ${OPCODE} in
;;
esac
/usr/local/opnsense/scripts/shell/banner.php
${CMD_BANNER}
done