Update changelog, log the executed FAI command line to /var/log/grml-live.log
[grml-live.git] / etc / grml / fai / config / hooks / instsoft.GRMLBASE
index ac85fd9..def9e17 100755 (executable)
@@ -13,6 +13,11 @@ set -e
 # visualize chroot inside zsh:
 echo grml_chroot > $target/etc/debian_chroot
 
+HOSTNAME=''
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -n "$HOSTNAME" ] || HOSTNAME=grml
+echo "$HOSTNAME" > $target/etc/hostname
+
 if [ "$FAI_ACTION" = "softupdate" ] ; then
    echo "Softupdate of FAI via grml-live running"
 
@@ -57,19 +62,6 @@ EOF
       fi
       cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list
    fi
-
-   # FAI softupdate does not execute upgrade, so let's do it on our own:
-   $ROOTCMD apt-get update
-   if [ -x $target/usr/bin/aptitude ] ; then
-      if strings $target/usr/bin/aptitude | grep safe-upgrade 1>/dev/null ; then
-         $ROOTCMD aptitude -y safe-upgrade
-      else
-         $ROOTCMD aptitude -y upgrade
-      fi
-   else
-      $ROOTCMD apt-get -y upgrade
-   fi
-
 else # no softupdate but fresh installation
 
 # work around http://trac.lighttpd.net/trac/ticket/657