From: Michael Prokop Date: Fri, 3 Nov 2006 21:28:45 +0000 (+0100) Subject: - support setting locales through /etc/debootstrap/locale.gen X-Git-Tag: 0.2~37 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=d77bff2588c15a18a6b83455fd8af19265726950 - support setting locales through /etc/debootstrap/locale.gen - make sure ssh server is stopped when present before exiting chroot --- diff --git a/chroot-script b/chroot-script index 2f8b964..63bc8d8 100644 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Fre Nov 03 21:57:11 CET 2006 [mika] +# Latest change: Fre Nov 03 22:27:09 CET 2006 [mika] ################################################################################ set -e # exit on any error @@ -17,7 +17,7 @@ if [ -n "$CHROOTMIRROR" ] ; then echo "$CHROOTMIRROR" > /etc/apt/sources.list fi -if ! [ -n /etc/kernel-img.conf ] ; then +if ! [ -r /etc/kernel-img.conf ] ; then echo "Setting up /etc/kernel-img.conf" cat > /etc/kernel-img.conf << EOF # Kernel Image management overrides @@ -142,6 +142,9 @@ if [ -n "$GROOT" ] ; then fi fi +# make sure we don't have any running processes left +[ -x /etc/init.d/ssh ] && /etc/init.d/ssh stop + # unmount all filesystems in chroot, make sure nothing is left... umount -a 1>/dev/null 2>/dev/null || true umount /proc 1>/dev/null 2>/dev/null || true diff --git a/config b/config index d7ed365..753845d 100644 --- a/config +++ b/config @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Fre Nov 03 17:14:33 CET 2006 [mika] +# Latest change: Fre Nov 03 22:05:19 CET 2006 [mika] ################################################################################ ################################################################################ @@ -31,6 +31,7 @@ MBR='' KERNEL='linux-image-686' # name of debootstrap executable +# supported values: debootstrap cdebootstrap DEBOOTSTRAP='debootstrap' # install packages defined in /etc/debootstrap/packages? @@ -72,6 +73,9 @@ FSCK='yes' # which packages do you want do dpkg-reconfigure? RECONFIGURE='locales console-data' +# use /etc/debootstrap/locale.gen for configuration of locales? +LOCALES='yes' + # use /usr/share/zoneinfo/$TIMEZONE for /etc/localtime TIMEZONE='Europe/Vienna' diff --git a/debian/changelog b/debian/changelog index 0fb062a..9d666d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ grml-debootstrap (0.2) unstable; urgency=low - cdebootstrap - setting hostname via /etc/hostname - /etc/kernel-img.conf + - support setting locales through /etc/debootstrap/locale.gen * Added ssh to default package list. -- Michael Prokop Fri, 3 Nov 2006 19:05:19 +0100 diff --git a/debian/rules b/debian/rules index 5f732d0..72f6785 100755 --- a/debian/rules +++ b/debian/rules @@ -29,6 +29,7 @@ install: build # Add here commands to install the package into debian/grml-debootstrap. install -m 644 config debian/grml-debootstrap/etc/debootstrap/ + install -m 644 locale.gen debian/grml-debootstrap/etc/debootstrap/ install -m 644 packages debian/grml-debootstrap/etc/debootstrap/ install -m 755 chroot-script debian/grml-debootstrap/etc/debootstrap/ install -m 755 grml-debootstrap debian/grml-debootstrap/usr/sbin/ diff --git a/grml-debootstrap b/grml-debootstrap index 98e0e0e..3793b58 100644 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -104,6 +104,9 @@ einfo "Preparing chroot system" # make sure we can access network [relevant for cdebootstrap] [ -f "$MNTPOINT/etc/resolv.conf" ] || cp /etc/resolv.conf $MNTPOINT/etc/resolv.conf + # setup default locales + [ -n "$LOCALES" ] && cp /etc/debootstrap/locale.gen $MNTPOINT/etc/locale.gen + # copy any existing existing files to chroot [ -d /etc/debootstrap/boot ] && cp -a /etc/debootstrap/boot/* $MNTPOINT/boot/ [ -d /etc/debootstrap/etc ] && cp -a /etc/debootstrap/etc/* $MNTPOINT/etc/