Making middleend standalone.
authorDaniel Baumann <mail@daniel-baumann.ch>
Mon, 24 Jun 2013 16:07:11 +0000 (18:07 +0200)
committerDaniel Baumann <mail@daniel-baumann.ch>
Mon, 24 Jun 2013 16:07:11 +0000 (18:07 +0200)
36 files changed:
frontend/live-config
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/0140-xinit
middleend/0150-keyboard-configuration
middleend/0160-sysvinit
middleend/0170-sysv-rc
middleend/1010-apport
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/1090-ssl-cert
middleend/1100-update-notifier
middleend/1110-anacron
middleend/1120-util-linux
middleend/1130-login
middleend/1140-xserver-xorg
middleend/1150-ureadahead
middleend/1160-openssh-server
middleend/1170-xfce4-panel
middleend/9990-hooks

index e22b009..0b1f18f 100755 (executable)
@@ -228,7 +228,7 @@ Main ()
        do
                [ "${LIVE_CONFIG_DEBUG}" = "true" ] && echo "[$(date +'%F %T')] live-config: ${_SCRIPT}" > /tmp/live-config.pipe
 
-               ${_SCRIPT} > /tmp/live-config.pipe 2>&1
+               ${_SCRIPT} > /tmp/live-config.pipe 2>&1
        done
 
        echo "." > /tmp/live-config.pipe
index cb0e95f..fae1ed9 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Debconf ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/debconf.list ] || \
           [ -e /var/lib/live/config/debconf ]
        then
-               return
+               exit 0
        fi
 
        echo -n " debconf"
@@ -28,15 +30,13 @@ Debconf ()
                                ;;
                esac
        done
-
-       Configure_debconf
 }
 
-Configure_debconf ()
+Config ()
 {
        if [ -z "${LIVE_DEBCONF_PRESEED}" ]
        then
-               return
+               exit 0
        fi
 
        for _PRESEED in $(echo ${LIVE_DEBCONF_PRESEED} | sed -e 's/|/ /g')
@@ -85,4 +85,5 @@ Configure_debconf ()
        touch /var/lib/live/config/debconf
 }
 
-Debconf
+Init
+Config
index 19fd082..702d83e 100755 (executable)
@@ -8,7 +8,9 @@
 ## under certain conditions; see COPYING for details.
 
 
-Hostname ()
+set -e
+
+Init ()
 {
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
@@ -24,15 +26,13 @@ Hostname ()
        if [ -z "${LIVE_HOSTNAME}" ] || \
           [ -e /var/lib/live/config/hostname ]
        then
-               return
+               exit 0
        fi
 
        echo -n " hostname"
-
-       Configure_hostname
 }
 
-Configure_hostname ()
+Config ()
 {
        # Change hostname only if it is not set
        if [ ! -e /etc/hostname ] || \
@@ -74,4 +74,5 @@ EOF
        touch /var/lib/live/config/hostname
 }
 
-Hostname
+Init
+Config
index 5fc851c..2a57a99 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Live_debconfig_passwd ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " live-debconfig (passwd)"
@@ -36,16 +38,14 @@ Live_debconfig_passwd ()
                                ;;
                esac
        done
-
-       Configure_live_debconfig_passwd
 }
 
-Configure_live_debconfig_passwd ()
+Config ()
 {
        # Checking if package is already configured differently
        if grep -q "^${LIVE_USERNAME}:" /etc/passwd
        then
-               return
+               exit 0
        fi
 
        # Adjust formating of groups
@@ -92,4 +92,5 @@ EOF
        touch /var/lib/live/config/live-debconfig_passwd
 }
 
-Live_debconfig_passwd
+Init
+Config
index a3bcb54..ffbd053 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Sudo ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/sudo.list ] || \
           [ -e /var/lib/live/config/sudo ]
        then
-               return
+               exit 0
        fi
 
        echo -n " sudo"
@@ -28,23 +30,21 @@ Sudo ()
                                ;;
                esac
        done
-
-       Configure_sudo
 }
 
-Configure_sudo ()
+Config ()
 {
        # Skip sudo configuration if username is root
        case "${LIVE_USERNAME}" in
                root)
-                       return
+                       exit 0
                        ;;
        esac
 
        # Checking if package is already configured differently
        if grep -qs "^${LIVE_USERNAME}" /etc/sudoers.d/live
        then
-               return
+               exit 0
        fi
 
        echo "${LIVE_USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/live
