X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=4d13248e72dc1d842636628ecf0a0709c35d275b;hp=d699d3241530a76170e1257251c287c8f22cbbb7;hb=108abd3aa30fc3e9072d46e2aca2af0aa119e8f8;hpb=85af033b0a7979b537906b31b1c0da80da858fd4 diff --git a/autoconfig.functions b/autoconfig.functions index d699d32..4d13248 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -2067,7 +2067,7 @@ fi config_scripts(){ if checkbootparam 'scripts' || [ "$DCSMP" = "/mnt/grmlcfg" ]; then SCRIPTS="$(getbootparam 'scripts' 2>>$DEBUG)" - if [ -z "$SCRIPTS" ]; then + if [ -d ${DCSDIR}/scripts ] && [ -z "$SCRIPTS" ]; then SCRIPTS="$(cd ${DCSDIR}/scripts; /bin/ls -1d [Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)" fi if ! echo $SCRIPTS | grep -q '/'; then @@ -2079,16 +2079,18 @@ if checkbootparam 'scripts' || [ "$DCSMP" = "/mnt/grmlcfg" ]; then # kick everything we have done before and start over SCRIPTS="$(cd ${DCSDIR}; /bin/ls -1d [Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)" fi - SCRIPTS="${DCSDIR}/$SCRIPTS" - if [ "$DCSMP" = "/mnt/grmlcfg" ]; then - einfo "Trying to execute ${SCRIPTS}" - sh -c $SCRIPTS - elif [ -d "$SCRIPTS" ]; then - einfo "Bootparameter scripts found. Trying to execute from directory ${SCRIPTS}:" - run-parts $SCRIPTS - else - einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:" - sh -c $SCRIPTS + if [ -n "$SCRIPTS" ]; then + SCRIPTS="${DCSDIR}/$SCRIPTS" + if [ "$DCSMP" = "/mnt/grmlcfg" ]; then + einfo "Trying to execute ${SCRIPTS}" + sh -c $SCRIPTS + elif [ -d "$SCRIPTS" ]; then + einfo "Bootparameter scripts found. Trying to execute from directory ${SCRIPTS}:" + run-parts $SCRIPTS + else + einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:" + sh -c $SCRIPTS + fi fi fi }