mirror of
https://github.com/gryf/mkinitramfs.git
synced 2025-12-19 04:20:19 +01:00
Force to poweroff, otherwise kerel panic would result instead.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user