@@ -77,4 +77,5 @@ EOF
        touch /var/lib/live/config/sudo
 }
 
-Sudo
+Init
+Config
index d13aca6..879e8ac 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Locales ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/locales.list ] || \
           [ -e /var/lib/live/config/locales ]
        then
-               return
+               exit 0
        fi
 
        echo -n " locales"
@@ -28,11 +30,9 @@ Locales ()
                                ;;
                esac
        done
-
-       Configure_locales
 }
 
-Configure_locales ()
+Config ()
 {
        if echo "${LIVE_LOCALES}" | grep -qs ","
        then
@@ -63,4 +63,5 @@ Configure_locales ()
        touch /var/lib/live/config/locales
 }
 
-Locales
+Init
+Config
index 73bae3e..ccf14d6 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Locales_all ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " locales-all"
@@ -28,11 +30,9 @@ Locales_all ()
                                ;;
                esac
        done
-
-       Configure_locales_all
 }
 
-Configure_locales_all ()
+Config ()
 {
        if [ -n "${LIVE_LOCALES}" ]
        then
@@ -52,4 +52,5 @@ Configure_locales_all ()
        touch /var/lib/live/config/locales-all
 }
 
-Locales_all
+Init
+Config
index bd43168..80da226 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Tzdata ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/tzdata.list ] || \
           [ -e /var/lib/live/config/tzdata ]
        then
-               return
+               exit 0
        fi
 
        echo -n " tzdata"
@@ -28,11 +30,9 @@ Tzdata ()
                                ;;
                esac
        done
-
-       Configure_tzdata
 }
 
-Configure_tzdata ()
+Config ()
 {
        if [ -n "${LIVE_TIMEZONE}" ]
        then
@@ -57,4 +57,5 @@ EOF
        touch /var/lib/live/config/tzdata
 }
 
-Tzdata
+Init
+Config
index b7d3471..33dec39 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Gdm3 ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/gdm3.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/gdm3 ]
+       if [ ! -e /var/lib/dpkg/info/gdm3.list ] || \
+          [ -e /var/lib/live/config/gdm3 ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " gdm3"
@@ -36,16 +30,14 @@ Gdm3 ()
                                ;;
                esac
        done
-
-       Configure_gdm3
 }
 
-Configure_gdm3 ()
+Config ()
 {
        # Checking if package is already configured
        if grep -qs AutomaticLoginEnable=true /etc/gdm3/daemon.conf
        then
-               return
+               exit 0
        fi
 
        _GDM3_OPTIONS="AutomaticLoginEnable=true\n\
@@ -57,11 +49,11 @@ TimedLoginDelay=5"
        sed -i -e "s|\[daemon\]|\[daemon\]\n${_GDM3_OPTIONS}|" /etc/gdm3/daemon.conf
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/gdm3
 }
 
-Gdm3
+Init
+Config
index ab92f26..feccca6 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Kdm ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/kdm.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/kdm ]
+       if [ ! -e /var/lib/dpkg/info/kdm.list ] || \
+          [ -e /var/lib/live/config/kdm ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " kdm"
@@ -36,15 +30,13 @@ Kdm ()
                                ;;
                esac
        done
-
-       Configure_kdm
 }
 
-Configure_kdm ()
+Config ()
 {
        if [ ! -e /etc/kde4/kdm/kdmrc ]
        then
-               return
+               exit 0
        fi
 
        if [ "${LIVE_CONFIG_NOAUTOLOGIN}" != "true" ] && [ "${LIVE_CONFIG_NOX11AUTOLOGIN}" = "true" ]
@@ -64,11 +56,11 @@ Configure_kdm ()
        fi
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/kdm
 }
 
-Kdm
+Init
+Config
index de858d1..7861b1e 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Lightdm ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/lightdm.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/lightdm ]
+       if [ ! -e /var/lib/dpkg/info/lightdm.list ] || \
+          [ -e /var/lib/live/config/lightdm ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " lightdm"
@@ -36,11 +30,9 @@ Lightdm ()
                                ;;
                esac
        done
-
-       Configure_lightdm
 }
 
-Configure_lightdm ()
+Config ()
 {
        if [ -e /etc/lightdm/lightdm.conf ]
        then
@@ -50,11 +42,11 @@ Configure_lightdm ()
        fi
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/lightdm
 }
 
