gluon-lock-password: convert to invariant script and remove legacy script
This commit is contained in:
parent
6f11279438
commit
7940bad4a9
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
has_root_pwd() {
|
||||
local pwd=$([ -f "$1" ] && cat "$1")
|
||||
pwd="${pwd#*root:}"
|
||||
pwd="${pwd%%:*}"
|
||||
|
||||
test -n "${pwd#[\!x]}"
|
||||
}
|
||||
|
||||
|
||||
has_root_pwd /etc/passwd || has_root_pwd /etc/shadow || passwd -l root
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
passwd -l root
|
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
has_root_pwd() {
|
||||
local pwd
|
||||
|
||||
pwd=$([ -f "$1" ] && cat "$1")
|
||||
pwd="${pwd#*root:}"
|
||||
pwd="${pwd%%:*}"
|
||||
|
||||
test -n "${pwd}"
|
||||
}
|
||||
|
||||
has_root_pwd /etc/shadow || passwd -l root
|
Loading…
Reference in New Issue
Block a user