--debconfig)
# Run all scripts
- _SCRIPTS="$(ls /lib/live/debconfig/* | grep -v '\.templates$')"
+ _SCRIPTS="$(ls /lib/live/debconfig/????-* | grep -v '\.templates$')"
;;
--nodebconfig=*)
# Don't run requested scripts
- _SCRIPTS="$(ls /lib/live/debconfig/* | grep -v '\.templates$')"
+ _SCRIPTS="$(ls /lib/live/debconfig/????-* | grep -v '\.templates$')"
LIVE_NODEBCONFIGS="${_PARAMETER#*nodebconfig=}"
;;
--debug)
LIVE_DEBUG="true"
;;
+
+ *)
+ echo "Usage: live-debconfig"
+ echo "Usage: live-debconfig --debconfig|--debconfig=SCRIPT1,SCRIPT2,SCRIPT3"
+ echo "Usage: live-debconfig --nodebconfig|--nodebconfig=SCRIPT1,SCRIPT2,SCRIPT3"
+ echo "Usage: live-debconfig --debug"
+ exit 1
+ ;;
esac
done
Main ()
{
- _CMDLINE="${@}"
-
- if [ -z "${_CMDLINE}" ]
- then
- echo "Usage: live-debconfig --debconfig|--debconfig=SCRIPT1,SCRIPT2,SCRIPT3"
- echo "Usage: live-debconfig --nodebconfig|--nodebconfig=SCRIPT1,SCRIPT2,SCRIPT3"
- echo "Usage: live-debconfig --debug"
- exit 1
- fi
-
# Reading configuration files
for _FILE in /etc/live/debconfig.conf /etc/live/debconfig/*
do
done
# Processing command line
+ _CMDLINE="${@}"
+
Cmdline
case "${LIVE_DEBUG}" in
Setup_debconf
+ if [ -z "${_SCRIPTS}" ]
+ then
+ /lib/live/debconfig/multiselect
+
+ . /var/lib/live/debconfig/multiselect
+ rm -f /var/lib/live/debconfig/multiselect
+ fi
+
# Configuring system
_SCRIPTS="$(echo ${_SCRIPTS} | sed -e 's| |\n|g' | sort -u)"
--- /dev/null
+#!/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
+
+_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|, $||')"
+
+if [ -n "${_SCRIPTS}" ]
+then
+ db_subst live-debconfig/scripts CHOICES "${_SCRIPTS}"
+ db_subst live-debconfig/scripts CHOICES_C "${_SCRIPTS_C}"
+
+ db_fset live-debconfig/scripts seen false
+
+ db_settitle live-debconfig/title
+ db_input high live-debconfig/scripts || true
+ db_go
+
+ db_get live-debconfig/scripts
+ _SCRIPTS="${RET}" # multiselect
+
+ echo "_SCRIPTS=\"${_SCRIPTS}\"" > /var/lib/live/debconfig/multiselect
+
+ db_stop
+fi
--- /dev/null
+Template: live-debconfig/title
+Type: title
+Description: live-debconfig: System Configuration
+
+Template: live-debconfig/scripts
+Type: multiselect
+Default:
+Choices: ${CHOICES}
+Choices-C: ${CHOICES_C}
+Description: live-debconfig: Scripts?
+ Which scripts should be run to configure the current system?