Commit 355939b2 authored by Franco Fichtner's avatar Franco Fichtner

rc: improve print of syshook invokes

parent 24403a51
#!/bin/sh #!/bin/sh
# Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org> # Copyright (c) 2015-2017 Franco Fichtner <franco@opnsense.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
...@@ -54,11 +54,12 @@ for SYSHOOK in ${SYSHOOKS}; do ...@@ -54,11 +54,12 @@ for SYSHOOK in ${SYSHOOKS}; do
# extract syshook origin # extract syshook origin
SYSHOOK=${SYSHOOK##"${SYSDIR}/"} SYSHOOK=${SYSHOOK##"${SYSDIR}/"}
SYSHOOK=${SYSHOOK%%".${SYSLEVEL}"} SYSHOOK=${SYSHOOK%%".${SYSLEVEL}"}
SYSNAME=${SYSHOOK#??-}
echo "rc.syshook(${SYSLEVEL}): running ${SYSHOOK#??-}" echo ">>> Invoking ${SYSLEVEL} script '${SYSNAME}'"
if ! ${SYSDIR}/${SYSHOOK}.${SYSLEVEL}; then if ! ${SYSDIR}/${SYSHOOK}.${SYSLEVEL}; then
echo "rc.syshook(${SYSLEVEL}): error in ${SYSHOOK#??-}" echo ">>> Error in ${SYSLEVEL} script '${SYSNAME}'"
fi fi
done done
......
#!/bin/sh #!/bin/sh
/usr/local/sbin/beep.sh stop /usr/local/sbin/beep.sh stop
#!/bin/sh #!/bin/sh
/usr/local/etc/rc.freebsd start /usr/local/etc/rc.freebsd start
#!/bin/sh #!/bin/sh
echo -n "Starting Cron: " echo -n "Starting Cron: "
configctl cron restart configctl cron restart
#!/bin/sh #!/bin/sh
/usr/local/sbin/beep.sh start /usr/local/sbin/beep.sh start
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