-Lightdm
+Init
+Config
index 283727c..e12e37b 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Lxdm ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/lxdm.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/lxdm ]
+       if [ ! -e /var/lib/dpkg/info/lxdm.list ] || \
+          [ -e /var/lib/live/config/lxdm ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " lxdm"
@@ -36,11 +30,9 @@ Lxdm ()
                                ;;
                esac
        done
-
-       Configure_lxdm
 }
 
-Configure_lxdm ()
+Config ()
 {
        # Debian
        if [ -e /etc/lxdm/lxdm.conf ]
@@ -59,11 +51,11 @@ Configure_lxdm ()
        fi
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/lxdm
 }
 
-Lxdm
+Init
+Config
index 6e493e6..07355c1 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Nodm ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/nodm.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/nodm ]
+       if [ ! -e /var/lib/dpkg/info/nodm.list ] || \
+          [ -e /var/lib/live/config/nodm ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " nodm"
@@ -36,11 +30,9 @@ Nodm ()
                                ;;
                esac
        done
-
-       Configure_nodm
 }
 
-Configure_nodm ()
+Config ()
 {
        # autologin
        sed -i -r -e "s|^NODM_ENABLED=.*\$|NODM_ENABLED=true|" \
@@ -56,11 +48,11 @@ EOF
        rm -f /tmp/live-config.cfg
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/nodm
 }
 
-Nodm
+Init
+Config
index 4b4db13..42b6614 100755 (executable)
@@ -8,21 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Slim ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
-       if [ ! -e /var/lib/dpkg/info/slim.list ]
-       then
-               return
-       fi
-
-       if [ -e /var/lib/live/config/slim ]
+       if [ ! -e /var/lib/dpkg/info/slim.list ] || \
+          [ -e /var/lib/live/config/slim ]
        then
-               # Avoid xinit
-               _X11="true"
-               export _X11
-
-               return
+               exit 0
        fi
 
        echo -n " slim"
@@ -36,16 +30,14 @@ Slim ()
                                ;;
                esac
        done
-
-       Configure_slim
 }
 
-Configure_slim ()
+Config ()
 {
        # Checking if package is already configured differently
        if grep -qs "^auto_login" /etc/slim.conf
        then
-               return
+               exit 0
        fi
 
        # autologin
@@ -54,11 +46,11 @@ Configure_slim ()
        /etc/slim.conf
 
        # Avoid xinit
-       _X11="true"
-       export _X11
+       touch /var/lib/live/config/xinit
 
        # Creating state file
        touch /var/lib/live/config/slim
 }
 
-Slim
+Init
+Config
index c063fa1..9eedb40 100755 (executable)
@@ -8,14 +8,16 @@
 ## under certain conditions; see COPYING for details.
 
 
-Xinit ()
+set -e
+
+Init ()
 {
        # Checking if a display manager has been configured
        case "${_X11}" in
                true)
                        rm -f /etc/profile.d/zz-live-config_xinit.sh
 
-                       return
+                       exit 0
                        ;;
        esac
 
@@ -23,20 +25,18 @@ Xinit ()
        if [ ! -e /var/lib/dpkg/info/xinit.list ] || \
           [ -e /var/lib/live/config/xinit ]
        then
-               return
+               exit 0
        fi
 
        echo -n " xinit"
-
-       Configure_xinit
 }
 
-Configure_xinit ()
+Config ()
 {
        # Checking if package is already configured differently
        if [ -e /etc/profile.d/zz-live-config_xinit.sh ]
        then
-               return
+               exit 0
        fi
 
 cat > /etc/profile.d/zz-live-config_xinit.sh << EOF
@@ -58,4 +58,5 @@ EOF
        touch /var/lib/live/config/xinit
 }
 
-Xinit
+Init
+Config
index f097a47..793ed50 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Keyboard_configuration ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " keyboard-configuration"
@@ -40,11 +42,9 @@ Keyboard_configuration ()
                                ;;
                esac
        done
-
-       Configure_keyboard_configuration
 }
 
-Configure_keyboard_configuration ()
+Config ()
 {
        if [ -n "${LIVE_KEYBOARD_LAYOUTS}" ]
        then
@@ -84,4 +84,5 @@ Configure_keyboard_configuration ()
        fi
 }
 
-Keyboard_configuration
+Init
+Config
index b24cb52..a90d325 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Sysvinit ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/sysvinit.list ] || \
           [ -e /var/lib/live/config/sysvinit ]
        then
