X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fhooks%2Finstsoft.GRMLBASE;h=05033115663a616010ddd5149e6023183398b639;hb=bc4c12b30c8d01843efcd08c9b0d4cf2eded4712;hp=4d087e72e29962d45ee63724a1a16cda30e9eaeb;hpb=130429e20fb319f3ec6a457f3219b7e52216b542;p=grml-live.git diff --git a/etc/grml/fai/config/hooks/instsoft.GRMLBASE b/etc/grml/fai/config/hooks/instsoft.GRMLBASE index 4d087e7..0503311 100755 --- a/etc/grml/fai/config/hooks/instsoft.GRMLBASE +++ b/etc/grml/fai/config/hooks/instsoft.GRMLBASE @@ -23,11 +23,11 @@ if [ "$FAI_ACTION" = "softupdate" ] ; then echo "Softupdate of FAI via grml-live running" if [ -r /etc/resolv.conf ] ; then - if [ -r $target/etc/resolvconf/run/resolv.conf ] ; then - cat /etc/resolv.conf >> $target/etc/resolvconf/run/resolv.conf - else - cat /etc/resolv.conf >> $target/etc/resolv.conf - fi + if [ -r $target/etc/resolvconf/run/resolv.conf ] ; then + cat /etc/resolv.conf >> $target/etc/resolvconf/run/resolv.conf + else + cat /etc/resolv.conf >> $target/etc/resolv.conf + fi fi if [ -r $target/etc/policy-rc.d.conf ] ; then @@ -57,12 +57,26 @@ EOF fi fi + # FAI softupdate executes upgrade only with the sources.list being + # present in the chroot :-/ - so let's do it on our own: if [ -r /etc/grml/fai/apt/sources.list ] ; then if [ -L $target/etc/apt/sources.list ] ; then rm $target/etc/apt/sources.list fi cp /etc/grml/fai/apt/sources.list $target/etc/apt/sources.list fi + + $ROOTCMD apt-get update + if [ -x $target/usr/bin/aptitude ] ; then + if $ROOTCMD aptitude --help | grep -q safe-upgrade ; 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