[SCM] live-config branch, debian, updated. debian/2.0_a4-1

Daniel Baumann daniel at debian.org
Wed Jun 2 20:48:55 UTC 2010


The following commit has been merged in the debian branch:
commit a1486378484ab4aa86165fc0493be9ff57079725
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Jun 1 08:54:46 2010 +0200

    Adding checks to ensure that scripts are not re-run with persistency.

diff --git a/Makefile b/Makefile
index 54388a7..4116543 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,7 @@ install:
 	# Installing scripts
 	mkdir -p $(DESTDIR)/lib/live
 	cp -r scripts/config.sh scripts/config $(DESTDIR)/lib/live
+	mkdir -p $(DESTDIR)/var/lib/live/config
 
 	# Installing docs
 	mkdir -p $(DESTDIR)/usr/share/doc/live-config
@@ -66,6 +67,8 @@ uninstall:
 	# Uninstalling scripts
 	rm -rf $(DESTDIR)/lib/live/config.sh $(DESTDIR)/lib/live/config
 	rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/live || true
+	rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live/config || true
+	rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live || true
 
 	# Uninstalling docs
 	rm -rf $(DESTDIR)/usr/share/doc/live-config
diff --git a/docs/TODO b/docs/TODO
index 8752c85..e8d7441 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -14,6 +14,7 @@ we continue to release pre-releases until:
 
 2. Todo items
 
+  * allow some scripts (most prominently locales) to be run even in persistent mode.
   * use build-time distribution detection, remove dead code from build.
   * use verbose/quiet/debug/interactive modes for scripts.
   * use logfile.
diff --git a/examples/scripts/nnn-foobar b/examples/scripts/nnn-foobar
index e7a90f3..ea0765f 100755
--- a/examples/scripts/nnn-foobar
+++ b/examples/scripts/nnn-foobar
@@ -2,8 +2,9 @@
 
 Foo ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/foo.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/foo.list ] || \
+	   [ -e /var/lib/live/config/foo ]
 	then
 		return
 	fi
@@ -20,6 +21,9 @@ Configure_foo ()
 
 	# Configuring foo
 	sleep 1
+
+	# Creating state file
+	touch /var/lib/live/config/foo
 }
 
 Foo
diff --git a/manpages/de/live-config.de.7 b/manpages/de/live-config.de.7
index 34ffb55..9274868 100644
--- a/manpages/de/live-config.de.7
+++ b/manpages/de/live-config.de.7
@@ -3,7 +3,7 @@
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH LIVE\-CONFIG 7 30.05.2010 2.0~a3 "Debian Live Projekt"
+.TH LIVE\-CONFIG 7 02.06.2010 2.0~a3 "Debian Live Projekt"
 
 .SH NAME
 \fBlive\-config\fP \- System Konfiguration Skripte
@@ -15,7 +15,9 @@ Startvorganges (late userspace) konfigurieren.
 .SH KONFIGURATION
 \fBlive\-config\fP kann durch Boot Parameter oder Konfigurationsdateien
 konfiguriert werden. Werden beide Mechanismen für eine bestimmte Option
-benutzt, so gehen die Boot Parameter den Konfigurationsdateien vor.
+benutzt, so gehen die Boot Parameter den Konfigurationsdateien vor. Wird
+Persistenz benutzt, so werden die \fBlive\-config\fP Skripte nur einmal
+ausgeführt.
 
 .SS "Boot Parameter (Skripte)"
 \fBlive\-config\fP ist nur aktiviert, wenn 'boot=live' als Boot Parameter
@@ -65,10 +67,11 @@ Ermöglicht die Zeitzone des Systems einzustellen, zum Beispiel
 Ermöglicht zu bestimmen, ob das System davon ausgehen soll, dass die
 Hardwareuhr auf UTC gestellt ist oder nicht. Der Standard ist 'yes'.
 .IP "\fBlive\-config.hook\fP=\fIURL1\fP|\fIURL2\fP| ...|\fIURLn\fP" 4
-Allows to fetch and execute one or more arbitrary files. Note that the URLs
-must be fetchable by wget, and that the files needs their dependencies, if
-any, already installed, e.g. if a python script should be executed the
-system needs python installed.
+Ermöglicht eine oder mehrere beliebige Dateien herunterzuladen und
+auszuführen. Die URLs müssen durch wget aufösbar sein und es müssen alle
+Abhängigkeiten, die für das Ausführen der Dateien notwendig sind, bereits
+installiert sein, zum Beispiel muss für ein Python Skript bereits Python auf
+dem System installiert sein.
 
 .SS "Boot Parameter (Abkürzungen)"
 \fBlive\-config\fP stellt Abkürzungen für einige häufige verwendete
@@ -104,30 +107,30 @@ Namensschema zu verwenden (wobei 'vendor' oder 'project' mit dem
 eigentlichen Namen ersetzt wird, resultierend in einem Dateinamen wie
 \&'debian\-eeepc.conf').
 
-.IP "\fBCONFIGS\fP=\fISKRIPT1\fP,\fISKRIPT2\fP, ... \fISKRIPTn\fP" 4
+.IP "\fBLIVE_CONFIGS\fP=\fISKRIPT1\fP,\fISKRIPT2\fP, ... \fISKRIPTn\fP" 4
 Diese Variable enspricht dem '\fBlive\-config\fP=\fISKRIPT1\fP,\fISKRIPT2\fP,
 \&... \fISKRIPTn\fP' Parameter.
-.IP "\fBNOCONFIGS\fP=\fISKRIPT1\fP,\fISKRIPT2\fP, ... \fISKRIPTn\fP" 4
+.IP "\fBLIVE_NOCONFIGS\fP=\fISKRIPT1\fP,\fISKRIPT2\fP, ... \fISKRIPTn\fP" 4
 Diese Variable enspricht dem '\fBlive\-noconfig\fP=\fISKRIPT1\fP,\fISKRIPT2\fP,
 \&... \fISKRIPTn\fP' Parameter.
-.IP \fBHOST\fP=\fIRECHNERNAME\fP 4
+.IP \fBLIVE_HOSTNAME\fP=\fIRECHNERNAME\fP 4
 Diese Variable enspricht dem '\fBlive\-config.hostname\fP=\fIRECHNERNAME\fP'
 Parameter.
-.IP \fBUSERNAME\fP=\fIBENUTZERNAME\fP 4
+.IP \fBLIVE_USERNAME\fP=\fIBENUTZERNAME\fP 4
 Diese Variable enspricht dem '\fBlive\-config.username\fP=\fIBENUTZERNAME\fP'
 Parameter.
-.IP "\fBUSER_FULLNAME\fP=\(dq\fIVOLLER BENUTZERNAME\(dq\fP" 4
+.IP "\fBLIVE_USER_FULLNAME\fP=\(dq\fIVOLLER BENUTZERNAME\(dq\fP" 4
 Diese Variable enspricht dem '\fBlive\-config.user\-fullname\fP="\fIVOLLER
 BENUTZERNAME\fP"' Parameter.
-.IP \fBLOCALES\fP=\fIGEBIETSSCHEMA\fP 4
+.IP \fBLIVE_LOCALES\fP=\fIGEBIETSSCHEMA\fP 4
 Diese Variable enspricht dem '\fBlive\-config.locales\fP=\fIGEBIETSSCHEMA\fP'
 Parameter.
-.IP \fBTIMEZONE\fP=\fIZEITZONE\fP 4
+.IP \fBLIVE_TIMEZONE\fP=\fIZEITZONE\fP 4
 Diese Variable enspricht dem '\fBlive\-config.timezone\fP=\fIZEITZONE\fP'
 Parameter.
-.IP \fBUTC\fP=\fByes\fP|no 4
+.IP \fBLIVE_UTC\fP=\fByes\fP|no 4
 Diese Variable enspricht dem '\fBlive\-config.utc\fP=\fByes\fP|no' Parameter.
-.IP "\fBHOOK\fP=\fIURL1\fP|\fIURL2\fP| ... |\fIURLn\fP" 4
+.IP "\fBLIVE_HOOK\fP=\fIURL1\fP|\fIURL2\fP| ... |\fIURLn\fP" 4
 Diese Variable enspricht dem '\fBlive\-config.hook\fP=\fIURL1\fP|\fIURL2\fP|
 \&... |\fIURLn\fP' Parameter.
 
@@ -193,6 +196,7 @@ einem HTTP/FTP Server auszuführen.
 .IP \fBlive/config.conf.d/\fP 4
 .IP \fB/lib/live/config.sh\fP 4
 .IP \fB/lib/live/config/\fP 4
+.IP \fB/var/lib/live/config/\fP 4
 
 .SH "SIEHE AUCH"
 \fIlive\-boot\fP(7)
