Add fallback in config_scripts
[grml-autoconfig.git] / autoconfig.functions
index 5e7c807..9d1104f 100755 (executable)
@@ -720,7 +720,7 @@ if [ -d /proc/acpi ]; then
     else
       ewarn "(none)" ; eend 1
     fi
-    if ! ps x | grep -q /usr/sbin/acpid ; then
+    if ! ps x 2>>$DEBUG | grep -q /usr/sbin/acpid ; then
       if ! [ -r /var/run/dbus/pid ] ; then
         einfo "Starting acpi daemon."
         /etc/init.d/acpid start >>$DEBUG 2>&1 ; eend $?
@@ -1720,9 +1720,8 @@ if checkbootparam 'scripts' || [ "$DCSMP" = "/mnt/grmlcfg" ]; then
      # backwards compatibility: if no path is given get scripts from scripts/
      SCRIPTS="scripts/$SCRIPTS"
    fi
-   if [ "$DCSMP" = "/mnt/grmlcfg" ]; then
-     # we are executing from a GRMLCFG labeled fs
-     # kick everything we have done before and start over
+   if [ -z "$SCRIPTS" ]; then
+         # Fallback to test if DSCDIR/grml.sh exists
      SCRIPTS="$(cd ${DCSDIR}; /bin/ls -1d [Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)"
    fi
    if [ -n "$SCRIPTS" ]; then