9b172bbaf4
Moving the scripts to a common directory not only vastly simplifies the zzz-gluon-upgrade script, but also allows to define an ordering of such scripts across packages.
14 lines
176 B
Bash
Executable File
14 lines
176 B
Bash
Executable File
#!/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
|