Refactoring cmdline parsing within middleend components.
authorDaniel Baumann <mail@daniel-baumann.ch>
Mon, 24 Jun 2013 16:24:27 +0000 (18:24 +0200)
committerDaniel Baumann <mail@daniel-baumann.ch>
Mon, 24 Jun 2013 16:24:27 +0000 (18:24 +0200)
27 files changed:
middleend/0010-debconf
middleend/0020-hostname
middleend/0030-live-debconfig_passwd
middleend/0040-sudo
middleend/0050-locales
middleend/0060-locales-all
middleend/0070-tzdata
middleend/0080-gdm3
middleend/0090-kdm
middleend/0100-lightdm
middleend/0110-lxdm
middleend/0120-nodm
middleend/0130-slim
middleend/0150-keyboard-configuration
middleend/0160-sysvinit
middleend/0170-sysv-rc
middleend/1020-gnome-panel-data
middleend/1030-gnome-power-manager
middleend/1040-gnome-screensaver
middleend/1050-kaboom
middleend/1060-kde-services
middleend/1070-debian-installer-launcher
middleend/1080-policykit
middleend/1120-util-linux
middleend/1140-xserver-xorg
middleend/1170-xfce4-panel
middleend/9990-hooks

index fae1ed9..e994f6b 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/debconf.list ] || \
-          [ -e /var/lib/live/config/debconf ]
-       then
-               exit 0
-       fi
-
-       echo -n " debconf"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/debconf.list ] || \
+          [ -e /var/lib/live/config/debconf ]
+       then
+               exit 0
+       fi
+
+       echo -n " debconf"
+}
+
 Config ()
 {
        if [ -z "${LIVE_DEBCONF_PRESEED}" ]
@@ -85,5 +88,6 @@ Config ()
        touch /var/lib/live/config/debconf
 }
 
+Cmdline
 Init
 Config
index 702d83e..d55c229 100755 (executable)
@@ -10,7 +10,7 @@
 
 set -e
 
-Init ()
+Cmdline ()
 {
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
@@ -21,7 +21,10 @@ Init ()
                                ;;
                esac
        done
+}
 
+Init ()
+{
        # Checking if package is installed or already configured
        if [ -z "${LIVE_HOSTNAME}" ] || \
           [ -e /var/lib/live/config/hostname ]
@@ -74,5 +77,6 @@ EOF
        touch /var/lib/live/config/hostname
 }
 
+Cmdline
 Init
 Config
index 2a57a99..fec8473 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/live-debconfig.list ] || \
-          [ -e /var/lib/live/config/live-debconfig_passwd ]
-       then
-               exit 0
-       fi
-
-       echo -n " live-debconfig (passwd)"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -40,6 +31,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/live-debconfig.list ] || \
+          [ -e /var/lib/live/config/live-debconfig_passwd ]
+       then
+               exit 0
+       fi
+
+       echo -n " live-debconfig (passwd)"
+}
+
 Config ()
 {
        # Checking if package is already configured differently
@@ -92,5 +95,6 @@ EOF
        touch /var/lib/live/config/live-debconfig_passwd
 }
 
+Cmdline
 Init
 Config
index ffbd053..7150c8a 100755 (executable)
 
 set -e
 
+Cmdline ()
+{
+       # Reading kernel command line
+       for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
+       do
+               case "${_PARAMETER}" in
+                       live-config.username=*|username=*)
+                               LIVE_USERNAME="${_PARAMETER#*username=}"
+                               ;;
+               esac
+       done
+}
+
 Init ()
 {
        # Checking if package is installed or already configured
@@ -21,15 +34,6 @@ Init ()
 
        echo -n " sudo"
 
-       # Reading kernel command line
-       for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
-       do
-               case "${_PARAMETER}" in
-                       live-config.username=*|username=*)
-                               LIVE_USERNAME="${_PARAMETER#*username=}"
-                               ;;
-               esac
-       done
 }
 
 Config ()
