From e6f2eaf47a177a8eca054d1d70a1b6287e8c3521 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 3 Jun 2024 16:01:35 +0200 Subject: Adding upstream version 102. Signed-off-by: Daniel Baumann --- modules.d/98dracut-systemd/dracut-cmdline.sh | 10 ++++++---- modules.d/98dracut-systemd/dracut-emergency.sh | 8 ++++---- modules.d/98dracut-systemd/dracut-initqueue.sh | 2 +- modules.d/98dracut-systemd/dracut-mount.sh | 2 +- modules.d/98dracut-systemd/dracut-pre-mount.sh | 2 +- modules.d/98dracut-systemd/dracut-pre-pivot.sh | 4 ++-- modules.d/98dracut-systemd/dracut-pre-trigger.sh | 2 +- modules.d/98dracut-systemd/dracut-pre-udev.sh | 12 +++--------- modules.d/98dracut-systemd/module-setup.sh | 5 ++++- 9 files changed, 23 insertions(+), 24 deletions(-) (limited to 'modules.d/98dracut-systemd') diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh index 646fead..d2919e1 100755 --- a/modules.d/98dracut-systemd/dracut-cmdline.sh +++ b/modules.d/98dracut-systemd/dracut-cmdline.sh @@ -6,7 +6,7 @@ fi type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh [ -f /usr/lib/initrd-release ] && . /usr/lib/initrd-release -[ -n "$VERSION" ] && info "dracut-$VERSION" +[ -n "$DRACUT_VERSION" ] && info "dracut-$DRACUT_VERSION" if ! getargbool 1 'rd.hostonly'; then [ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf @@ -17,8 +17,10 @@ fi info "Using kernel command line parameters:" "$(getcmdline)" -getargbool 0 rd.udev.log-priority=info -d rd.udev.info -d -n -y rdudevinfo && echo 'udev_log="info"' >> /etc/udev/udev.conf -getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && echo 'udev_log="debug"' >> /etc/udev/udev.conf +getargbool 0 rd.udev.log_level=info -d rd.udev.log-priority=info -d rd.udev.info -d -y rdudevinfo \ + && echo 'udev_log="info"' >> /etc/udev/udev.conf +getargbool 0 rd.udev.log_level=debug -d rd.udev.log-priority=debug -d rd.udev.debug -d -y rdudevdebug \ + && echo 'udev_log="debug"' >> /etc/udev/udev.conf source_conf /etc/conf.d @@ -45,7 +47,7 @@ export fstype make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' # run scriptlets to parse the command line -getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" +getargs 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline" source_hook cmdline [ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh index c6637a5..bc396fc 100755 --- a/modules.d/98dracut-systemd/dracut-emergency.sh +++ b/modules.d/98dracut-systemd/dracut-emergency.sh @@ -39,20 +39,20 @@ else export hook="shutdown-emergency" warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." source_hook "$hook" - [ -z "$_emergency_action" ] && _emergency_action=halt + [ -z "$_emergency_action" ] && _emergency_action=poweroff fi /bin/rm -f -- /.console_lock case "$_emergency_action" in reboot) - reboot || exit 1 + reboot -f || exit 1 ;; poweroff) - poweroff || exit 1 + poweroff -f || exit 1 ;; halt) - halt || exit 1 + halt -f || exit 1 ;; esac diff --git a/modules.d/98dracut-systemd/dracut-initqueue.sh b/modules.d/98dracut-systemd/dracut-initqueue.sh index ce919ce..b0882db 100755 --- a/modules.d/98dracut-systemd/dracut-initqueue.sh +++ b/modules.d/98dracut-systemd/dracut-initqueue.sh @@ -9,7 +9,7 @@ type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh source_conf /etc/conf.d make_trace_mem "hook initqueue" '1:shortmem' '2+:mem' '3+:slab' -getarg 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" +getargs 'rd.break=initqueue' -d 'rdbreak=initqueue' && emergency_shell -n initqueue "Break before initqueue" RDRETRY=$(getarg rd.retry -d 'rd_retry=') RDRETRY=${RDRETRY:-180} diff --git a/modules.d/98dracut-systemd/dracut-mount.sh b/modules.d/98dracut-systemd/dracut-mount.sh index 7892941..3e58126 100755 --- a/modules.d/98dracut-systemd/dracut-mount.sh +++ b/modules.d/98dracut-systemd/dracut-mount.sh @@ -9,7 +9,7 @@ source_conf /etc/conf.d make_trace_mem "hook mount" '1:shortmem' '2+:mem' '3+:slab' -getarg 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break before mount" +getargs 'rd.break=mount' -d 'rdbreak=mount' && emergency_shell -n mount "Break before mount" # mount scripts actually try to mount the root filesystem, and may # be sourced any number of times. As soon as one succeeds, no more are sourced. i=0 diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.sh b/modules.d/98dracut-systemd/dracut-pre-mount.sh index ee51605..d7482c5 100755 --- a/modules.d/98dracut-systemd/dracut-pre-mount.sh +++ b/modules.d/98dracut-systemd/dracut-pre-mount.sh @@ -11,7 +11,7 @@ source_conf /etc/conf.d make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' # pre pivot scripts are sourced just before we doing cleanup and switch over # to the new root. -getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break before pre-mount" +getargs 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break before pre-mount" source_hook pre-mount export -p > /dracut-state.sh diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh index 8bf2325..fa81b33 100755 --- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh +++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh @@ -11,11 +11,11 @@ source_conf /etc/conf.d make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' # pre pivot scripts are sourced just before we doing cleanup and switch over # to the new root. -getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break before pre-pivot" +getargs 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break before pre-pivot" source_hook pre-pivot # pre pivot cleanup scripts are sourced just before we switch over to the new root. -getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break before cleanup" +getargs 'rd.break=cleanup' -d 'rdbreak=cleanup' && emergency_shell -n cleanup "Break before cleanup" source_hook cleanup _bv=$(getarg rd.break -d rdbreak) && [ -z "$_bv" ] \ diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.sh b/modules.d/98dracut-systemd/dracut-pre-trigger.sh index dd0215e..8758ba9 100755 --- a/modules.d/98dracut-systemd/dracut-pre-trigger.sh +++ b/modules.d/98dracut-systemd/dracut-pre-trigger.sh @@ -12,7 +12,7 @@ make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' source_hook pre-trigger -getarg 'rd.break=pre-trigger' 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" +getargs 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger" udevadm control --reload > /dev/null 2>&1 || : diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.sh b/modules.d/98dracut-systemd/dracut-pre-udev.sh index feab32c..9c8ac9d 100755 --- a/modules.d/98dracut-systemd/dracut-pre-udev.sh +++ b/modules.d/98dracut-systemd/dracut-pre-udev.sh @@ -10,15 +10,11 @@ source_conf /etc/conf.d make_trace_mem "hook pre-udev" '1:shortmem' '2+:mem' '3+:slab' # pre pivot scripts are sourced just before we doing cleanup and switch over # to the new root. -getarg 'rd.break=pre-udev' 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" +getargs 'rd.break=pre-udev' -d 'rdbreak=pre-udev' && emergency_shell -n pre-udev "Break before pre-udev" source_hook pre-udev -_modprobe_d=/etc/modprobe.d -if [ -d /usr/lib/modprobe.d ]; then - _modprobe_d=/usr/lib/modprobe.d -elif [ -d /lib/modprobe.d ]; then - _modprobe_d=/lib/modprobe.d -elif [ ! -d $_modprobe_d ]; then +_modprobe_d=/run/modprobe.d +if [ ! -d $_modprobe_d ]; then mkdir -p $_modprobe_d fi @@ -31,8 +27,6 @@ for i in $(getargs rd.driver.pre -d rdloaddriver=); do ) done -[ -d /etc/modprobe.d ] || mkdir -p /etc/modprobe.d - for i in $(getargs rd.driver.blacklist -d rdblacklist=); do ( IFS=, diff --git a/modules.d/98dracut-systemd/module-setup.sh b/modules.d/98dracut-systemd/module-setup.sh index 3195377..0ea26d4 100755 --- a/modules.d/98dracut-systemd/module-setup.sh +++ b/modules.d/98dracut-systemd/module-setup.sh @@ -4,12 +4,15 @@ check() { [[ $mount_needs ]] && return 1 + # If the binary(s) requirements are not fulfilled the module can't be installed + require_binaries "$systemdutildir"/systemd || return 1 + return 0 } # called by dracut depends() { - echo "systemd-initrd" + echo "systemd-initrd systemd-ask-password" return 0 } -- cgit v1.2.3