gluon/package/gluon-lock-password/files/lib/gluon/upgrade/100-lock-password
Matthias Schiffer 9b172bbaf4 Move all upgrade scripts to a common directory
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.
2015-01-24 11:27:47 +01:00

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