32 lines
872 B
Bash
32 lines
872 B
Bash
#!/bin/sh -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
db_fget nagios3/adminpassword seen || true
|
|
password_seen="$RET"
|
|
|
|
if [ "$1" = "reconfigure" ]; then
|
|
password_seen=false
|
|
fi
|
|
|
|
if [ "$rootpassword_seen" != "true" ]; then
|
|
while [ ! "$passwordsmatch" ]; do
|
|
db_input high nagios3/adminpassword || true
|
|
db_input high nagios3/adminpassword-repeat || true
|
|
db_go || true
|
|
db_get nagios3/adminpassword
|
|
p1="$RET"
|
|
db_get nagios3/adminpassword-repeat
|
|
p2="$RET"
|
|
if [ "$p1" = "$p2" ]; then
|
|
passwordsmatch="yes"
|
|
else
|
|
db_fset nagios3/adminpassword seen false
|
|
db_fset nagios3/adminpassword-repeat seen false
|
|
db_fset nagios3/adminpassword-mismatch seen false
|
|
db_input critical nagios3/adminpassword-mismatch || true
|
|
fi
|
|
done
|
|
fi
|
|
db_go || true
|