This commit is contained in:
Patrick Schleizer 2023-01-07 15:12:15 -05:00
parent c3a822af0e
commit bb2f0a3c44
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -7,10 +7,10 @@
set -x set -x
set -e set -e
# Get the kernel command-line arguments ## Get the kernel command-line arguments
cmdline=$(cat /proc/cmdline) cmdline=$(cat /proc/cmdline)
# Get the current boot image ## Get the current boot image
kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2) kernel=$(echo "$cmdline" | grep -o 'BOOT_IMAGE=\S*' | cut -d '=' -f 2)
initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#") initrd=$(echo "$kernel" | sed "s#vmlinuz#initrd.img#")
@ -34,7 +34,7 @@ elif systemctl list-jobs | grep "halt.target" | grep -q "start"; then
wiperamexit="yes" wiperamexit="yes"
wiperamaction="halt" wiperamaction="halt"
else else
echo "$0: ERROR: No shutdown option found!" echo "$0: INFO: No shutdown option found!"
exit 0 exit 0
fi fi