Adding script for passwd.
authorDaniel Baumann <daniel@debian.org>
Fri, 7 Dec 2012 15:49:21 +0000 (16:49 +0100)
committerDaniel Baumann <daniel@debian.org>
Fri, 7 Dec 2012 15:49:21 +0000 (16:49 +0100)
scripts/debconfig/0010-passwd [new file with mode: 0755]
scripts/debconfig/0010-passwd.templates [new file with mode: 0644]

diff --git a/scripts/debconfig/0010-passwd b/scripts/debconfig/0010-passwd
new file mode 100755 (executable)
index 0000000..b5813f7
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+## live-debconfig(7) - System Configuration Scripts
+## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
+##
+## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+## This is free software, and you are welcome to redistribute it
+## under certain conditions; see COPYING for details.
+
+
+set -e
+
+DEBCONF_SYSTEMRC="/var/lib/live/debconfig/systemrc"
+export DEBCONF_SYSTEMRC
+
+. /usr/share/debconf/confmodule
+
+db_get live-debconfig/passwd/shadow
+_SHADOW="${RET}" # boolean
+
+db_set live-debconfig/passwd/shadow "${_SHADOW}"
+db_fset live-debconfig/passwd/shadow seen false
+
+db_settitle live-debconfig/title
+db_input high live-debconfig/passwd/shadow || true
+db_go
+
+db_get live-debconfig/passwd/shadow
+_SHADOW="${RET}" # boolean
+
+db_stop
+
+# Setup passwd
+
+case "${_SHADOW}" in
+       true)
+               shadowconfig on
+               ;;
+
+       false)
+               shadowconfig off
+               ;;
+esac
diff --git a/scripts/debconfig/0010-passwd.templates b/scripts/debconfig/0010-passwd.templates
new file mode 100644 (file)
index 0000000..1859fe3
--- /dev/null
@@ -0,0 +1,9 @@
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/passwd/shadow
+Type: boolean
+Default: true
+Description: live-debconfig: Shadow passwords?
+ Should the current system use shadow passwords?