@@ -77,5 +81,6 @@ EOF
        touch /var/lib/live/config/sudo
 }
 
+Cmdline
 Init
 Config
index 879e8ac..dac1d87 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/locales.list ] || \
-          [ -e /var/lib/live/config/locales ]
-       then
-               exit 0
-       fi
-
-       echo -n " locales"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/locales.list ] || \
+          [ -e /var/lib/live/config/locales ]
+       then
+               exit 0
+       fi
+
+       echo -n " locales"
+}
+
 Config ()
 {
        if echo "${LIVE_LOCALES}" | grep -qs ","
@@ -63,5 +66,6 @@ Config ()
        touch /var/lib/live/config/locales
 }
 
+Cmdline
 Init
 Config
index ccf14d6..911a5bf 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/locales-all.list ] || \
-          [ -e /var/lib/live/config/locales-all ]
-       then
-               exit 0
-       fi
-
-       echo -n " locales-all"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/locales-all.list ] || \
+          [ -e /var/lib/live/config/locales-all ]
+       then
+               exit 0
+       fi
+
+       echo -n " locales-all"
+}
+
 Config ()
 {
        if [ -n "${LIVE_LOCALES}" ]
@@ -52,5 +55,6 @@ Config ()
        touch /var/lib/live/config/locales-all
 }
 
+Cmdline
 Init
 Config
index 80da226..a93f6ac 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/tzdata.list ] || \
-          [ -e /var/lib/live/config/tzdata ]
-       then
-               exit 0
-       fi
-
-       echo -n " tzdata"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/tzdata.list ] || \
+          [ -e /var/lib/live/config/tzdata ]
+       then
+               exit 0
+       fi
+
+       echo -n " tzdata"
+}
+
 Config ()
 {
        if [ -n "${LIVE_TIMEZONE}" ]
@@ -57,5 +60,6 @@ EOF
        touch /var/lib/live/config/tzdata
 }
 
+Cmdline
 Init
 Config
index 33dec39..3a9ac80 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/gdm3.list ] || \
-          [ -e /var/lib/live/config/gdm3 ]
-       then
-               exit 0
-       fi
-
-       echo -n " gdm3"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/gdm3.list ] || \
+          [ -e /var/lib/live/config/gdm3 ]
+       then
+               exit 0
+       fi
+
+       echo -n " gdm3"
+}
+
 Config ()
 {
        # Checking if package is already configured
@@ -55,5 +58,6 @@ TimedLoginDelay=5"
        touch /var/lib/live/config/gdm3
 }
 
+Cmdline
 Init
 Config
index feccca6..01ad937 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/kdm.list ] || \
-          [ -e /var/lib/live/config/kdm ]
-       then
-               exit 0
-       fi
-
-       echo -n " kdm"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/kdm.list ] || \
+          [ -e /var/lib/live/config/kdm ]
+       then
+               exit 0
+       fi
+
+       echo -n " kdm"
+}
+
 Config ()
 {
        if [ ! -e /etc/kde4/kdm/kdmrc ]
@@ -62,5 +65,6 @@ Config ()
        touch /var/lib/live/config/kdm
 }
 
+Cmdline
 Init
 Config
index 7861b1e..886c88d 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/lightdm.list ] || \
-          [ -e /var/lib/live/config/lightdm ]
-       then
-               exit 0
-       fi
-
-       echo -n " lightdm"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/lightdm.list ] || \
+          [ -e /var/lib/live/config/lightdm ]
+       then
+               exit 0
+       fi
+
+       echo -n " lightdm"
+}
+
 Config ()
 {
        if [ -e /etc/lightdm/lightdm.conf ]
@@ -48,5 +51,6 @@ Config ()
        touch /var/lib/live/config/lightdm
 }
 
+Cmdline
 Init
 Config