diff --git a/manpages/en/live-config.7 b/manpages/en/live-config.7
index e66dfa5..6df4510 100644
--- a/manpages/en/live-config.7
+++ b/manpages/en/live-config.7
@@ -1,4 +1,4 @@
-.TH LIVE\-CONFIG 7 2010\-05\-30 2.0~a3 "Debian Live Project"
+.TH LIVE\-CONFIG 7 2010\-06\-02 2.0~a3 "Debian Live Project"
 
 .SH NAME
 \fBlive\-config\fR \- System Configuration Scripts
@@ -7,7 +7,7 @@
 \fBlive\-config\fR contains the scripts that configure a Debian Live system during the boot process (late userspace).
 
 .SH CONFIGURATION
-\fBlive\-config\fR can be configured through boot parameters or configuration files. If both mechanisms are used for a certain option, the boot parameters take precedence over the configuration files.
+\fBlive\-config\fR can be configured through boot parameters or configuration files. If both mechanisms are used for a certain option, the boot parameters take precedence over the configuration files. When using persistency, \fBlive\-config\fR scripts are only run once.
 
 .SS Boot Parameters (scripts)
 \fBlive\-config\fR is only activated if 'boot=live' is used as a boot parameter. Additionally, \fBlive\-config\fR needs to be told which scripts to run trough the 'live\-config' parameter or which scripts to not run through the 'live\-noconfig' parameter. If both 'live\-config' and 'live\-noconfig' are used, or, if either one is specified multiple times, always the later one takes precedence over the previous one(s).
