static usb ethnet addresses
[automated-distro-installer] / fai / config / hooks / updatebase.UBUNTU
index 2d1161c5ea833e12eb6284023962fb7f73fbd4a8..98f775f077c3d871191b9cb1a2bcae427ab5ff4e 100755 (executable)
@@ -1,14 +1,11 @@
 #! /bin/bash
 
-# use external mirror, remove this script when using a mirror from CD
-
-cat <<EOM > $target/etc/apt/sources.list
-# external mirror
-deb $ubuntumirror/ubuntu $ubuntudist main restricted universe multiverse
-deb $ubuntumirror/ubuntu $ubuntudist-updates main restricted universe multiverse
-deb $ubuntumirror/ubuntu $ubuntudist-security main restricted universe multiverse
-EOM
+# mk-basefile doesn't use the -updates suite, then we unpack it, then we
+# install sources.list that has -updates and we install random
+# packages. It might avoid a problem if we a dist-upgrade first.
 
+$ROOTCMD apt-get update
+$ROOTCMD apt-get -y dist-upgrade --purge --auto-remove
 
 # https://lists.uni-koeln.de/pipermail/linux-fai/2016-July/011398.html
 # In Ubuntu 16.04 (but not 14.04), the locales configuration mechanism has
@@ -19,8 +16,9 @@ EOM
 # hook applies the debconf setting.  It must run after FAI's debconf task
 # but before dpkg gets a chance to clobber debconf with an empty setting.
 
+
 if [ ! -f "$target/var/lib/locales/supported.d/local" ]; then
-    $ROOTCMD debconf --owner=locales sh -c '
+  $ROOTCMD debconf --owner=locales sh -c '
         . /usr/share/debconf/confmodule
         db_version 2.0
         db_get locales/locales_to_be_generated &&