Update check for sulogin under systemd.

The default rescue.service unit file was updated
in the systemd repo on Jan 23, 2015
to allow for sulogin location variability.
This commit is contained in:
Aneesh Agrawal 2015-04-27 03:07:45 -04:00
parent 474d69dfd6
commit d282fbfc9c
1 changed files with 1 additions and 1 deletions

View File

@ -702,7 +702,7 @@
if [ -f /usr/lib/systemd/system/rescue.service ]; then if [ -f /usr/lib/systemd/system/rescue.service ]; then
logtext "Result: file /usr/lib/systemd/system/rescue.service" logtext "Result: file /usr/lib/systemd/system/rescue.service"
logtext "Test: checking presence sulogin for single user mode" logtext "Test: checking presence sulogin for single user mode"
FIND=`egrep "^ExecStart=-(/usr)?/sbin/sulogin" /usr/lib/systemd/system/rescue.service` FIND=`egrep "^ExecStart=-(/bin/sh -c \")?(/usr)?/(s)?bin/sulogin" /usr/lib/systemd/system/rescue.service`
if [ ! "${FIND}" = "" ]; then if [ ! "${FIND}" = "" ]; then
FOUND=1 FOUND=1
logtext "Result: found sulogin, so single user is protected" logtext "Result: found sulogin, so single user is protected"