Przeglądaj źródła

Improve check for ctrl-alt-del

Bob Mottram 8 lat temu
rodzic
commit
d4c07b2cc8
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4
    2
      tests/check-ctrl-alt-del.sh

+ 4
- 2
tests/check-ctrl-alt-del.sh Wyświetl plik

1
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
-if [ -f /etc/systemd/system/ctrl-alt-del.target ];then
3
+if [ -L /etc/systemd/system/ctrl-alt-del.target ];then
4
     ctrl_alt_del=$(ls -l /etc/systemd/system/ctrl-alt-del.target)
4
     ctrl_alt_del=$(ls -l /etc/systemd/system/ctrl-alt-del.target)
5
     if [[ "$ctrl_alt_del" !=  *'/dev/null' ]]; then
5
     if [[ "$ctrl_alt_del" !=  *'/dev/null' ]]; then
6
         exit 1
6
         exit 1
7
     fi
7
     fi
8
 else
8
 else
9
-    exit 1
9
+    if [ -f /etc/systemd/system/ctrl-alt-del.target ];then
10
+        exit 1
11
+    fi
10
 fi
12
 fi