Also write script selection through command line into private debconf database.
authorDaniel Baumann <daniel@debian.org>
Thu, 6 Dec 2012 18:39:57 +0000 (19:39 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 6 Dec 2012 18:48:07 +0000 (19:48 +0100)
bin/live-debconfig
scripts/debconfig/multiselect

index df4b892..13b804a 100755 (executable)
@@ -155,13 +155,11 @@ Main ()
 
        Setup_debconf
 
-       if [ -z "${_SCRIPTS}" ]
-       then
-               /lib/live/debconfig/multiselect
+       # Show debconf multiselect dialog
+       /lib/live/debconfig/multiselect ${_SCRIPTS}
 
-               . /var/lib/live/debconfig/multiselect
-               rm -f /var/lib/live/debconfig/multiselect
-       fi
+       . /var/lib/live/debconfig/multiselect
+       rm -f /var/lib/live/debconfig/multiselect
 
        # Configuring system
        _SCRIPTS="$(echo ${_SCRIPTS} | sed -e 's| |\n|g' | sort -u)"
index 1aae7cd..babfeaa 100755 (executable)
@@ -15,6 +15,8 @@ export DEBCONF_SYSTEMRC
 
 . /usr/share/debconf/confmodule
 
+_CMDLINE="${@}"
+
 _SCRIPTS="$(for _SCRIPT in $(ls /lib/live/debconfig/????-* | grep -v '\.templates$' | sed -e 's|[0-9][0-9][0-9][0-9]-||g'); do echo -n "$(basename ${_SCRIPT}), "; done | sed -e 's|, $||')"
 _SCRIPTS_C="$(for _SCRIPT in $(ls /lib/live/debconfig/????-* | grep -v '\.templates$'); do echo -n "${_SCRIPT}, "; done | sed -e 's|, $||')"
 
@@ -23,6 +25,11 @@ then
        db_subst live-debconfig/scripts CHOICES "${_SCRIPTS}"
        db_subst live-debconfig/scripts CHOICES_C "${_SCRIPTS_C}"
 
+       if [ -n "${_CMDLINE}" ]
+       then
+               db_set live-debconfig/scripts ${_CMDLINE}
+       fi
+
        db_fset live-debconfig/scripts seen false
 
        db_settitle live-debconfig/title