mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-11 00:10:00 +07:00
refactoring
This commit is contained in:
@ -29,17 +29,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if systemctl list-jobs | grep "poweroff.target" | grep -q "start"; then
|
if systemctl list-jobs | grep "poweroff.target" | grep -q "start"; then
|
||||||
wram="yes"
|
wiperamexit="yes"
|
||||||
wact="poweroff"
|
wiperamaction="poweroff"
|
||||||
elif systemctl list-jobs | grep "reboot.target" | grep -q "start"; then
|
elif systemctl list-jobs | grep "reboot.target" | grep -q "start"; then
|
||||||
wram="yes"
|
wiperamexit="yes"
|
||||||
wact="reboot"
|
wiperamaction="reboot"
|
||||||
elif systemctl list-jobs | grep "halt.target" | grep -q "start"; then
|
elif systemctl list-jobs | grep "halt.target" | grep -q "start"; then
|
||||||
wram="yes"
|
wiperamexit="yes"
|
||||||
wact="halt"
|
wiperamaction="halt"
|
||||||
else
|
else
|
||||||
echo "$0: ERROR: No shutdown option found!"
|
echo "$0: ERROR: No shutdown option found!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kexec -l "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wram wiperamaction=$wact"
|
kexec -l "$kernel" --initrd="$initrd" --reuse-cmdline --append="wiperamexit=$wiperamexit wiperamaction=$wiperamaction"
|
||||||
|
Reference in New Issue
Block a user