-               return
+               exit 0
        fi
 
        echo -n " sysvinit"
@@ -28,11 +30,9 @@ Sysvinit ()
                                ;;
                esac
        done
-
-       Configure_sysvinit
 }
 
-Configure_sysvinit ()
+Config ()
 {
        # Disable tmpfs on /tmp
        sed -i -e 's|^ *RAMTMP=.*|RAMTMP=no|' /etc/default/rcS
@@ -49,4 +49,5 @@ Configure_sysvinit ()
        touch /var/lib/live/config/sysvinit
 }
 
-Sysvinit
+Init
+Config
index 60be9bd..1782c13 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Sysv_rc ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " sysv-rc"
@@ -28,11 +30,9 @@ Sysv_rc ()
                                ;;
                esac
        done
-
-       Configure_sysv_rc
 }
 
-Configure_sysv_rc ()
+Config ()
 {
        if [ -n "${LIVE_SYSV_RC}" ]
        then
@@ -47,4 +47,5 @@ Configure_sysv_rc ()
        touch /var/lib/live/config/sysv-rc
 }
 
-Sysv_rc
+Init
+Config
index 0a73b4c..4cc23e4 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Apport ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/apport.list ] || \
           [ -e /var/lib/live/config/apport ]
        then
-               return
+               exit 0
        fi
 
        echo -n " apport"
-
-       Configure_apport
 }
 
-Configure_apport ()
+Config ()
 {
        # Enabling detection of crashes
        sed -i -e 's|enabled=0|enabled=1|' /etc/default/apport
@@ -31,4 +31,5 @@ Configure_apport ()
        touch /var/lib/live/config/apport
 }
 
-Apport
+Init
+Config
index 4b41dae..5a1b5a1 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Gnome_panel_data ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " gnome-panel-data"
@@ -28,11 +30,9 @@ Gnome_panel_data ()
                                ;;
                esac
        done
-
-       Configure_gnome_panel_data
 }
 
-Configure_gnome_panel_data ()
+Config ()
 {
        sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
 
@@ -40,4 +40,5 @@ Configure_gnome_panel_data ()
        touch /var/lib/live/config/gnome-panel-data
 }
 
-Gnome_panel_data
+Init
+Config
index 58caa07..c05ba0d 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Gnome_power_manager ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " gnome-power-manager"
@@ -28,11 +30,9 @@ Gnome_power_manager ()
                                ;;
                esac
        done
-
-       Configure_gnome_power_manager
 }
 
-Configure_gnome_power_manager ()
+Config ()
 {
        # Not authorizing the user to hibernate the computer
        # (might damage existing swap partitions).
@@ -42,4 +42,5 @@ Configure_gnome_power_manager ()
        touch /var/lib/live/config/gnome-power-manager
 }
 
-Gnome_power_manager
+Init
+Config
index 7616b58..5dd88a1 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Gnome_screensaver ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " gnome-screensaver"
@@ -28,11 +30,9 @@ Gnome_screensaver ()
                                ;;
                esac
        done
-
-       Configure_gnome_screensaver
 }
 
-Configure_gnome_screensaver ()
+Config ()
 {
        # Disabling to lock the screen when the screensaver goes active.
        sudo -u "${LIVE_USERNAME}" gsettings set org.gnome.desktop.screensaver lock-enabled false
@@ -41,4 +41,5 @@ Configure_gnome_screensaver ()
        touch /var/lib/live/config/gnome-screensaver
 }
 
-Gnome_screensaver
+Init
+Config
index 83472cd..aaeb3db 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Kaboom ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/kaboom.list ] || \
           [ -e /var/lib/live/config/kaboom ]
        then
-               return
+               exit 0
        fi
 
        echo -n " kaboom"
@@ -28,11 +30,9 @@ Kaboom ()
                                ;;
                esac
        done
-
-       Configure_kaboom
 }
 
-Configure_kaboom ()
+Config ()
 {
        sudo -u "${LIVE_USERNAME}" sh -c "mkdir -p /home/${LIVE_USERNAME}/.local && touch /home/${LIVE_USERNAME}/.local/kaboom"
 
@@ -40,4 +40,5 @@ Configure_kaboom ()
        touch /var/lib/live/config/kaboom
 }
 
-Kaboom
+Init
+Config
index 32c6b37..f12dce1 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Kde_services ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /usr/share/kde4 ] || \
           [ -e /var/lib/live/config/kde-services ]
        then
