Improve check for ctrl-alt-del

This commit is contained in:
Bob Mottram 2016-11-30 16:04:05 +00:00
parent b106d14890
commit d4c07b2cc8
1 changed files with 4 additions and 2 deletions

View File

@ -1,10 +1,12 @@
#!/bin/bash
if [ -f /etc/systemd/system/ctrl-alt-del.target ];then
if [ -L /etc/systemd/system/ctrl-alt-del.target ];then
ctrl_alt_del=$(ls -l /etc/systemd/system/ctrl-alt-del.target)
if [[ "$ctrl_alt_del" != *'/dev/null' ]]; then
exit 1
fi
else
if [ -f /etc/systemd/system/ctrl-alt-del.target ];then
exit 1
fi
fi