From 4461ea2391b59deadc684586c9ebfa965ba96927 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 16 Sep 2016 17:09:06 +0200 Subject: [PATCH] rc: order syshooks by name --- src/etc/rc.syshook | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/etc/rc.syshook b/src/etc/rc.syshook index 4fe900f0d..b616529e0 100755 --- a/src/etc/rc.syshook +++ b/src/etc/rc.syshook @@ -25,6 +25,15 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. +# Scripts are sorted and should adhere to the +# following rule of thumb: "dd-identifier.level", for +# core package syshooks generally "20-mycorehook.start" +# and for plugin packages rather "50-mypluginhook.stop". +# +# It could be useful for the user to order scripts +# or set a higher/lower priority in case some +# use case requires a slightly different setup. + SYSDIR="/usr/local/etc/rc.syshook.d" SYSLEVEL="${1}" @@ -39,7 +48,7 @@ if [ ! -d ${SYSDIR} ]; then fi # collect all matching scripts -SYSHOOKS=$(find ${SYSDIR} -type f -name "*.${SYSLEVEL}") +SYSHOOKS=$(find -s ${SYSDIR} -type f -name "*.${SYSLEVEL}") for SYSHOOK in ${SYSHOOKS}; do # extract syshook origin