-               return
+               exit 0
        fi
 
        echo -n " kde-services"
@@ -32,11 +34,9 @@ Kde_services ()
                                ;;
                esac
        done
-
-       Configure_kde_services
 }
 
-Configure_kde_services ()
+Config ()
 {
        # Enabling keyboard selector
        if echo "${LIVE_KEYBOARD_LAYOUTS}" | grep -qs ','
@@ -79,4 +79,5 @@ EOF
        touch /var/lib/live/config/kde-services
 }
 
-Kde_services
+Init
+Config
index 96f49e9..355ea40 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Debian_installer_launcher ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " debian-installer-launcher"
@@ -28,11 +30,9 @@ Debian_installer_launcher ()
                                ;;
                esac
        done
-
-       Configure_debian_installer_launcher
 }
 
-Configure_debian_installer_launcher ()
+Config ()
 {
        # KDE4 needs the desktop file somewhere else,
        # otherwise no Home and Trash icons on the desktop.
@@ -49,4 +49,5 @@ Configure_debian_installer_launcher ()
        touch /var/lib/live/config/debian-installer-launcher
 }
 
-Debian_installer_launcher
+Init
+Config
index b200881..3f7e5be 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Policykit ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/policykit-1.list ] || \
           [ -e /var/lib/live/config/policykit ]
        then
-               return
+               exit 0
        fi
 
        echo -n " policykit"
@@ -28,11 +30,9 @@ Policykit ()
                                ;;
                esac
        done
-
-       Configure_policykit
 }
 
-Configure_policykit ()
+Config ()
 {
        # Grant administrative PolicyKit pivilieges to default user
 
@@ -86,4 +86,5 @@ EOF
        touch /var/lib/live/config/policykit
 }
 
-Policykit
+Init
+Config
index 1640a74..1cf5e77 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Ssl_cert ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/ssl-cert.list ] || \
           [ -e /var/lib/live/config/ssl-cert ]
        then
-               return
+               exit 0
        fi
 
        echo -n " ssl-cert"
-
-       Configure_ssl_cert
 }
 
-Configure_ssl_cert ()
+Config ()
 {
        if [ ! -e /etc/ssl/certs/ssl-cert-snakeoil.pem ] && [ ! -e /etc/ssl/private/ssl-cert-snakeoil.key ]
        then
@@ -33,4 +33,5 @@ Configure_ssl_cert ()
        touch /var/lib/live/config/ssl-cert
 }
 
-Ssl_cert
+Init
+Config
index f564c34..fdc31d4 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Update_notifier ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/update-notifier.list ] || \
           [ -e /var/lib/live/config/update-notifier ]
        then
-               return
+               exit 0
        fi
 
        echo -n " update-notifier"
-
-       Configure_update_notifier
 }
 
-Configure_update_notifier ()
+Config ()
 {
        # For GNOME, we divert away apt-check to avoid a regular
        # 'apt-get update' equivalent in the live session. We want to run
@@ -44,4 +44,5 @@ Configure_update_notifier ()
        touch /var/lib/live/config/update-notifier
 }
 
-Update_notifier
+Init
+Config
index f22db93..77c03e7 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Anacron ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/anacron.list ] || \
           [ -e /var/lib/live/config/anacron ]
        then
-               return
+               exit 0
        fi
 
        echo -n " anacron"
-
-       Configure_anacron
 }
 
-Configure_anacron ()
+Config ()
 {
        # This has the nice side effect of the cron.{daily,weekly,monthly} jobs
        # in /etc/crontab remaining disabled, yet also not run by anacron
@@ -39,4 +39,5 @@ Configure_anacron ()
        touch /var/lib/live/config/anacron
 }
 
-Anacron
+Init
+Config
index 279b3b0..c9c4414 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Util_linux ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/util-linux.list ] || \
           [ -e /var/lib/live/config/util-linux ]
        then
-               return
+               exit 0
        fi
 
        echo -n " util-linux"
@@ -28,11 +30,9 @@ Util_linux ()
                                ;;
                esac
        done
-
-       Configure_util_linux
 }
 