index e12e37b..9bffb51 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/lxdm.list ] || \
-          [ -e /var/lib/live/config/lxdm ]
-       then
-               exit 0
-       fi
-
-       echo -n " lxdm"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/lxdm.list ] || \
+          [ -e /var/lib/live/config/lxdm ]
+       then
+               exit 0
+       fi
+
+       echo -n " lxdm"
+}
+
 Config ()
 {
        # Debian
@@ -57,5 +60,6 @@ Config ()
        touch /var/lib/live/config/lxdm
 }
 
+Cmdline
 Init
 Config
index 07355c1..e0f5cd2 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/nodm.list ] || \
-          [ -e /var/lib/live/config/nodm ]
-       then
-               exit 0
-       fi
-
-       echo -n " nodm"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/nodm.list ] || \
+          [ -e /var/lib/live/config/nodm ]
+       then
+               exit 0
+       fi
+
+       echo -n " nodm"
+}
+
 Config ()
 {
        # autologin
@@ -54,5 +57,6 @@ EOF
        touch /var/lib/live/config/nodm
 }
 
+Cmdline
 Init
 Config
index 42b6614..307ba12 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/slim.list ] || \
-          [ -e /var/lib/live/config/slim ]
-       then
-               exit 0
-       fi
-
-       echo -n " slim"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/slim.list ] || \
+          [ -e /var/lib/live/config/slim ]
+       then
+               exit 0
+       fi
+
+       echo -n " slim"
+}
+
 Config ()
 {
        # Checking if package is already configured differently
@@ -52,5 +55,6 @@ Config ()
        touch /var/lib/live/config/slim
 }
 
+Cmdline
 Init
 Config
index 793ed50..3b1fc67 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/keyboard-configuration.list ] || \
-          [ -e /var/lib/live/config/keyboard-configuration ]
-       then
-               exit 0
-       fi
-
-       echo -n " keyboard-configuration"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -44,6 +35,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/keyboard-configuration.list ] || \
+          [ -e /var/lib/live/config/keyboard-configuration ]
+       then
+               exit 0
+       fi
+
+       echo -n " keyboard-configuration"
+}
+
 Config ()
 {
        if [ -n "${LIVE_KEYBOARD_LAYOUTS}" ]
@@ -84,5 +87,6 @@ Config ()
        fi
 }
 
+Cmdline
 Init
 Config
index a90d325..3d15995 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/sysvinit.list ] || \
-          [ -e /var/lib/live/config/sysvinit ]
-       then
-               exit 0
-       fi
-
-       echo -n " sysvinit"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/sysvinit.list ] || \
+          [ -e /var/lib/live/config/sysvinit ]
+       then
+               exit 0
+       fi
+
+       echo -n " sysvinit"
+}
+
 Config ()
 {
        # Disable tmpfs on /tmp
@@ -49,5 +52,6 @@ Config ()
        touch /var/lib/live/config/sysvinit
 }
 
+Cmdline
 Init
 Config
index 1782c13..457d460 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/sysv-rc.list ] || \
-          [ -e /var/lib/live/config/sysv-rc ]
-       then
-               exit 0
-       fi
-
-       echo -n " sysv-rc"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/sysv-rc.list ] || \
+          [ -e /var/lib/live/config/sysv-rc ]
+       then
+               exit 0
+       fi
+
+       echo -n " sysv-rc"
+}
+
 Config ()
 {
        if [ -n "${LIVE_SYSV_RC}" ]
@@ -47,5 +50,6 @@ Config ()
        touch /var/lib/live/config/sysv-rc
 }
 
+Cmdline
 Init
 Config
index 5a1b5a1..72db446 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/gnome-panel-data.list ] || \
-          [ -e /var/lib/live/config/gnome-panel-data ]
-       then
-               exit 0
-       fi
-
-       echo -n " gnome-panel-data"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/gnome-panel-data.list ] || \
+          [ -e /var/lib/live/config/gnome-panel-data ]
+       then
+               exit 0
+       fi
+
+       echo -n " gnome-panel-data"
+}
+
 Config ()
 {
        sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
@@ -40,5 +43,6 @@ Config ()
        touch /var/lib/live/config/gnome-panel-data
 }
 
