X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=0e962c5844dae3260ff81730bc3eac5d7cf2851f;hp=06265e8de32e3a859e575e511745d0fe81ec3c0a;hb=ad36d36db7fd095f60da16867200b805733ca2dd;hpb=12e47aed34dc3c59822af79dfec0a93fec810e00 diff --git a/autoconfig.functions b/autoconfig.functions index 06265e8..0e962c5 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -42,9 +42,9 @@ if [ -z "$CMDLINE" ]; then [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/* | tr '\n' ' ')" modprobe 9p 2>/dev/null || true if grep -q 9p /proc/filesystems ; then - local TAG="grml-parameters" + TAG="grml-parameters" if grep -q "$TAG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then - local MOUNTDIR="$(mktemp -d)" + MOUNTDIR="$(mktemp -d)" mount -t 9p -o trans=virtio,ro "$TAG" "$MOUNTDIR" CMDLINE="$CMDLINE $(cat "$MOUNTDIR"/* 2>/dev/null | tr '\n' ' ')" umount "$MOUNTDIR" @@ -1126,7 +1126,7 @@ fi # {{{ display hostkeys of SSH server config_display_ssh_fingerprints() { - if ! find /etc/ssh/ -name ssh_host_\*_key >/dev/null 2>&1 ; then + if ! ls /etc/ssh/ssh_host_\*_key >/dev/null 2>&1 ; then return 0 # no SSH host keys present fi @@ -1570,6 +1570,7 @@ DCSMP="/mnt/grml" GRMLCFG="$(getbootparam 'autoconfig' 2>>$DEBUG)" [ -n "$GRMLCFG" ] || GRMLCFG="GRMLCFG" if checkbootparam 'noautoconfig' || checkbootparam 'forensic' ; then + DCSDIR="/live/image" # set default so it works for "scripts" boot option as expected ewarn "Skipping running automount of device(s) labeled $GRMLCFG as requested." ; eend 0 else if [ -z "$INSTALLED" ] ; then @@ -1703,7 +1704,7 @@ if checkbootparam 'scripts' || [ "$DCSMP" = "/mnt/grmlcfg" ]; then sh -c $SCRIPTS elif [ -d "$SCRIPTS" ]; then einfo "Bootparameter scripts found. Trying to execute from directory ${SCRIPTS}:" - run-parts $SCRIPTS + run-parts --regex '.*' $SCRIPTS else einfo "Bootparameter scripts found. Trying to execute ${SCRIPTS}:" sh -c $SCRIPTS