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 [copied from examples/live-debconfig-foobar/scripts/9000-foobar with 54% similarity]
scripts/debconfig/0010-passwd.templates [new file with mode: 0644]

similarity index 54%
copy from examples/live-debconfig-foobar/scripts/9000-foobar
copy to scripts/debconfig/0010-passwd
index 59390e3..b5813f7 100755 (executable)
@@ -15,33 +15,29 @@ export DEBCONF_SYSTEMRC
 
 . /usr/share/debconf/confmodule
 
-Defaults ()
-{
-       if [ -z "${_FOO}" ]
-       then
-               # FIXME
-       fi
-}
+db_get live-debconfig/passwd/shadow
+_SHADOW="${RET}" # boolean
 
-db_get live-debconfig/foobar/foo
-_FOO="${RET}" # string (w/o empty)
-
-Defaults
-
-db_set live-debconfig/foobar/foo "${_FOO}"
-db_fset live-debconfig/foobar/foo seen false
+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/foobar/foo || true
+db_input high live-debconfig/passwd/shadow || true
 db_go
 
-db_get live-debconfig/foobar/foo
-_FOO="${RET}" # string (w/o empty)
-
-Defaults
+db_get live-debconfig/passwd/shadow
+_SHADOW="${RET}" # boolean
 
 db_stop
 
-# Set foo
-echo "${_FOO}" > /etc/foo.tmp
-mv /etc/foo.tmp /etc/foo
+# 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?