+Cmdline
 Init
 Config
index c05ba0d..c174fbf 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/gnome-power-manager.list ] || \
-          [ -e /var/lib/live/config/gnome-power-manager ]
-       then
-               exit 0
-       fi
-
-       echo -n " gnome-power-manager"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/gnome-power-manager.list ] || \
+          [ -e /var/lib/live/config/gnome-power-manager ]
+       then
+               exit 0
+       fi
+
+       echo -n " gnome-power-manager"
+}
+
 Config ()
 {
        # Not authorizing the user to hibernate the computer
@@ -42,5 +45,6 @@ Config ()
        touch /var/lib/live/config/gnome-power-manager
 }
 
+Cmdline
 Init
 Config
index 5dd88a1..eb13db9 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/gnome-screensaver.list ] || \
-          [ -e /var/lib/live/config/gnome-screensaver ]
-       then
-               exit 0
-       fi
-
-       echo -n " gnome-screensaver"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/gnome-screensaver.list ] || \
+          [ -e /var/lib/live/config/gnome-screensaver ]
+       then
+               exit 0
+       fi
+
+       echo -n " gnome-screensaver"
+}
+
 Config ()
 {
        # Disabling to lock the screen when the screensaver goes active.
@@ -41,5 +44,6 @@ Config ()
        touch /var/lib/live/config/gnome-screensaver
 }
 
+Cmdline
 Init
 Config
index aaeb3db..edd871f 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/kaboom.list ] || \
-          [ -e /var/lib/live/config/kaboom ]
-       then
-               exit 0
-       fi
-
-       echo -n " kaboom"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/kaboom.list ] || \
+          [ -e /var/lib/live/config/kaboom ]
+       then
+               exit 0
+       fi
+
+       echo -n " kaboom"
+}
+
 Config ()
 {
        sudo -u "${LIVE_USERNAME}" sh -c "mkdir -p /home/${LIVE_USERNAME}/.local && touch /home/${LIVE_USERNAME}/.local/kaboom"
@@ -40,5 +43,6 @@ Config ()
        touch /var/lib/live/config/kaboom
 }
 
+Cmdline
 Init
 Config
index f12dce1..482810a 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /usr/share/kde4 ] || \
-          [ -e /var/lib/live/config/kde-services ]
-       then
-               exit 0
-       fi
-
-       echo -n " kde-services"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -36,6 +27,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /usr/share/kde4 ] || \
+          [ -e /var/lib/live/config/kde-services ]
+       then
+               exit 0
+       fi
+
+       echo -n " kde-services"
+}
+
 Config ()
 {
        # Enabling keyboard selector
@@ -79,5 +82,6 @@ EOF
        touch /var/lib/live/config/kde-services
 }
 
+Cmdline
 Init
 Config
index 355ea40..270943d 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/debian-installer-launcher.list ] || \
-          [ -e /var/lib/live/config/debian-installer-launcher ]
-       then
-               exit 0
-       fi
-
-       echo -n " debian-installer-launcher"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/debian-installer-launcher.list ] || \
+          [ -e /var/lib/live/config/debian-installer-launcher ]
+       then
+               exit 0
+       fi
+
+       echo -n " debian-installer-launcher"
+}
+
 Config ()
 {
        # KDE4 needs the desktop file somewhere else,
@@ -49,5 +52,6 @@ Config ()
        touch /var/lib/live/config/debian-installer-launcher
 }
 
+Cmdline
 Init
 Config