@@ -54,23 +54,23 @@ Configuration files can be placed either in the root filesystem itself (/etc/liv
 .PP
 Although the configuration files placed in the conf.d directories do not require a particular name or suffix, it's suggest for consistency to either use 'vendor.conf' or 'project.conf' as a naming scheme (whereas 'vendor' or 'project' is replaced with the actual name, resulting in a filename like 'debian-eeepc.conf').
 
-.IP "\fBCONFIGS\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR" 4
+.IP "\fBLIVE_CONFIGS\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR" 4
 This variable equals the '\fBlive\-config\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR' parameter.
-.IP "\fBNOCONFIGS\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR" 4
+.IP "\fBLIVE_NOCONFIGS\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR" 4
 This variable equals the '\fBlive\-noconfig\fR=\fISCRIPT1\fR,\fISCRIPT2\fR, ... \fISCRIPTn\fR' parameter.
-.IP "\fBHOST\fR=\fIHOSTNAME\fR" 4
+.IP "\fBLIVE_HOSTNAME\fR=\fIHOSTNAME\fR" 4
 This variable equals the '\fBlive\-config.hostname\fR=\fIHOSTAME\fR' parameter.
-.IP "\fBUSERNAME\fR=\fIUSERNAME\fR" 4
+.IP "\fBLIVE_USERNAME\fR=\fIUSERNAME\fR" 4
 This variable equals the '\fBlive\-config.username\fR=\fIUSERNAME\fR' parameter.
-.IP "\fBUSER_FULLNAME\fR=""\fIUSER FULLNAME""\fR" 4
+.IP "\fBLIVE_USER_FULLNAME\fR=""\fIUSER FULLNAME""\fR" 4
 This variable equals the '\fBlive\-config.user-fullname\fR="\fIUSER FULLNAME\fR"' parameter.
-.IP "\fBLOCALES\fR=\fILOCALE\fR" 4
+.IP "\fBLIVE_LOCALES\fR=\fILOCALE\fR" 4
 This variable equals the '\fBlive\-config.locales\fR=\fILOCALE\fR' parameter.
-.IP "\fBTIMEZONE\fR=\fITIMEZONE\fR" 4
+.IP "\fBLIVE_TIMEZONE\fR=\fITIMEZONE\fR" 4
 This variable equals the '\fBlive\-config.timezone\fR=\fITIMEZONE\fR' parameter.
-.IP "\fBUTC\fR=\fByes\fR|no" 4
+.IP "\fBLIVE_UTC\fR=\fByes\fR|no" 4
 This variable equals the '\fBlive\-config.utc\fR=\fByes\fR|no' parameter.
-.IP "\fBHOOK\fR=\fIURL1\fR|\fIURL2\fR| ... |\fIURLn\fR" 4
+.IP "\fBLIVE_HOOK\fR=\fIURL1\fR|\fIURL2\fR| ... |\fIURLn\fR" 4
 This variable equals the '\fBlive\-config.hook\fR=\fIURL1\fR|\fIURL2\fR| ... |\fIURLn\fR' parameter.
 
 .SH SCRIPTS
@@ -132,6 +132,7 @@ allows to run arbitrary commands from a script placed on the live media or an ht
 .IP "\fBlive/config.conf.d/\fR" 4
 .IP "\fB/lib/live/config.sh\fR" 4
 .IP "\fB/lib/live/config/\fR" 4
+.IP "\fB/var/lib/live/config/\fR" 4
 
 .SH SEE ALSO
 \fIlive\-boot\fR(7)
diff --git a/manpages/po/de/live-config.7.po b/manpages/po/de/live-config.7.po
index 823cd7a..3aeb945 100644
--- a/manpages/po/de/live-config.7.po
+++ b/manpages/po/de/live-config.7.po
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-config 2.0~a2\n"
-"POT-Creation-Date: 2010-05-30 15:46+0300\n"
+"POT-Creation-Date: 2010-06-02 22:14+0300\n"
 "PO-Revision-Date: 2010-05-24 09:59+0300\n"
 "Last-Translator: Daniel Baumann <daniel at debian.org>\n"
 "Language-Team: none\n"
@@ -24,8 +24,8 @@ msgstr "LIVE-CONFIG"
 #. type: TH
 #: en/live-config.7:1
 #, no-wrap
-msgid "2010-05-30"
-msgstr "30.05.2010"
+msgid "2010-06-02"
+msgstr "02.06.2010"
 
 #. type: TH
 #: en/live-config.7:1
@@ -76,11 +76,14 @@ msgstr "KONFIGURATION"
 msgid ""
 "B<live-config> can be configured through boot parameters or configuration "
 "files. If both mechanisms are used for a certain option, the boot parameters "
-"take precedence over the configuration files."
+"take precedence over the configuration files. When using persistency, B<live-"
+"config> scripts are only run once."
 msgstr ""
 "B<live-config> kann durch Boot Parameter oder Konfigurationsdateien "
 "konfiguriert werden. Werden beide Mechanismen für eine bestimmte Option "
-"benutzt, so gehen die Boot Parameter den Konfigurationsdateien vor."
+"benutzt, so gehen die Boot Parameter den Konfigurationsdateien vor. Wird "
+"Persistenz benutzt, so werden die B<live-config> Skripte nur einmal "
+"ausgeführt."
 
 #. type: SS
 #: en/live-config.7:12
@@ -393,8 +396,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:57
 #, no-wrap
-msgid "B<CONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
-msgstr "B<CONFIGS>=I<SKRIPT1>,I<SKRIPT2>, ... I<SKRIPTn>"
+msgid "B<LIVE_CONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
+msgstr "B<LIVE_CONFIGS>=I<SKRIPT1>,I<SKRIPT2>, ... I<SKRIPTn>"
 
 #. type: Plain text
 #: en/live-config.7:59
@@ -408,8 +411,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:59
 #, no-wrap
-msgid "B<NOCONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
-msgstr "B<NOCONFIGS>=I<SKRIPT1>,I<SKRIPT2>, ... I<SKRIPTn>"
+msgid "B<LIVE_NOCONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
+msgstr "B<LIVE_NOCONFIGS>=I<SKRIPT1>,I<SKRIPT2>, ... I<SKRIPTn>"
 
 #. type: Plain text
 #: en/live-config.7:61
@@ -423,8 +426,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:61
 #, no-wrap
-msgid "B<HOST>=I<HOSTNAME>"
-msgstr "B<HOST>=I<RECHNERNAME>"
+msgid "B<LIVE_HOSTNAME>=I<HOSTNAME>"
+msgstr "B<LIVE_HOSTNAME>=I<RECHNERNAME>"
 
 #. type: Plain text
 #: en/live-config.7:63
@@ -437,8 +440,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:63
 #, no-wrap
-msgid "B<USERNAME>=I<USERNAME>"
-msgstr "B<USERNAME>=I<BENUTZERNAME>"
+msgid "B<LIVE_USERNAME>=I<USERNAME>"
+msgstr "B<LIVE_USERNAME>=I<BENUTZERNAME>"
 
 #. type: Plain text
 #: en/live-config.7:65
@@ -451,8 +454,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:65
 #, no-wrap
-msgid "B<USER_FULLNAME>=\"I<USER FULLNAME\">"
-msgstr "B<USER_FULLNAME>=\"I<VOLLER BENUTZERNAME\">"
+msgid "B<LIVE_USER_FULLNAME>=\"I<USER FULLNAME\">"
+msgstr "B<LIVE_USER_FULLNAME>=\"I<VOLLER BENUTZERNAME\">"
 
 #. type: Plain text
 #: en/live-config.7:67
@@ -466,8 +469,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:67
 #, no-wrap
-msgid "B<LOCALES>=I<LOCALE>"
-msgstr "B<LOCALES>=I<GEBIETSSCHEMA>"
+msgid "B<LIVE_LOCALES>=I<LOCALE>"
+msgstr "B<LIVE_LOCALES>=I<GEBIETSSCHEMA>"
 
 #. type: Plain text
 #: en/live-config.7:69
@@ -479,8 +482,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:69
 #, no-wrap
-msgid "B<TIMEZONE>=I<TIMEZONE>"
-msgstr "B<TIMEZONE>=I<ZEITZONE>"
+msgid "B<LIVE_TIMEZONE>=I<TIMEZONE>"
+msgstr "B<LIVE_TIMEZONE>=I<ZEITZONE>"
 
 #. type: Plain text
 #: en/live-config.7:71
@@ -492,8 +495,8 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:71
 #, no-wrap
-msgid "B<UTC>=B<yes>|no"
-msgstr "B<UTC>=B<yes>|no"
+msgid "B<LIVE_UTC>=B<yes>|no"
+msgstr "B<LIVE_UTC>=B<yes>|no"
 
 #. type: Plain text
 #: en/live-config.7:73
@@ -503,8 +506,8 @@ msgstr "Diese Variable enspricht dem 'B<live-config.utc>=B<yes>|no' Parameter."
 #. type: IP
 #: en/live-config.7:73
 #, no-wrap
-msgid "B<HOOK>=I<URL1>|I<URL2>| ... |I<URLn>"
-msgstr ""
+msgid "B<LIVE_HOOK>=I<URL1>|I<URL2>| ... |I<URLn>"
+msgstr "B<LIVE_HOOK>=I<URL1>|I<URL2>| ... |I<URLn>"
 
 #. type: Plain text
 #: en/live-config.7:75
@@ -841,30 +844,36 @@ msgstr "B</lib/live/config.sh>"
 msgid "B</lib/live/config/>"
 msgstr "B</lib/live/config/>"
 
+#. type: IP
+#: en/live-config.7:135
+#, no-wrap
+msgid "B</var/lib/live/config/>"
+msgstr "B</var/lib/live/config/>"
+
 #. type: SH
-#: en/live-config.7:136
+#: en/live-config.7:137
 #, no-wrap
 msgid "SEE ALSO"
 msgstr "SIEHE AUCH"
 
 #. type: Plain text
-#: en/live-config.7:138
+#: en/live-config.7:139
 msgid "I<live-boot>(7)"
 msgstr "I<live-boot>(7)"
 
 #. type: Plain text
-#: en/live-config.7:140
+#: en/live-config.7:141
 msgid "I<live-helper>(7)"
 msgstr "I<live-helper>(7)"
 
 #. type: SH
-#: en/live-config.7:141
+#: en/live-config.7:142
 #, no-wrap
 msgid "HOMEPAGE"
 msgstr "HOMEPAGE"
 
 #. type: Plain text
-#: en/live-config.7:143
+#: en/live-config.7:144
 msgid ""
 "More information about live-config and the Debian Live project can be found "
 "on the homepage at E<lt>I<http://live.debian.net/>E<gt> and in the manual at "
@@ -875,13 +884,13 @@ msgstr ""
 "unter E<lt>I<http://live.debian.net/manual/>E<gt> gefunden werden."
 
 #. type: SH
-#: en/live-config.7:144
+#: en/live-config.7:145
 #, no-wrap
 msgid "BUGS"
 msgstr "FEHLER"
 
 #. type: Plain text
-#: en/live-config.7:146
+#: en/live-config.7:147
 msgid ""
 "Bugs can be reported by submitting a bugreport for the live-config package "
 "in the Debian Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or "
@@ -895,13 +904,13 @@ msgstr ""
 "werden."
 
 #. type: SH
-#: en/live-config.7:147
+#: en/live-config.7:148
 #, no-wrap
 msgid "AUTHOR"
 msgstr "AUTOR"
 
 #. type: Plain text
-#: en/live-config.7:148
+#: en/live-config.7:149
 msgid ""
 "live-config was written by Daniel Baumann E<lt>I<daniel at debian.org>E<gt> for "
 "the Debian project."
diff --git a/manpages/pot/live-config.7.pot b/manpages/pot/live-config.7.pot
index 5988bb4..2b91504 100644
--- a/manpages/pot/live-config.7.pot
+++ b/manpages/pot/live-config.7.pot
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: live-config VERSION\n"
-"POT-Creation-Date: 2010-05-30 15:46+0300\n"
+"POT-Creation-Date: 2010-06-02 22:14+0300\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -24,7 +24,7 @@ msgstr ""
 #. type: TH
 #: en/live-config.7:1
 #, no-wrap
-msgid "2010-05-30"
+msgid "2010-06-02"
 msgstr ""
 
 #. type: TH
@@ -74,7 +74,8 @@ msgstr ""
 msgid ""
 "B<live-config> can be configured through boot parameters or configuration "
 "files. If both mechanisms are used for a certain option, the boot parameters "
-"take precedence over the configuration files."
+"take precedence over the configuration files. When using persistency, B<live-"
+"config> scripts are only run once."
 msgstr ""
 
 #. type: SS
@@ -327,7 +328,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:57
 #, no-wrap
-msgid "B<CONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
+msgid "B<LIVE_CONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
 msgstr ""
 
 #. type: Plain text
@@ -340,7 +341,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:59
 #, no-wrap
-msgid "B<NOCONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
+msgid "B<LIVE_NOCONFIGS>=I<SCRIPT1>,I<SCRIPT2>, ... I<SCRIPTn>"
 msgstr ""
 
 #. type: Plain text
@@ -353,7 +354,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:61
 #, no-wrap
-msgid "B<HOST>=I<HOSTNAME>"
+msgid "B<LIVE_HOSTNAME>=I<HOSTNAME>"
 msgstr ""
 
 #. type: Plain text
@@ -365,7 +366,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:63
 #, no-wrap
-msgid "B<USERNAME>=I<USERNAME>"
+msgid "B<LIVE_USERNAME>=I<USERNAME>"
 msgstr ""
 
 #. type: Plain text
@@ -377,7 +378,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:65
 #, no-wrap
-msgid "B<USER_FULLNAME>=\"I<USER FULLNAME\">"
+msgid "B<LIVE_USER_FULLNAME>=\"I<USER FULLNAME\">"
 msgstr ""
 
 #. type: Plain text
@@ -390,7 +391,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:67
 #, no-wrap
-msgid "B<LOCALES>=I<LOCALE>"
+msgid "B<LIVE_LOCALES>=I<LOCALE>"
 msgstr ""
 
 #. type: Plain text
@@ -401,7 +402,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:69
 #, no-wrap
-msgid "B<TIMEZONE>=I<TIMEZONE>"
+msgid "B<LIVE_TIMEZONE>=I<TIMEZONE>"
 msgstr ""
 
 #. type: Plain text
@@ -413,7 +414,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:71
 #, no-wrap
-msgid "B<UTC>=B<yes>|no"
+msgid "B<LIVE_UTC>=B<yes>|no"
 msgstr ""
 
 #. type: Plain text
@@ -424,7 +425,7 @@ msgstr ""
 #. type: IP
 #: en/live-config.7:73
 #, no-wrap
-msgid "B<HOOK>=I<URL1>|I<URL2>| ... |I<URLn>"
+msgid "B<LIVE_HOOK>=I<URL1>|I<URL2>| ... |I<URLn>"
 msgstr ""
 
 #. type: Plain text
@@ -755,30 +756,36 @@ msgstr ""
 msgid "B</lib/live/config/>"
 msgstr ""
 
+#. type: IP
+#: en/live-config.7:135
+#, no-wrap
+msgid "B</var/lib/live/config/>"
+msgstr ""
+
 #. type: SH
-#: en/live-config.7:136
+#: en/live-config.7:137
 #, no-wrap
 msgid "SEE ALSO"
 msgstr ""
 
 #. type: Plain text
-#: en/live-config.7:138
+#: en/live-config.7:139
 msgid "I<live-boot>(7)"
 msgstr ""
 
 #. type: Plain text
-#: en/live-config.7:140
+#: en/live-config.7:141
 msgid "I<live-helper>(7)"
 msgstr ""
 
 #. type: SH
-#: en/live-config.7:141
+#: en/live-config.7:142
 #, no-wrap
 msgid "HOMEPAGE"
 msgstr ""
 
 #. type: Plain text
-#: en/live-config.7:143
+#: en/live-config.7:144
 msgid ""
 "More information about live-config and the Debian Live project can be found "
 "on the homepage at E<lt>I<http://live.debian.net/>E<gt> and in the manual at "
@@ -786,13 +793,13 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: en/live-config.7:144
+#: en/live-config.7:145
 #, no-wrap
 msgid "BUGS"
 msgstr ""
 
 #. type: Plain text
-#: en/live-config.7:146
+#: en/live-config.7:147
 msgid ""
 "Bugs can be reported by submitting a bugreport for the live-config package "
 "in the Debian Bug Tracking System at E<lt>I<http://bugs.debian.org/>E<gt> or "
@@ -801,13 +808,13 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: en/live-config.7:147
+#: en/live-config.7:148
 #, no-wrap
 msgid "AUTHOR"
 msgstr ""
 
 #. type: Plain text
-#: en/live-config.7:148
+#: en/live-config.7:149
 msgid ""
 "live-config was written by Daniel Baumann E<lt>I<daniel at debian.org>E<gt> for "
 "the Debian project."
diff --git a/scripts/config.sh b/scripts/config.sh
index 934d651..d6a4ad5 100755
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -3,109 +3,109 @@
 set -e
 
 # Defaults
-HOST="debian"
-USERNAME="user"
-USER_FULLNAME="Debian Live user"
+LIVE_HOSTNAME="debian"
+LIVE_USERNAME="user"
+LIVE_USER_FULLNAME="Debian Live user"
 
 Cmdline ()
 {
-	for PARAMETER in $(cat /proc/cmdline)
+	for _PARAMETER in $(cat /proc/cmdline)
 	do
-		case "${PARAMETER}" in
+		case "${_PARAMETER}" in
 			live-config)
 				# Run all scripts
-				SCRIPTS="$(ls /lib/live/config/*)"
+				_SCRIPTS="$(ls /lib/live/config/*)"
 				;;
 
 			live-config=*)
 				# Only run requested scripts
