rc: order syshooks by name

This commit is contained in:
Franco Fichtner 2016-09-16 17:09:06 +02:00
parent 4e16a07515
commit 4461ea2391

View File

@ -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