index 3f7e5be..5be0647 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed
-       if [ ! -e /var/lib/dpkg/info/policykit-1.list ] || \
-          [ -e /var/lib/live/config/policykit ]
-       then
-               exit 0
-       fi
-
-       echo -n " policykit"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed
+       if [ ! -e /var/lib/dpkg/info/policykit-1.list ] || \
+          [ -e /var/lib/live/config/policykit ]
+       then
+               exit 0
+       fi
+
+       echo -n " policykit"
+}
+
 Config ()
 {
        # Grant administrative PolicyKit pivilieges to default user
@@ -86,5 +89,6 @@ EOF
        touch /var/lib/live/config/policykit
 }
 
+Cmdline
 Init
 Config
index c9c4414..032b6c7 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed
-       if [ ! -e /var/lib/dpkg/info/util-linux.list ] || \
-          [ -e /var/lib/live/config/util-linux ]
-       then
-               exit 0
-       fi
-
-       echo -n " util-linux"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed
+       if [ ! -e /var/lib/dpkg/info/util-linux.list ] || \
+          [ -e /var/lib/live/config/util-linux ]
+       then
+               exit 0
+       fi
+
+       echo -n " util-linux"
+}
+
 Config ()
 {
        rm -f /etc/rc?.d/*hwclock*
@@ -64,5 +67,6 @@ EOF
        touch /var/lib/live/config/util-linux
 }
 
+Cmdline
 Init
 Config
index 8c805fe..46d6fba 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed
-       if [ ! -e /var/lib/dpkg/info/xserver-xorg.list ] || \
-          [ -e /var/lib/live/config/xserver-xorg ]
-       then
-               exit 0
-       fi
-
-       echo -n " xserver-xorg"
-
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
                case "${_PARAMETER}" in
@@ -55,6 +46,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed
+       if [ ! -e /var/lib/dpkg/info/xserver-xorg.list ] || \
+          [ -e /var/lib/live/config/xserver-xorg ]
+       then
+               exit 0
+       fi
+
+       echo -n " xserver-xorg"
+}
+
 Config ()
 {
        if [ -n "${LIVE_KEYBOARD_MODEL}" ]
@@ -220,5 +223,6 @@ EOF
        fi
 }
 
+Cmdline
 Init
 Config
index 4ef04cc..44164ec 100755 (executable)
 
 set -e
 
-Init ()
+Cmdline ()
 {
-       # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/xfce4-panel.list ] || \
-          [ -e /var/lib/live/config/xfce4-panel ]
-       then
-               exit 0
-       fi
-
-       echo -n " xfce4-panel"
-
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
        do
@@ -32,6 +23,18 @@ Init ()
        done
 }
 
+Init ()
+{
+       # Checking if package is installed or already configured
+       if [ ! -e /var/lib/dpkg/info/xfce4-panel.list ] || \
+          [ -e /var/lib/live/config/xfce4-panel ]
+       then
+               exit 0
+       fi
+
+       echo -n " xfce4-panel"
+}
+
 Config ()
 {
        if [ ! -e /home/"${LIVE_USERNAME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml ]
@@ -44,5 +47,6 @@ Config ()
        touch /var/lib/live/config/xfce4-panel
 }
 
+Cmdline
 Init
 Config
index 33a7f50..ce63e77 100755 (executable)
@@ -10,7 +10,7 @@
 
 set -e
 
-Init ()
+Cmdline ()
 {
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
@@ -21,7 +21,10 @@ Init ()
                                ;;
                esac
        done
+}
 
+Init ()
+{
        if [ -z "${LIVE_HOOKS}" ]
        then
                exit 0
@@ -32,11 +35,6 @@ Init ()
 
 Config ()
 {
-       if [ -z "${LIVE_HOOKS}" ]
-       then
-               exit 0
-       fi
-
        for _HOOK in $(echo ${LIVE_HOOKS} | sed -e 's/|/ /g')
        do
                case "${_HOOK}" in
@@ -81,5 +79,6 @@ Config ()
        done
 }
 
+Cmdline
 Init
 Config