-				CONFIGS="${PARAMETER#live-config=}"
+				LIVE_CONFIGS="${_PARAMETER#live-config=}"
 				;;
 
 			live-noconfig)
 				# Don't run any script
-				SCRIPTS=""
+				_SCRIPTS=""
 				;;
 
 			live-noconfig=*)
 				# Don't run requested scripts
-				SCRIPTS="$(ls /lib/live/config/*)"
-				NOCONFIGS="${PARAMETER#live-noconfig=}"
+				_SCRIPTS="$(ls /lib/live/config/*)"
+				LIVE_NOCONFIGS="${_PARAMETER#live-noconfig=}"
 				;;
 
 			# 001-hostname
 			live-config.hostname=*)
-				HOST="${PARAMETER#live-config.hostname=}"
+				LIVE_HOSTNAME="${_PARAMETER#live-config.hostname=}"
 				;;
 
 			# 002-user-setup
 			live-config.username=*)
-				USERNAME="${PARAMETER#live-config.username=}"
+				LIVE_USERNAME="${_PARAMETER#live-config.username=}"
 				;;
 
 			live-config.user-fullname=*)
-				USER_FULLNAME="${PARAMETER#live-config.user-fullname=}"
+				LIVE_USER_FULLNAME="${_PARAMETER#live-config.user-fullname=}"
 				;;
 
 			# 004-locales
 			live-config.locales=*)
-				LOCALES="${PARAMETER#live-config.locales=}"
+				LIVE_LOCALES="${_PARAMETER#live-config.locales=}"
 				;;
 
 			# 005-tzdata
 			live-config.timezone=*)
-				TIMEZONE="${PARAMETER#live-config.timezone=}"
+				LIVE_TIMEZONE="${_PARAMETER#live-config.timezone=}"
 				;;
 
 			live-config.utc=*)
-				UTC="${PARAMETER#live-config.utc=}"
+				LIVE_UTC="${_PARAMETER#live-config.utc=}"
 				;;
 
 			# 999-hook
 			live-config.hook=*)
-				HOOK="${PARAMETER#live-config.hook=}"
+				LIVE_HOOK="${_PARAMETER#live-config.hook=}"
 				;;
 
 			# Shortcuts
 			live-config.noroot)
 				# Disable root access, no matter what mechanism
-				SCRIPTS="${SCRIPTS:-$(ls /lib/live/config/*)}"
-				NOCONFIGS="${NOCONFIGS},sudo,policykit"
+				_SCRIPTS="${_SCRIPTS:-$(ls /lib/live/config/*)}"
+				LIVE_NOCONFIGS="${LIVE_NOCONFIGS},sudo,policykit"
 				;;
 
 			live-config.noxlogin)
 				# Disables graphical autologin, no matter what
 				# mechanism
-				SCRIPTS="${SCRIPTS:-$(ls /lib/live/config/*)}"
-				NOCONFIGS="${NOCONFIGS},gdm,gdm3,kdm,lxdm,nodm"
+				_SCRIPTS="${_SCRIPTS:-$(ls /lib/live/config/*)}"
+				LIVE_NOCONFIGS="${LIVE_NOCONFIGS},gdm,gdm3,kdm,lxdm,nodm"
 				;;
 		esac
 	done
 
 	# Include requested scripts
-	if [ -n "${CONFIGS}" ]
+	if [ -n "${LIVE_CONFIGS}" ]
 	then
-		for CONFIG in $(echo ${CONFIGS} | sed -e 's|,| |g')
+		for LIVE_CONFIG in $(echo ${LIVE_CONFIGS} | sed -e 's|,| |g')
 		do
-			SCRIPTS="${SCRIPTS} $(ls /lib/live/config/???-${CONFIG})"
+			_SCRIPTS="${_SCRIPTS} $(ls /lib/live/config/???-${LIVE_CONFIG})"
 		done
 	fi
 
 	# Exclude requested scripts
-	if [ -n "${NOCONFIGS}" ]
+	if [ -n "${LIVE_NOCONFIGS}" ]
 	then
-		for NOCONFIG in $(echo ${NOCONFIGS} | sed -e 's|,| |g')
+		for LIVE_NOCONFIG in $(echo ${LIVE_NOCONFIGS} | sed -e 's|,| |g')
 		do
-			SCRIPTS="$(echo ${SCRIPTS} | sed -e "s|$(ls /lib/live/config/???-${NOCONFIG})||")"
+			_SCRIPTS="$(echo ${_SCRIPTS} | sed -e "s|$(ls /lib/live/config/???-${LIVE_NOCONFIG})||")"
 		done
 	fi
 }
 
 Trap ()
 {
-	RETURN="${?}"
+	_RETURN="${?}"
 
-	case "${RETURN}" in
+	case "${_RETURN}" in
 		0)
 
 			;;
@@ -115,7 +115,7 @@ Trap ()
 			;;
 	esac
 
-	return ${RETURN}
+	return ${_RETURN}
 }
 
 Main ()
