1
0
mirror of https://github.com/gryf/mkinitramfs.git synced 2025-12-19 12:28:14 +01:00

Force to poweroff, otherwise kerel panic would result instead.

This commit is contained in:
2022-03-23 07:15:27 +01:00
parent 76e8532369
commit b04d83262c

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
Python2/3 compatible initrd generatin script Python2/3 compatible initrd generating script
""" """
import argparse import argparse
import json import json
@@ -54,6 +54,7 @@ find . -print0 | cpio --quiet --null -o -H newc | \\
gzip > %(arch)s gzip > %(arch)s
exit $? exit $?
""" """
INIT = """ INIT = """
DEVICE='' DEVICE=''
@@ -104,8 +105,7 @@ done
if [ -z "${DEVICE}" ]; then if [ -z "${DEVICE}" ]; then
echo "No LUKS device found to boot from! Giving up." echo "No LUKS device found to boot from! Giving up."
sleep 3 sleep 3
poweroff poweroff -f
exit
fi fi
for i in 0 1 2 ; do for i in 0 1 2 ; do