Support openSUSE location of sulogin binary

This commit is contained in:
mboelen 2015-02-13 15:09:37 +01:00
parent 7723f85d5c
commit 3ae5c61839

View File

@ -703,7 +703,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=`grep "^ExecStart=-/sbin/sulogin" /usr/lib/systemd/system/rescue.service` FIND=`egrep "^ExecStart=-(/usr)?/sbin/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"
@ -712,7 +712,7 @@
logtext "Result: did not find sulogin in rescue.service" logtext "Result: did not find sulogin in rescue.service"
AddHP 1 3 AddHP 1 3
Display --indent 2 --text "- Checking sulogin in rescue.service" --result "NOT FOUND" --color YELLOW Display --indent 2 --text "- Checking sulogin in rescue.service" --result "NOT FOUND" --color YELLOW
ReportSuggestion "Protect rescue.service by using sulogin" ReportSuggestion "${TEST_NO}" "Protect rescue.service by using sulogin"
fi fi
else else
logtext "Result: file /usr/lib/systemd/system/rescue.service does not exist" logtext "Result: file /usr/lib/systemd/system/rescue.service does not exist"