@@ -136,9 +136,9 @@ Main ()
 
 	if ls /etc/live/config.conf.d/* > /dev/null 2>&1
 	then
-		for FILE in /etc/live/config.conf.d/*
+		for _FILE in /etc/live/config.conf.d/*
 		do
-			. ${FILE}
+			. ${_FILE}
 		done
 	fi
 
@@ -152,7 +152,7 @@ Main ()
 	then
 		for FILE in /live/image/live/config.conf.d/*
 		do
-			. ${FILE}
+			. ${_FILE}
 		done
 	fi
 
@@ -160,9 +160,9 @@ Main ()
 	Cmdline
 
 	# Configuring system
-	for SCRIPT in ${SCRIPTS}
+	for _SCRIPT in ${_SCRIPTS}
 	do
-		. ${SCRIPT}
+		. ${_SCRIPT}
 	done
 
 	echo "."
diff --git a/scripts/config/001-hostname b/scripts/config/001-hostname
index 32a3d58..82c456a 100755
--- a/scripts/config/001-hostname
+++ b/scripts/config/001-hostname
@@ -2,8 +2,9 @@
 
 Hostname ()
 {
-	# Checking if package is installed
-	if [ -z "${HOST}" ]
+	# Checking if package is installed or already configured
+	if [ -z "${LIVE_HOSTNAME}" ] || \
+	   [ -e /var/lib/live/config/hostname ]
 	then
 		return
 	fi
@@ -18,9 +19,9 @@ Configure_hostname ()
 	# Change hostname only if it is not set
 	if [ ! -e /etc/hostname ] || grep -qs localhost\.localdomain /etc/hostname
 	then
-		echo "${HOST}" > /etc/hostname
+		echo "${LIVE_HOSTNAME}" > /etc/hostname
 	else
-		HOST="$(cat /etc/hostname)"
+		LIVE_HOSTNAME="$(cat /etc/hostname)"
 	fi
 
 	# Create /etc/hosts only if it is not present or empty
@@ -29,7 +30,7 @@ Configure_hostname ()
 
 cat > /etc/hosts << EOF
 127.0.0.1 localhost
-127.0.1.1 ${HOST}
+127.0.1.1 ${LIVE_HOSTNAME}
 
 # The following lines are desirable for IPv6 capable hosts
 ::1     ip6-localhost ip6-loopback
@@ -42,7 +43,10 @@ EOF
 
 	fi
 
-	hostname "${HOST}"
+	hostname "${LIVE_HOSTNAME}"
+
+	# Creating state file
+	touch /var/lib/live/config/hostname
 }
 
 Hostname
diff --git a/scripts/config/002-user-setup b/scripts/config/002-user-setup
index 258a308..a18be25 100755
--- a/scripts/config/002-user-setup
+++ b/scripts/config/002-user-setup
@@ -2,8 +2,9 @@
 
 User_setup ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/user-setup.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/user-setup.list ] || \
+	   [ -e /var/lib/live/config/user-setup ]
 	then
 		return
 	fi
@@ -15,8 +16,8 @@ User_setup ()
 
 Configure_user_setup ()
 {
-	# Checking if if package is already configured
-	if grep -q "^${USERNAME}" /etc/passwd
+	# Checking if if package is already configured differently
+	if grep -q "^${LIVE_USERNAME}" /etc/passwd
 	then
 		return
 	fi
@@ -24,14 +25,14 @@ Configure_user_setup ()
 	# Default password is: live
 	# passwords can be generated with 'echo "live" | mkpasswd -s',
 	# a blank password is 'U6aMy0wojraho'.
-	PASSWORD="8Ab05sVQ4LLps"
+	_PASSWORD="8Ab05sVQ4LLps"
 
 cat > /tmp/debconf.live << EOF
 user-setup passwd/make-user boolean true
 user-setup passwd/root-password-crypted string *
-user-setup passwd/user-password-crypted string ${PASSWORD}
-user-setup passwd/user-fullname string ${USER_FULLNAME}
-user-setup passwd/username string ${USERNAME}
+user-setup passwd/user-password-crypted string ${_PASSWORD}
+user-setup passwd/user-fullname string ${LIVE_USER_FULLNAME}
+user-setup passwd/username string ${LIVE_USERNAME}
 user-setup passwd/user-uid string 999
 EOF
 
@@ -46,6 +47,9 @@ EOF
 	/usr/lib/user-setup/user-setup-apply 2>&1 \
 	| grep -v "Shadow passwords are now on"
 	set -e
+
+	# Creating state file
+	touch /var/lib/live/config/user-setup
 }
 
 User_setup
diff --git a/scripts/config/003-sudo b/scripts/config/003-sudo
index 137e2f6..bcfefc6 100755
--- a/scripts/config/003-sudo
+++ b/scripts/config/003-sudo
@@ -2,8 +2,9 @@
 
 Sudo ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/sudo.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/sudo.list ] || \
+	   [ -e /var/lib/live/config/sudo ]
 	then
 		return
 	fi
@@ -15,36 +16,39 @@ Sudo ()
 
 Configure_sudo ()
 {
-	# Checking if if package is already configured
-	if grep -q "^${USERNAME}" /etc/sudoers
+	# Checking if if package is already configured differently
+	if grep -q "^${LIVE_USERNAME}" /etc/sudoers
 	then
 		return
 	fi
 
-	echo "${USERNAME}  ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+	echo "${LIVE_USERNAME}  ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
 
-	sudo -u "${USERNAME}" sh -c "echo 'SU_TO_ROOT_SU=sudo' >> /home/${USERNAME}/.su-to-rootrc"
+	sudo -u "${LIVE_USERNAME}" sh -c "echo 'SU_TO_ROOT_SU=sudo' >> /home/${LIVE_USERNAME}/.su-to-rootrc"
 
 	if [ -x /usr/bin/gconftool-2 ]
 	then
-		sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gksu/sudo-mode true
-		sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gksu/display-no-pass-info false
+		sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/gksu/sudo-mode true
+		sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/gksu/display-no-pass-info false
 	fi
 
-	sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/config && cat > /home/${USERNAME}/.kde/share/config/kdesurc" << EOF
+	sudo -u "${LIVE_USERNAME}" sh -c "umask 0077 && mkdir -p /home/${LIVE_USERNAME}/.kde/share/config && cat > /home/${LIVE_USERNAME}/.kde/share/config/kdesurc" << EOF
 [super-user-command]
 super-user-command=sudo
 EOF
 
 	if [ -e /usr/share/apps/konsole/sumc.desktop ]
 	then
-		sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo mc -c/' /usr/share/apps/konsole/sumc.desktop > /home/${USERNAME}/.kde/share/apps/konsole/sumc.desktop"
+		sudo -u "${LIVE_USERNAME}" sh -c "umask 0077 && mkdir -p /home/${LIVE_USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo mc -c/' /usr/share/apps/konsole/sumc.desktop > /home/${LIVE_USERNAME}/.kde/share/apps/konsole/sumc.desktop"
 	fi
 
 	if [ -e /usr/share/apps/konsole/su.desktop ]
 	then
-		sudo -u "${USERNAME}" sh -c "umask 0077 && mkdir -p /home/${USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo -i/' /usr/share/apps/konsole/su.desktop > /home/${USERNAME}/.kde/share/apps/konsole/su.desktop"
+		sudo -u "${LIVE_USERNAME}" sh -c "umask 0077 && mkdir -p /home/${LIVE_USERNAME}/.kde/share/apps/konsole && sed -e's/Exec=su.*$/Exec=sudo -i/' /usr/share/apps/konsole/su.desktop > /home/${LIVE_USERNAME}/.kde/share/apps/konsole/su.desktop"
 	fi
+
+	# Creating state file
+	touch /var/lib/live/config/sudo
 }
 
 Sudo
diff --git a/scripts/config/004-locales b/scripts/config/004-locales
index 1d9810c..36d077f 100755
--- a/scripts/config/004-locales
+++ b/scripts/config/004-locales
@@ -2,8 +2,9 @@
 
 Locales ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/locales.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/locales.list ] || \
+	   [ -e /var/lib/live/config/locales ]
 	then
 		return
 	fi
@@ -18,73 +19,76 @@ Configure_locales ()
 	if [ -e /etc/default/locale ]
 	then
 		# use rootfs configured locale
-		LOCALE="$(grep -s 'LANG=' /etc/default/locale | sed s/'LANG='// | tr -d '"' )"
+		_LOCALE="$(grep -s 'LANG=' /etc/default/locale | sed s/'LANG='// | tr -d '"' )"
 	fi
 
-	if [ -n "${LOCALES}" ]
+	if [ -n "${LIVE_LOCALES}" ]
 	then
-		LOCALE="${LOCALES}"
-		SET_LOCALE="true"
+		_LOCALE="${LIVE_LOCALES}"
+		_SET_LOCALE="true"
 	fi
 
-	if [ -z "${LOCALE}" ]
+	if [ -z "${_LOCALE}" ]
 	then
 		# Set a default one
-		LOCALE="en_US.UTF-8"
-		SET_LOCALE="true"
+		_LOCALE="en_US.UTF-8"
+		_SET_LOCALE="true"
 	fi
 
-	LANGUAGE="$(echo $locale | cut -d. -f1)"
-	export LANGUAGE
+	_LANGUAGE="$(echo $locale | cut -d. -f1)"
+	export _LANGUAGE
 
-	if [ -z "${SET_LOCALE}" ]
+	if [ -z "${_SET_LOCALE}" ]
 	then
 		# Actually, we should check here if the locale is generated
 		return
 	fi
 
-	if echo "${LOCALE}" | grep -sqE '^[[:lower:]]{2}$'
+	if echo "${_LOCALE}" | grep -sqE '^[[:lower:]]{2}$'
 	then
 		# input is like "locale=it", so we will convert and setup also the keyboard if not already set
 		if [ -z "${KBD}" ]
 		then
 			# FIXME: look if this keyb is supported
-			KBD="${LOCALE}"
+			KBD="${_LOCALE}"
 			export KBD
 		fi
 
-		LOCALE_UP=$(echo "${LOCALE}" | tr '[a-z]' '[A-Z]')
-		LOCALE="${LOCALE}_${LOCALE_UP}.UTF-8"
+		_LOCALE_UP=$(echo "${_LOCALE}" | tr '[a-z]' '[A-Z]')
+		_LOCALE="${_LOCALE}_${_LOCALE_UP}.UTF-8"
 	fi
 
 	LANG=
-	LANGUAGE="$(echo ${LOCALE} | cut -d. -f1)"
-	eval $(awk '/^'"${LOCALE}"'/ { print "LANG=" $1 " codepage=" $2; exit; }' /usr/share/i18n/SUPPORTED)
+	_LANGUAGE="$(echo ${_LOCALE} | cut -d. -f1)"
+	eval $(awk '/^'"${_LOCALE}"'/ { print "LANG=" $1 " codepage=" $2; exit; }' /usr/share/i18n/SUPPORTED)
 
 	if [ -z "${LANG}" ]
 	then
 		# Try and fallback to another codepage for this language.
-		eval $(awk '/^'"${LANGUAGE}"'/ { print "LANG=" $1 " codepage=" $2; exit; }' /usr/share/i18n/SUPPORTED)
+		eval $(awk '/^'"${_LANGUAGE}"'/ { print "LANG=" $1 " codepage=" $2; exit; }' /usr/share/i18n/SUPPORTED)
 
 		if [ -n "${LANG}" ]
 		then
-			echo "Choosing locale '${LANG}' as '${LOCALE}' is unsupported."
+			echo "Choosing locale '${LANG}' as '${_LOCALE}' is unsupported."
 		fi
 	fi
 
 	if [ -z "${LANG}" ]
 	then
-		echo "Locale '${LOCALE}' is unsupported."
-		CODEPAGE="UTF-8"
-		LANGUAGE="en_US"
-		LOCALE="${LANGUAGE}.${CODEPAGE}"
-		LANG="${LANGUAGE}.${CODEPAGE}"
+		echo "Locale '${_LOCALE}' is unsupported."
+		_CODEPAGE="UTF-8"
+		_LANGUAGE="en_US"
+		_LOCALE="${_LANGUAGE}.${_CODEPAGE}"
+		LANG="${_LANGUAGE}.${_CODEPAGE}"
 	fi
 
 	printf 'LANG="%s"\n' "${LANG}" > /etc/default/locale
-	sed -i -e "s|# ${LANG} ${CODEPAGE}|${LANG} ${CODEPAGE}|" /etc/locale.gen
+	sed -i -e "s|# ${LANG} ${_CODEPAGE}|${LANG} ${_CODEPAGE}|" /etc/locale.gen
 
 	locale-gen --keep-existing > /dev/null 2>&1
+
+	# Creating state file
+	touch /var/lib/live/config/locales
 }
 
 Locales
diff --git a/scripts/config/005-tzdata b/scripts/config/005-tzdata
index 2ffbf5f..515bcf6 100755
--- a/scripts/config/005-tzdata
+++ b/scripts/config/005-tzdata
@@ -2,8 +2,9 @@
 
 Tzdata ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/tzdata.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/tzdata.list ] || \
+	   [ -e /var/lib/live/config/tzdata ]
 	then
 		return
 	fi
@@ -15,17 +16,17 @@ Tzdata ()
 
 Configure_tzdata ()
 {
-	if [ -n "${TIMEZONE}" ]
+	if [ -n "${LIVE_TIMEZONE}" ]
 	then
-		AREA="$(echo ${TIMEZONE} | cut -f1 -d '/')"
-		ZONE="$(echo ${TIMEZONE} | cut -f2 -d '/')"
+		_AREA="$(echo ${LIVE_TIMEZONE} | cut -f1 -d '/')"
+		_ZONE="$(echo ${LIVE_TIMEZONE} | cut -f2 -d '/')"
 
 debconf-communicate -fnoninteractive live-config > /dev/null << EOF
-set tzdata/Areas ${AREA}
-set tzdata/Zones/${AREA} ${ZONE}
+set tzdata/Areas ${_AREA}
+set tzdata/Zones/${_AREA} ${_ZONE}
 EOF
 
-		cp -f /usr/share/zoneinfo/${AREA}/${ZONE} /etc/localtime
+		cp -f /usr/share/zoneinfo/${_AREA}/${_ZONE} /etc/localtime
 	else
 
 debconf-communicate -fnoninteractive live-config > /dev/null << EOF
@@ -36,10 +37,13 @@ EOF
 		cp -f /usr/share/zoneinfo/UTC /etc/localtime
 	fi
 
-	if [ -n "${UTC}" ]
+	if [ -n "${LIVE_UTC}" ]
 	then
-		sed -i -e "s|UTC=.*|UTC=${UTC}|" /etc/default/rcS
+		sed -i -e "s|UTC=.*|UTC=${LIVE_UTC}|" /etc/default/rcS
 	fi
+
+	# Creating state file
+	touch /var/lib/live/config/tzdata
 }
 
 Tzdata
diff --git a/scripts/config/006-gdm b/scripts/config/006-gdm
index a1e512c..3f22090 100755
--- a/scripts/config/006-gdm
+++ b/scripts/config/006-gdm
@@ -2,8 +2,9 @@
 
 Gdm ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/gdm.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/gdm.list ] || \
+	   [ -e /var/lib/live/config/gdm ]
 	then
 		return
 	fi
@@ -15,19 +16,22 @@ Gdm ()
 
 Configure_gdm ()
 {
-	# Checking if if package is already configured
+	# Checking if if package is already configured differently
 	if grep -qs AutomaticLoginEnable /etc/gdm/gdm.conf
 	then
 		return
 	fi
 
-	GDM_OPTIONS="AutomaticLoginEnable=true\n\
-AutomaticLogin=${USERNAME}\n\
+	_GDM_OPTIONS="AutomaticLoginEnable=true\n\
+AutomaticLogin=${LIVE_USERNAME}\n\
 TimedLoginEnable=true\n\
-TimedLogin=${USERNAME}\n\
+TimedLogin=${LIVE_USERNAME}\n\
 TimedLoginDelay=10"
 
-	sed -i -e "s|\[daemon\]|\[daemon\]\n${GDM_OPTIONS}|" /etc/gdm/gdm.conf
+	sed -i -e "s|\[daemon\]|\[daemon\]\n${_GDM_OPTIONS}|" /etc/gdm/gdm.conf
+
+	# Creating state file
+	touch /var/lib/live/config/gdm
 }
 
 Gdm
diff --git a/scripts/config/007-gdm3 b/scripts/config/007-gdm3
index 2ba61aa..07b006d 100755
--- a/scripts/config/007-gdm3
+++ b/scripts/config/007-gdm3
@@ -2,8 +2,9 @@
 
 Gdm3 ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/gdm3.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/gdm3.list ] || \
+	   [ -e /var/lib/live/config/gdm3 ]
 	then
 		return
 	fi
@@ -15,19 +16,22 @@ Gdm3 ()
 
 Configure_gdm3 ()
 {
-	# Checking if if package is already configured
+	# Checking if if package is already configured differently
 	if grep -qs AutomaticLoginEnable /etc/gdm3/daemon.conf
 	then
 		return
 	fi
 
-	GDM3_OPTIONS="AutomaticLoginEnable=true\n\
-AutomaticLogin=${USERNAME}\n\
+	_GDM3_OPTIONS="AutomaticLoginEnable=true\n\
+AutomaticLogin=${LIVE_USERNAME}\n\
 TimedLoginEnable=true\n\
-TimedLogin=${USERNAME}\n\
+TimedLogin=${LIVE_USERNAME}\n\
 TimedLoginDelay=10"
 
-	sed -i -e "s|\[daemon\]|\[daemon\]\n${GDM3_OPTIONS}|" /etc/gdm3/daemon.conf
+	sed -i -e "s|\[daemon\]|\[daemon\]\n${_GDM3_OPTIONS}|" /etc/gdm3/daemon.conf
+
+	# Creating state file
+	touch /var/lib/live/config/gdm3
 }
 
 Gdm3
diff --git a/scripts/config/008-kdm b/scripts/config/008-kdm
index 992a595..f8fe330 100755
--- a/scripts/config/008-kdm
+++ b/scripts/config/008-kdm
@@ -2,8 +2,9 @@
 
 Kdm ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/kdm.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/kdm.list ] || \
+	   [ -e /var/lib/live/config/kdm ]
 	then
 		return
 	fi
@@ -22,13 +23,13 @@ Configure_kdm ()
 		# autologin
 		sed -i -r -e "s|^#?AutoLoginEnable=.*\$|AutoLoginEnable=true|" \
 			  -e "s|^#?AutoLoginAgain=.*\$|AutoLoginAgain=true|" \
-			  -e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${USERNAME}|" \
+			  -e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${LIVE_USERNAME}|" \
 		/etc/kde4/kdm/kdmrc
 
 		# language
-		if [ -n "${LANGUAGE}" ]
+		if [ -n "${_LANGUAGE}" ]
 		then
-			sed -i -r -e "s|^#?Language=.*\$|Language=${LANGUAGE}|" \
+			sed -i -r -e "s|^#?Language=.*\$|Language=${_LANGUAGE}|" \
 				/etc/kde4/kdm/kdmrc
 		fi
 	elif [ -e /etc/kde3/kdm/kdmrc ]
@@ -38,16 +39,19 @@ Configure_kdm ()
 		# autologin
 		sed -i -r -e "s|^#?AutoLoginEnable=.*\$|AutoLoginEnable=true|" \
 			  -e "s|^#?AutoLoginAgain=.*\$|AutoLoginAgain=true|" \
-			  -e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${USERNAME}|" \
+			  -e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${LIVE_USERNAME}|" \
 		/etc/kde3/kdm/kdmrc
 
 		# language
-		if [ -n "${LANGUAGE}" ]
+		if [ -n "${_LANGUAGE}" ]
 		then
-			sed -i -r -e "s|^#?Language=.*\$|Language=${LANGUAGE}|" \
+			sed -i -r -e "s|^#?Language=.*\$|Language=${_LANGUAGE}|" \
 				/etc/kde3/kdm/kdmrc
 		fi
 	fi
+
+	# Creating state file
+	touch /var/lib/live/config/kdm
 }
 
 Kdm
diff --git a/scripts/config/009-lxdm b/scripts/config/009-lxdm
index d2362cc..71bf4f4 100755
--- a/scripts/config/009-lxdm
+++ b/scripts/config/009-lxdm
@@ -2,8 +2,9 @@
 
 Lxdm ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/lxdm.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/lxdm.list ] || \
+	   [ -e /var/lib/live/config/lxdm ]
 	then
 		return
 	fi
@@ -17,10 +18,13 @@ Configure_lxdm ()
 {
 	if [ -e /etc/lxdm/lxdm.conf ]
 	then
-		sed -i -r -e "s|^#?autologin=.*\$|autologin=${USERNAME}|" \
+		sed -i -r -e "s|^#?autologin=.*\$|autologin=${LIVE_USERNAME}|" \
 			  -e "s|^#?session.*\$|session|" \
 		/etc/lxdm/lxdm.conf
 	fi
+
+	# Creating state file
+	touch /var/lib/live/config/lxdm
 }
 
 Lxdm
diff --git a/scripts/config/010-nodm b/scripts/config/010-nodm
index 61bbb03..b00978c 100755
--- a/scripts/config/010-nodm
+++ b/scripts/config/010-nodm
@@ -2,8 +2,9 @@
 
 Nodm ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/nodm.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/nodm.list ] || \
+	   [ -e /var/lib/live/config/nodm ]
 	then
 		return
 	fi
@@ -18,13 +19,16 @@ Configure_nodm ()
 
 cat > /tmp/debconf.live << EOF
 nodm nodm/enabled boolean true
-nodm nodm/user string ${USERNAME}
+nodm nodm/user string ${LIVE_USERNAME}
 EOF
 
 	debconf-set-selections < /tmp/debconf.live
 	rm -f /tmp/debconf.live
 
 	dpkg-reconfigure -f non-interactive -p critical nodm
+
+	# Creating state file
+	touch /var/lib/live/config/nodm
 }
 
 Nodm
diff --git a/scripts/config/100-apport b/scripts/config/100-apport
index 226ed55..914c233 100755
--- a/scripts/config/100-apport
+++ b/scripts/config/100-apport
@@ -2,8 +2,9 @@
 
 Apport ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/apport.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/apport.list ] || \
+	   [ -e /var/lib/live/apport ]
 	then
 		return
 	fi
@@ -17,6 +18,9 @@ Configure_apport ()
 {
 	# Enabling detection of crashes
 	sed -i -e 's|enabled=0|enabled=1|' /etc/default/apport
+
+	# Creating state file
+	touch /var/lib/live/config/apport
 }
 
 Apport
diff --git a/scripts/config/101-gnome-panel-data b/scripts/config/101-gnome-panel-data
index ad3e687..885787c 100755
--- a/scripts/config/101-gnome-panel-data
+++ b/scripts/config/101-gnome-panel-data
@@ -2,8 +2,9 @@
 
 Gnome_panel_data ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/gnome-panel-data.list ]
+	# 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
 	fi
@@ -15,7 +16,10 @@ Gnome_panel_data ()
 
 Configure_gnome_panel_data ()
 {
-	sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+	sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+
+	# Creating state file
+	touch /var/lib/live/config/gnome-panel-data
 }
 
 Gnome_panel_data
diff --git a/scripts/config/102-gnome-power-manager b/scripts/config/102-gnome-power-manager
index c6d63f3..4bd907e 100755
--- a/scripts/config/102-gnome-power-manager
+++ b/scripts/config/102-gnome-power-manager
@@ -2,8 +2,9 @@
 
 Gnome_power_manager ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/gnome-power-manager.list ]
+	# 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
 	fi
@@ -17,7 +18,10 @@ Configure_gnome_power_manager ()
 {
 	# Not authorizing the user to hibernate the computer
 	# (might damage existing swap partitions).
-	sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/general/can_hibernate false
+	sudo -u "${LIVE_USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/general/can_hibernate false
+
+	# Creating state file
+	touch /var/lib/live/config/gnome-power-manager
 }
 
 Gnome_power_manager
diff --git a/scripts/config/103-gnome-screensaver b/scripts/config/103-gnome-screensaver
index f77290f..7dcb950 100755
--- a/scripts/config/103-gnome-screensaver
+++ b/scripts/config/103-gnome-screensaver
@@ -2,8 +2,9 @@
 
 Gnome_screensaver ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/gnome-screensaver.list ]
+	# 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
 	fi
@@ -16,7 +17,10 @@ Gnome_screensaver ()
 Configure_gnome_screensaver ()
 {
 	# Disabling to lock the screen when the screensaver goes active.
-	sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
+	sudo -u "${LIVE_USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
+
+	# Creating state file
+	touch /var/lib/live/config/gnome-screensaver
 }
 
 Gnome_screensaver
diff --git a/scripts/config/104-initramfs-tools b/scripts/config/104-initramfs-tools
index 7e6051d..8695102 100755
--- a/scripts/config/104-initramfs-tools
+++ b/scripts/config/104-initramfs-tools
@@ -2,8 +2,9 @@
 
 Initramfs_tools ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/initramfs-tools.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/initramfs-tools.list ] || \
+	   [ -e /var/lib/live/config/initramfs-tools ]
 	then
 		return
 	fi
@@ -15,7 +16,7 @@ Initramfs_tools ()
 
 Configure_update_initramfs ()
 {
-	# Checking if apckage is already configured
+	# Checking if apckage is already configured differently
 	if [ -e /usr/sbin/update-initramfs.debian ]
 	then
 		return
@@ -63,6 +64,9 @@ EOF
 fi
 
 	chmod 0755 /usr/sbin/update-initramfs
+
+	# Creating state file
+	touch /var/lib/live/config/initramfs-tools
 }
 
 Initramfs_tools
diff --git a/scripts/config/105-kaboom b/scripts/config/105-kaboom
index f6e4441..b25ba99 100755
--- a/scripts/config/105-kaboom
+++ b/scripts/config/105-kaboom
@@ -2,8 +2,9 @@
 
 Kaboom ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/kaboom.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/kaboom.list ] || \
+	   [ -e /var/lib/live/config/kaboom ]
 	then
 		return
 	fi
@@ -15,8 +16,11 @@ Kaboom ()
 
 Configure_kaboom ()
 {
-	mkdir -p /home/${USERNAME}/.local
-	touch /home/${USERNAME}/.local/kaboom
+	mkdir -p /home/${LIVE_USERNAME}/.local
+	touch /home/${LIVE_USERNAME}/.local/kaboom
+
+	# Creating state file
+	touch /var/lib/live/config/kaboom
 }
 
 Kaboom
diff --git a/scripts/config/106-kde-services b/scripts/config/106-kde-services
index 21fbba1..bcd6f06 100755
--- a/scripts/config/106-kde-services
+++ b/scripts/config/106-kde-services
@@ -2,9 +2,10 @@
 
 Kde_services ()
 {
-	# Checking if package is installed
+	# Checking if package is installed or already configured
 	# we're only checking for KDE4 here (FIXME).
-	if [ ! -e /usr/share/kde4 ]
+	if [ ! -e /usr/share/kde4 ] || \
+	   [ -e /var/lib/live/config/kde-services ]
 	then
 		return
 	fi
@@ -27,6 +28,9 @@ Configure_kde_services ()
 	rm -f /usr/share/kde4/services/kded/freespacenotifier.desktop
 	rm -f /usr/share/kde4/services/plasma-runner-contacts.desktop  # starts akonadi
 	rm -f /usr/share/kde4/services/kded/notificationhelper.desktop
+
+	# Creating state file
+	touch /var/lib/live/config/kde-services
 }
 
 Kde_services
diff --git a/scripts/config/107-kpersonalizer b/scripts/config/107-kpersonalizer
index d964018..f87ec3c 100755
--- a/scripts/config/107-kpersonalizer
+++ b/scripts/config/107-kpersonalizer
@@ -2,8 +2,9 @@
 
 Kpersonalizer ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/kpersonalizer.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/kpersonalizer.list ] || \
+	   [ -e /var/lib/live/config/kpersonalizer ]
 	then
 		return
 	fi
@@ -15,7 +16,7 @@ Kpersonalizer ()
 
 Configure_kpersonalizer ()
 {
-	# Checking if apckage is already configured
+	# Checking if apckage is already configured differently
 	if grep -qs FirstLogin /etc/kde3/kpersonalizerrc
 	then
 		return
@@ -26,6 +27,8 @@ cat > /etc/kde3/kpersonalizerrc << EOF
 FirstLogin=false
 EOF
 
+	# Creating state file
+	touch /var/lib/live/config/kpersonalizer
 }
 
 Kpersonalizer
diff --git a/scripts/config/108-live-installer-launcher b/scripts/config/108-live-installer-launcher
index fda601b..e6afac5 100755
--- a/scripts/config/108-live-installer-launcher
+++ b/scripts/config/108-live-installer-launcher
@@ -2,8 +2,9 @@
 
 Live_installer_launcher ()
 {
-	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/live-installer-launcher.list ]
+	# Checking if package is installed or already configured
+	if [ ! -e /var/lib/dpkg/info/live-installer-launcher.list ] || \
+	   [ -e /var/lib/live/config/live-installer-launcher ]
 	then
 		return
 	fi
@@ -15,7 +16,10 @@ Live_installer_launcher ()
 
 Configure_live_installer_launcher ()
 {
-	install -D -o ${USERNAME} -g ${USERNAME} /usr/share/applications/live-installer-launcher.desktop /home/${USERNAME}/Desktop/live-installer-launcher.desktop
+	install -D -o ${LIVE_USERNAME} -g ${LIVE_USERNAME} /usr/share/applications/live-installer-launcher.desktop /home/${LIVE_USERNAME}/Desktop/live-installer-launcher.desktop
+
+	# Creating state file
+	touch /var/lib/live/config/live-installer-launcher
 }
 
 Live_installer_launcher
diff --git a/scripts/config/109-module-init-tools b/scripts/config/109-module-init-tools
index 3f92610..4e3c1fc 100755
--- a/scripts/config/109-module-init-tools
+++ b/scripts/config/109-module-init-tools
@@ -5,7 +5,11 @@ Module_init_tools ()
 	# Checking if package is installed
 	case "$(dpkg --print-architecture)" in
 		powerpc|ppc64)
-
+			# Checking if package is already configured
+			if [ -e /var/lib/live/config/module-init-tools ]
+			then
+				return
+			fi
 			;;
 
 		*)
@@ -20,7 +24,7 @@ Module_init_tools ()
 
 Configure_module_init_tools ()
 {
-	# Checking if apckage is already configured
+	# Checking if apckage is already configured differently
 	if grep -qs "snd_powermac" /etc/modules
 	then
 		return
@@ -28,6 +32,9 @@ Configure_module_init_tools ()
 
 	# Preconfiguring /etc/modules
 	echo "snd_powermac" >> /etc/modules
+
+	# Creating state file
+	touch /var/lib/live/config/module-init-tools
 }
 
 Module_init_tools
diff --git a/scripts/config/110-policykit b/scripts/config/110-policykit
index 34e4952..378474d 100755
--- a/scripts/config/110-policykit
+++ b/scripts/config/110-policykit
@@ -3,7 +3,8 @@
 Policykit ()
 {
 	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/policykit-1.list ]
+	if [ ! -e /var/lib/dpkg/info/policykit-1.list ] || \
+	   [ -e /var/lib/live/config/policykit ]
 	then
 		return
 	fi
@@ -34,12 +35,12 @@ cat > /etc/PolicyKit/PolicyKit.conf << EOF
 	</match>
 EOF
 
-	if [ -n "${USERNAME}" ]
+	if [ -n "${LIVE_USERNAME}" ]
 	then
 
 cat >> /etc/PolicyKit/PolicyKit.conf << EOF
 	<!-- don't ask password for user in live session -->
-	<match user="${USERNAME}">
+	<match user="${LIVE_USERNAME}">
 		<return result="yes"/>
 	</match>
 EOF
@@ -56,13 +57,15 @@ EOF
 cat > /var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla << EOF
 # Policy to allow the livecd user to bypass policykit
 [Live CD user permissions]
-Identity=unix-user:${USERNAME}
+Identity=unix-user:${LIVE_USERNAME}
 Action=*
 ResultAny=no
 ResultInactive=no
 ResultActive=yes
 EOF
 
+	# Creating state file
+	touch /var/lib/live/config/policykit
 }
 
 Policykit
diff --git a/scripts/config/111-sslcert b/scripts/config/111-sslcert
index 284c1ad..d5ceedf 100755
--- a/scripts/config/111-sslcert
+++ b/scripts/config/111-sslcert
@@ -3,7 +3,8 @@
 Sslcert ()
 {
 	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/sslcert.list ]
+	if [ ! -e /var/lib/dpkg/info/sslcert.list ] || \
+	   [ -e /var/lib/live/config/sslcert ]
 	then
 		return
 	fi
@@ -16,6 +17,9 @@ Sslcert ()
 Configure_sslcert ()
 {
 	make-ssl-cert generate-default-snakeoil --force-overwrite
+
+	# Creating state file
+	touch /var/lib/live/config/sslcert
 }
 
 Sslcert
diff --git a/scripts/config/112-update-notifier b/scripts/config/112-update-notifier
index 5d9b615..252e457 100755
--- a/scripts/config/112-update-notifier
+++ b/scripts/config/112-update-notifier
@@ -3,7 +3,8 @@
 Update_notifier ()
 {
 	# Checking if package is installed
-	if [ ! -e /var/lib/dpkg/info/update-notifier.list ]
+	if [ ! -e /var/lib/dpkg/info/update-notifier.list ] || \
+	   [ -e /var/lib/live/config/update-notifier ]
 	then
 		return
 	fi
@@ -30,6 +31,9 @@ Configure_update_notifier ()
 	# For KDE, adept_notifier's only useful function at the moment is an
 	# 'apt-get update' equivalent, so we disable it entirely.
 	rm -f /usr/share/autostart/adept_notifier_auto.desktop
+
+	# Creating state file
+	touch /var/lib/live/config/update-notifier
 }
 
 Update_notifier
diff --git a/scripts/config/999-hook b/scripts/config/999-hook
index f6383bb..3c4a6bf 100755
--- a/scripts/config/999-hook
+++ b/scripts/config/999-hook
@@ -2,7 +2,7 @@
 
 Hook ()
 {
-	if [ -z "${HOOK}" ]
+	if [ -z "${LIVE_HOOK}" ]
 	then
 		return
 	fi
@@ -14,21 +14,18 @@ Hook ()
 
 Process_hook ()
 {
-	HOOKS="$(echo ${HOOK} | sed -e 's/|/ /g')"
-
-	for HOOK in ${HOOKS}
+	for _HOOK in $(echo ${LIVE_HOOK} | sed -e 's/|/ /g')
 	do
-		TMPFILE="$(mktemp -t live-config.XXXXXXXX)"
+		_TMPFILE="$(mktemp -t live-config.XXXXXXXX)"
 
-		if $(echo "${HOOK}" | grep file:\/\/)
+		if $(echo "${_HOOK}" | grep file:\/\/)
 		then
 			# local file
-			HOOK="$(echo ${HOOK} | sed 's|file\://||')"
-			cp "${HOOK}" "${TMPFILE}"
+			cp $(echo ${_HOOK} | sed 's|file\://||') "${_TMPFILE}"
 		else
 			# remote file
 
-			if [ -z "${NETWORK}" ] && [ -e /etc/init.d/live-config ]
+			if [ -z "${_NETWORK}" ] && [ -e /etc/init.d/live-config ]
 			then
 				/etc/init.d/mountkernfs.sh start > /dev/null 2>&1
 				/etc/init.d/mountdevsubfs.sh start > /dev/null 2>&1
@@ -36,15 +33,15 @@ Process_hook ()
 				/etc/init.d/ifupdown start > /dev/null 2>&1
 				/etc/init.d/networking start > /dev/null 2>&1
 
-				NETWORK="true"
+				_NETWORK="true"
 			fi
 
-			wget --quiet "${HOOK}" -O "${TMPFILE}"
+			wget --quiet "${_HOOK}" -O "${_TMPFILE}"
 		fi
 
-		chmod 0755 "${TMPFILE}"
-		./"${TMPFILE}"
-		rm -f "${TMPFILE}"
+		chmod 0755 "${_TMPFILE}"
+		./"${_TMPFILE}"
+		rm -f "${_TMPFILE}"
 	done
 }
 

-- 
live-config



More information about the debian-live-changes mailing list