-Configure_util_linux ()
+Config ()
 {
        rm -f /etc/rc?.d/*hwclock*
 
@@ -64,4 +64,5 @@ EOF
        touch /var/lib/live/config/util-linux
 }
 
-Util_linux
+Init
+Config
index 6897307..f800b8d 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Login ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/login.list ] || \
           [ -e /var/lib/live/config/login ]
        then
-               return
+               exit 0
        fi
 
        echo -n " login"
-
-       Configure_login
 }
 
-Configure_login ()
+Config ()
 {
        # lastlog with autologin doesn't make sense
        sed -i '/^[^#].*pam_lastlog\.so/s/^/# /' /etc/pam.d/login
@@ -31,4 +31,5 @@ Configure_login ()
        touch /var/lib/live/config/login
 }
 
-Login
+Init
+Config
index c44ea6e..8c805fe 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Xserver_xorg ()
+set -e
+
+Init ()
 {
        # Checking if package is installed
        if [ ! -e /var/lib/dpkg/info/xserver-xorg.list ] || \
           [ -e /var/lib/live/config/xserver-xorg ]
        then
-               return
+               exit 0
        fi
 
        echo -n " xserver-xorg"
@@ -51,11 +53,9 @@ Xserver_xorg ()
                                ;;
                esac
        done
-
-       Configure_xserver_xorg
 }
 
-Configure_xserver_xorg ()
+Config ()
 {
        if [ -n "${LIVE_KEYBOARD_MODEL}" ]
        then
@@ -220,4 +220,5 @@ EOF
        fi
 }
 
-Xserver_xorg
+Init
+Config
index 3c5b5ce..6ada0bc 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Ureadahead ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/ureadahead.list ] || \
           [ -e /var/lib/live/config/ureadahead ]
        then
-               return
+               exit 0
        fi
 
        echo -n " ureadahead"
-
-       Configure_ureadahead
 }
 
-Configure_ureadahead ()
+Config ()
 {
        # Disabling ureadahead
        rm -f /etc/init/ureadahead*.conf
@@ -31,4 +31,5 @@ Configure_ureadahead ()
        touch /var/lib/live/config/ureadahead
 }
 
-Ureadahead
+Init
+Config
index 3450f83..0cda7e7 100755 (executable)
@@ -8,21 +8,21 @@
 ## under certain conditions; see COPYING for details.
 
 
-Openssh_server ()
+set -e
+
+Init ()
 {
        # Checking if package is installed or already configured
        if [ ! -e /var/lib/dpkg/info/openssh-server.list ] || \
           [ -e /var/lib/live/config/openssh-server ]
        then
-               return
+               exit 0
        fi
 
        echo -n " openssh-server"
-
-       Configure_openssh_server
 }
 
-Configure_openssh_server ()
+Config ()
 {
        for _PROTOCOL in dsa rsa ecdsa
        do
@@ -43,4 +43,5 @@ Configure_openssh_server ()
        esac
 }
 
-Openssh_server
+Init
+Config
index bb7e19d..4ef04cc 100755 (executable)
@@ -8,13 +8,15 @@
 ## under certain conditions; see COPYING for details.
 
 
-Xfce4_panel ()
+set -e
+
+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
-               return
+               exit 0
        fi
 
        echo -n " xfce4-panel"
@@ -28,11 +30,9 @@ Xfce4_panel ()
                                ;;
                esac
        done
-
-       Configure_xfce4_panel
 }
 
-Configure_xfce4_panel ()
+Config ()
 {
        if [ ! -e /home/"${LIVE_USERNAME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml ]
        then
@@ -44,4 +44,5 @@ Configure_xfce4_panel ()
        touch /var/lib/live/config/xfce4-panel
 }
 
-Xfce4_panel
+Init
+Config
index 8d981f7..33a7f50 100755 (executable)
@@ -8,7 +8,9 @@
 ## under certain conditions; see COPYING for details.
 
 
-Hooks ()
+set -e
+
+Init ()
 {
        # Reading kernel command line
        for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
@@ -22,19 +24,17 @@ Hooks ()
 
        if [ -z "${LIVE_HOOKS}" ]
        then
-               return
+               exit 0
        fi
 
        echo -n " hooks"
-
-       Process_hooks
 }
 
-Process_hooks ()
+Config ()
 {
        if [ -z "${LIVE_HOOKS}" ]
        then
-               return
+               exit 0
        fi
 
        for _HOOK in $(echo ${LIVE_HOOKS} | sed -e 's/|/ /g')
@@ -81,4 +81,5 @@ Process_hooks ()
        done
 }
 
-Hooks
+Init
+Config