Adjust locale handling (LANG/LANGUAGE) to match with Debian wheezy defaults
[grml-debootstrap.git] / chroot-script
index bbc91f0..3a8dca9 100755 (executable)
@@ -88,7 +88,7 @@ chrootmirror() {
 
   # add security.debian.org:
   case "$RELEASE" in
-    unstable|sid) ;;  # no security pool available
+    unstable|sid|lenny) ;;  # no security pool available
     *)
       echo "Adding security.debian.org to sources.list."
       echo "deb http://security.debian.org ${RELEASE}/updates $COMPONENTS" >> /etc/apt/sources.list
@@ -223,7 +223,7 @@ upgrade_system() {
   if [ "$UPGRADE_SYSTEM" = "yes" ] ; then
     echo "Running update + upgrade"
     $APTUPDATE
-    $APTUPGRADE
+    DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTUPGRADE
   else
     echo "Not running update + upgrade as \$UPDATE_AND_UPGRADE is not set to 'yes'."
   fi
@@ -311,6 +311,11 @@ get_kernel_version() {
 
 # install kernel packages {{{
 kernel() {
+  if [ -n "$NOKERNEL" ] ; then
+    echo "Skipping installation of kernel packages as requested via --nokernel"
+    return 0
+  fi
+
   $APTUPDATE
   KVER=$(get_kernel_version)
   if [ -n "$KVER" ] ; then
@@ -409,25 +414,6 @@ EOF
 }
 # }}}
 
-# set up /etc/network/interfaces {{{
-interfaces() {
-  if ! [ -r /etc/network/interfaces ] || ! grep -q "auto lo" /etc/network/interfaces ; then
-     echo "Setting up /etc/network/interfaces"
-     cat >> /etc/network/interfaces << EOF
-
-# loopback device:
-iface lo inet loopback
-auto lo
-
-# eth0:
-# iface eth0 inet dhcp
-# auto eth0
-
-EOF
-  fi
-}
-# }}}
-
 # set default locales {{{
 default_locales() {
   if [ -n "$DEFAULT_LOCALES" ] ; then
@@ -437,7 +423,7 @@ default_locales() {
       return 0
     fi
 
-    /usr/sbin/update-locale LANG="$DEFAULT_LOCALES"
+    /usr/sbin/update-locale LANGUAGE="$DEFAULT_LANGUAGE" LANG="$DEFAULT_LOCALES"
   fi
 }
 # }}}
@@ -466,7 +452,7 @@ proc           /proc        proc    defaults                      0   0
 # some other examples:
 # /dev/sda2       none         swap    sw,pri=0             0   0
 # /dev/hda1       /Grml        ext3    dev,suid,user,noauto 0  2
-# //1.2.3.4/pub   /smb/pub     smbfs   defaults,user,noauto,uid=grml,gid=grml 0 0
+# //1.2.3.4/pub   /smb/pub     cifs    user,noauto,uid=grml,gid=grml 0 0
 # linux:/pub      /beer        nfs     defaults             0  0
 # tmpfs           /tmp         tmpfs   size=300M            0  0
 # /dev/sda5       none         swap    sw                   0  0
@@ -621,7 +607,7 @@ trap signal_handler HUP INT QUIT TERM
  install_policy_rcd
 
  for i in chrootmirror grmlrepos backportrepos kernelimg_conf \
-     kernel packages extrapackages  reconfigure hosts interfaces \
+     kernel packages extrapackages reconfigure hosts \
      default_locales timezone fstab hostname initrd grub_install passwords \
      custom_scripts upgrade_system remove_apt_cache services \
      remove_chrootmirror; do