[SCM] live-config branch, upstream, updated. upstream/2.0_a1-1-g0899560
Daniel Baumann
daniel at debian.org
Thu May 27 20:46:21 UTC 2010
The following commit has been merged in the upstream branch:
commit 0899560c3336fb513b1fbe95c064f6d7b0be367d
Author: Daniel Baumann <daniel at debian.org>
Date: Thu May 27 22:39:55 2010 +0200
Adding upstream version 2.0~a2.
diff --git a/Makefile b/Makefile
index eee6130..91a01fc 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,14 @@ SHELL := sh -e
LANGUAGES = de
+SCRIPTS = examples/scripts/* scripts/config.sh scripts/config/*
+
all: test build
test:
@echo -n "Checking for syntax errors"
- @for SCRIPT in examples/scripts/* scripts/config.sh scripts/config/*; \
+ @for SCRIPT in $(SCRIPTS); \
do \
sh -n $${SCRIPT}; \
echo -n "."; \
@@ -21,7 +23,7 @@ test:
@if [ -x /usr/bin/checkbashisms ]; \
then \
- for SCRIPT in examples/scripts/* scripts/config.sh scripts/config/*; \
+ for SCRIPT in $(SCRIPTS); \
do \
checkbashisms $${SCRIPT}; \
echo -n "."; \
@@ -48,7 +50,7 @@ install:
for MANPAGE in manpages/en/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
- install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
+ install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \
done
for LANGUAGE in $(LANGUAGES); \
diff --git a/VERSION b/VERSION
index 3ca84b6..0a140b3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0~a1
+2.0~a2
diff --git a/manpages/de/live-config.de.7 b/manpages/de/live-config.de.7
index f8ef097..1dd3e52 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 24.05.2010 2.0~a1 "Debian Live Projekt"
+.TH LIVE\-CONFIG 7 27.05.2010 2.0~a2 "Debian Live Projekt"
.SH NAME
\fBlive\-config\fP \- System Konfiguration Skripte
@@ -38,8 +38,8 @@ Ordnungsnummer.
.SS Konfigurationsdateien
\fBlive\-config\fP kann durch Konfigurationsdateien konfiguriert (nicht aber
aktiviert) werden. Die Konfigurationsdatei kann entweder im Root Dateisystem
-selbst plaziert werden (/etc/live/config.conf) oder auf dem Live Medium
-(live/config.conf).
+selbst plaziert werden (/etc/live/config.conf, /etc/live/config.conf.d/)
+oder auf dem Live Medium (live/config.conf, live/config.conf.d/).
.SH SKRIPTE
\fBlive\-config\fP enthaelt derzeit folgende Skripte in /lib/live/config.
@@ -95,7 +95,9 @@ einem HTTP/FTP Server auszufuehren.
.SH DATEIEN
.IP \fB/etc/live/config.conf\fP 4
+.IP \fB/etc/live/config.conf.d/\fP 4
.IP \fBlive/config.conf\fP 4
+.IP \fBlive/config.conf.d/\fP 4
.IP \fB/lib/live/config.sh\fP 4
.IP \fB/lib/live/config/\fP 4
diff --git a/manpages/en/live-config.7 b/manpages/en/live-config.7
index ce04438..d8f7fab 100644
--- a/manpages/en/live-config.7
+++ b/manpages/en/live-config.7
@@ -1,4 +1,4 @@
-.TH LIVE\-CONFIG 7 2010\-05\-24 2.0~a1 "Debian Live Project"
+.TH LIVE\-CONFIG 7 2010\-05\-27 2.0~a2 "Debian Live Project"
.SH NAME
\fBlive\-config\fR \- System Configuration Scripts
@@ -19,7 +19,7 @@ If no script should be execured, 'live\-config=none' can be used.
If some scripts are specified, then only those scripts are executed. Note that the order matters, e.g. 'live\-config=sudo,user-setup' would not work since the user needs to be added before it can be configured for sudo. Look at the filenames of the scripts in /lib/live/config for their ordering number.
.SS Configuration Files
-\fBlive\-config\fR can be configured (but not activated) through configuration files. Those files can be placed either in the root filesystem itself (/etc/live/config.conf), or on the live media (live/config.conf).
+\fBlive\-config\fR can be configured (but not activated) through configuration files. Those files can be placed either in the root filesystem itself (/etc/live/config.conf, /etc/live/config.conf.d/), or on the live media (live/config.conf, live/config.conf.d/).
.SH SCRIPTS
\fBlive\-config\fR currently features the following scripts in /lib/live/config.
@@ -72,7 +72,9 @@ allows to run arbitrary commands from a script placed on the live media or an ht
.SH FILES
.IP "\fB/etc/live/config.conf\fR" 4
+.IP "\fB/etc/live/config.conf.d/\fR" 4
.IP "\fBlive/config.conf\fR" 4
+.IP "\fBlive/config.conf.d/\fR" 4
.IP "\fB/lib/live/config.sh\fR" 4
.IP "\fB/lib/live/config/\fR" 4
diff --git a/manpages/po/de/live-config.7.po b/manpages/po/de/live-config.7.po
index 8e0d9ce..ba606b1 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~a1\n"
-"POT-Creation-Date: 2010-05-24 10:18+0300\n"
+"POT-Creation-Date: 2010-05-24 11:34+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,14 +24,14 @@ msgstr "LIVE-CONFIG"
#. type: TH
#: en/live-config.7:1
#, no-wrap
-msgid "2010-05-24"
-msgstr "24.05.2010"
+msgid "2010-05-27"
+msgstr "27.05.2010"
#. type: TH
#: en/live-config.7:1
#, no-wrap
-msgid "2.0~a1"
-msgstr "2.0~a1"
+msgid "2.0~a2"
+msgstr "2.0~a2"
#. type: TH
#: en/live-config.7:1
@@ -139,12 +139,13 @@ msgstr "Konfigurationsdateien"
msgid ""
"B<live-config> can be configured (but not activated) through configuration "
"files. Those files can be placed either in the root filesystem itself (/etc/"
-"live/config.conf), or on the live media (live/config.conf)."
+"live/config.conf, /etc/live/config.conf.d/), or on the live media (live/"
+"config.conf, live/config.conf.d/)."
msgstr ""
"B<live-config> kann durch Konfigurationsdateien konfiguriert (nicht aber "
"aktiviert) werden. Die Konfigurationsdatei kann entweder im Root Dateisystem "
-"selbst plaziert werden (/etc/live/config.conf) oder auf dem Live Medium "
-"(live/config.conf)."
+"selbst plaziert werden (/etc/live/config.conf, /etc/live/config.conf.d/) "
+"oder auf dem Live Medium (live/config.conf, live/config.conf.d/)."
#. type: SH
#: en/live-config.7:24
@@ -435,45 +436,57 @@ msgstr "B</etc/live/config.conf>"
#. type: IP
#: en/live-config.7:75
#, no-wrap
+msgid "B</etc/live/config.conf.d/>"
+msgstr "B</etc/live/config.conf.d/>"
+
+#. type: IP
+#: en/live-config.7:76
+#, no-wrap
msgid "B<live/config.conf>"
msgstr "B<live/config.conf>"
#. type: IP
-#: en/live-config.7:76
+#: en/live-config.7:77
+#, no-wrap
+msgid "B<live/config.conf.d/>"
+msgstr "B<live/config.conf.d/>"
+
+#. type: IP
+#: en/live-config.7:78
#, no-wrap
msgid "B</lib/live/config.sh>"
msgstr "B</lib/live/config.sh>"
#. type: IP
-#: en/live-config.7:77
+#: en/live-config.7:79
#, no-wrap
msgid "B</lib/live/config/>"
msgstr "B</lib/live/config/>"
#. type: SH
-#: en/live-config.7:79
+#: en/live-config.7:81
#, no-wrap
msgid "SEE ALSO"
msgstr "SIEHE AUCH"
#. type: Plain text
-#: en/live-config.7:81
+#: en/live-config.7:83
msgid "I<live-helper>(7)"
msgstr "I<live-helper>(7)"
#. type: Plain text
-#: en/live-config.7:83
+#: en/live-config.7:85
msgid "I<live-initramfs>(7)"
msgstr "I<live-initramfs>(7)"
#. type: SH
-#: en/live-config.7:84
+#: en/live-config.7:86
#, no-wrap
msgid "HOMEPAGE"
msgstr "HOMEPAGE"
#. type: Plain text
-#: en/live-config.7:86
+#: en/live-config.7:88
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 "
@@ -484,13 +497,13 @@ msgstr ""
"unter E<lt>I<http://live.debian.net/manual/>E<gt> gefunden werden."
#. type: SH
-#: en/live-config.7:87
+#: en/live-config.7:89
#, no-wrap
msgid "BUGS"
msgstr "FEHLER"
#. type: Plain text
-#: en/live-config.7:89
+#: en/live-config.7:91
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 "
@@ -504,13 +517,13 @@ msgstr ""
"werden."
#. type: SH
-#: en/live-config.7:90
+#: en/live-config.7:92
#, no-wrap
msgid "AUTHOR"
msgstr "AUTOR"
#. type: Plain text
-#: en/live-config.7:91
+#: en/live-config.7:93
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 5442815..3d6d80b 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-24 10:18+0300\n"
+"POT-Creation-Date: 2010-05-27 22:36+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,13 +24,13 @@ msgstr ""
#. type: TH
#: en/live-config.7:1
#, no-wrap
-msgid "2010-05-24"
+msgid "2010-05-27"
msgstr ""
#. type: TH
#: en/live-config.7:1
#, no-wrap
-msgid "2.0~a1"
+msgid "2.0~a2"
msgstr ""
#. type: TH
@@ -123,7 +123,8 @@ msgstr ""
msgid ""
"B<live-config> can be configured (but not activated) through configuration "
"files. Those files can be placed either in the root filesystem itself (/etc/"
-"live/config.conf), or on the live media (live/config.conf)."
+"live/config.conf, /etc/live/config.conf.d/), or on the live media (live/"
+"config.conf, live/config.conf.d/)."
msgstr ""
#. type: SH
@@ -409,45 +410,57 @@ msgstr ""
#. type: IP
#: en/live-config.7:75
#, no-wrap
-msgid "B<live/config.conf>"
+msgid "B</etc/live/config.conf.d/>"
msgstr ""
#. type: IP
#: en/live-config.7:76
#, no-wrap
-msgid "B</lib/live/config.sh>"
+msgid "B<live/config.conf>"
msgstr ""
#. type: IP
#: en/live-config.7:77
#, no-wrap
+msgid "B<live/config.conf.d/>"
+msgstr ""
+
+#. type: IP
+#: en/live-config.7:78
+#, no-wrap
+msgid "B</lib/live/config.sh>"
+msgstr ""
+
+#. type: IP
+#: en/live-config.7:79
+#, no-wrap
msgid "B</lib/live/config/>"
msgstr ""
#. type: SH
-#: en/live-config.7:79
+#: en/live-config.7:81
#, no-wrap
msgid "SEE ALSO"
msgstr ""
#. type: Plain text
-#: en/live-config.7:81
+#: en/live-config.7:83
msgid "I<live-helper>(7)"
msgstr ""
#. type: Plain text
-#: en/live-config.7:83
+#: en/live-config.7:85
msgid "I<live-initramfs>(7)"
msgstr ""
#. type: SH
-#: en/live-config.7:84
+#: en/live-config.7:86
#, no-wrap
msgid "HOMEPAGE"
msgstr ""
#. type: Plain text
-#: en/live-config.7:86
+#: en/live-config.7:88
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 "
@@ -455,13 +468,13 @@ msgid ""
msgstr ""
#. type: SH
-#: en/live-config.7:87
+#: en/live-config.7:89
#, no-wrap
msgid "BUGS"
msgstr ""
#. type: Plain text
-#: en/live-config.7:89
+#: en/live-config.7:91
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 "
@@ -470,13 +483,13 @@ msgid ""
msgstr ""
#. type: SH
-#: en/live-config.7:90
+#: en/live-config.7:92
#, no-wrap
msgid "AUTHOR"
msgstr ""
#. type: Plain text
-#: en/live-config.7:91
+#: en/live-config.7:93
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 d80a32d..28ef61d 100755
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -45,6 +45,11 @@ Cmdline ()
USER_FULLNAME="${PARAMETER#live-config.user-fullname=}"
;;
+ # 005-locales
+ live-config.locales=*)
+ LOCALES="${PARAMETER#live-config.locales=}"
+ ;;
+
# 999-hook
live-config.hook=*)
HOOK="${PARAMETER#live-config.hook=}"
@@ -96,12 +101,28 @@ Main ()
. /etc/live/config.conf
fi
+ if ls /etc/live/config.conf.d/* > /dev/null 2>&1
+ then
+ for FILE in /etc/live/config.conf.d/*
+ do
+ . ${FILE}
+ done
+ fi
+
# Reading configuration file from live-media (FIXME: needs better name)
if [ -e /live/image/live/config.conf ]
then
. /live/image/live/config.conf
fi
+ if ls /live/image/live/config.conf.d/* > /dev/null 2>&1
+ then
+ for FILE in /live/image/live/config.conf.d/*
+ do
+ . ${FILE}
+ done
+ fi
+
# Reading kernel command line
Cmdline
diff --git a/scripts/config/004-locales b/scripts/config/004-locales
new file mode 100755
index 0000000..1d9810c
--- /dev/null
+++ b/scripts/config/004-locales
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+Locales ()
+{
+ # Checking if package is installed
+ if [ ! -e /var/lib/dpkg/info/locales.list ]
+ then
+ return
+ fi
+
+ echo -n " locales"
+
+ Configure_locales
+}
+
+Configure_locales ()
+{
+ if [ -e /etc/default/locale ]
+ then
+ # use rootfs configured locale
+ LOCALE="$(grep -s 'LANG=' /etc/default/locale | sed s/'LANG='// | tr -d '"' )"
+ fi
+
+ if [ -n "${LOCALES}" ]
+ then
+ LOCALE="${LOCALES}"
+ SET_LOCALE="true"
+ fi
+
+ if [ -z "${LOCALE}" ]
+ then
+ # Set a default one
+ LOCALE="en_US.UTF-8"
+ SET_LOCALE="true"
+ fi
+
+ LANGUAGE="$(echo $locale | cut -d. -f1)"
+ export LANGUAGE
+
+ if [ -z "${SET_LOCALE}" ]
+ then
+ # Actually, we should check here if the locale is generated
+ return
+ fi
+
+ 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}"
+ export KBD
+ fi
+
+ 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)
+
+ 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)
+
+ if [ -n "${LANG}" ]
+ then
+ 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}"
+ fi
+
+ printf 'LANG="%s"\n' "${LANG}" > /etc/default/locale
+ sed -i -e "s|# ${LANG} ${CODEPAGE}|${LANG} ${CODEPAGE}|" /etc/locale.gen
+
+ locale-gen --keep-existing > /dev/null 2>&1
+}
+
+Locales
diff --git a/scripts/config/004-tzdata b/scripts/config/005-tzdata
similarity index 100%
rename from scripts/config/004-tzdata
rename to scripts/config/005-tzdata
diff --git a/scripts/config/005-gdm b/scripts/config/006-gdm
similarity index 100%
rename from scripts/config/005-gdm
rename to scripts/config/006-gdm
diff --git a/scripts/config/006-gdm3 b/scripts/config/007-gdm3
similarity index 100%
rename from scripts/config/006-gdm3
rename to scripts/config/007-gdm3
diff --git a/scripts/config/007-kdm b/scripts/config/008-kdm
similarity index 69%
rename from scripts/config/007-kdm
rename to scripts/config/008-kdm
index b225fdc..992a595 100755
--- a/scripts/config/007-kdm
+++ b/scripts/config/008-kdm
@@ -18,17 +18,35 @@ Configure_kdm ()
if [ -e /etc/kde4/kdm/kdmrc ]
then
# squeeze
+
+ # autologin
sed -i -r -e "s|^#?AutoLoginEnable=.*\$|AutoLoginEnable=true|" \
-e "s|^#?AutoLoginAgain=.*\$|AutoLoginAgain=true|" \
-e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${USERNAME}|" \
/etc/kde4/kdm/kdmrc
+
+ # language
+ if [ -n "${LANGUAGE}" ]
+ then
+ sed -i -r -e "s|^#?Language=.*\$|Language=${LANGUAGE}|" \
+ /etc/kde4/kdm/kdmrc
+ fi
elif [ -e /etc/kde3/kdm/kdmrc ]
then
# lenny
+
+ # autologin
sed -i -r -e "s|^#?AutoLoginEnable=.*\$|AutoLoginEnable=true|" \
-e "s|^#?AutoLoginAgain=.*\$|AutoLoginAgain=true|" \
-e "s|^#?AutoLoginUser=.*\$|AutoLoginUser=${USERNAME}|" \
/etc/kde3/kdm/kdmrc
+
+ # language
+ if [ -n "${LANGUAGE}" ]
+ then
+ sed -i -r -e "s|^#?Language=.*\$|Language=${LANGUAGE}|" \
+ /etc/kde3/kdm/kdmrc
+ fi
fi
}
diff --git a/scripts/config/008-lxdm b/scripts/config/009-lxdm
similarity index 100%
rename from scripts/config/008-lxdm
rename to scripts/config/009-lxdm
diff --git a/scripts/config/009-nodm b/scripts/config/010-nodm
similarity index 100%
rename from scripts/config/009-nodm
rename to scripts/config/010-nodm
--
live-config
More information about the debian-live-changes
mailing list