From 553aa3742ca43b4ba4e87b2dea2c5d31cc43a124 Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Wed, 16 Dec 2009 17:47:49 +0000 Subject: mkinitramfs: generate pre-cached boot order file if tsort is available, use it instead of custom sorting code if a pre-cached order file is available, use that instead [ move cache_run_scripts from scripts/functions to hook-scripts as only used on mkinitramfs build and not on boot ] Signed-off-by: maximilian attems --- hook-functions | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'hook-functions') diff --git a/hook-functions b/hook-functions index ab2f486..cf41e42 100644 --- a/hook-functions +++ b/hook-functions @@ -485,6 +485,22 @@ EOF } +# cache boot scripts order +cache_run_scripts() +{ + DESTDIR=${1} + scriptdir=${2} + initdir=${DESTDIR}${scriptdir} + [ ! -d ${initdir} ] && return + + runlist=$(get_prereq_pairs | tsort) + for crs_x in ${runlist}; do + [ -f ${initdir}/${crs_x} ] || continue + echo "${scriptdir}/${crs_x}" >> ${initdir}/ORDER + echo "[ -e /conf/param.conf ] && . /conf/param.conf" >> ${initdir}/ORDER + done +} + # minimal supported kernel version check_minkver() { -- cgit v1.2.3