GRMLBASE/98-clean-chroot: get rid of /wget-log* files
authorMichael Prokop <mika@grml.org>
Tue, 10 Dec 2019 15:05:58 +0000 (16:05 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 10 Dec 2019 15:08:16 +0000 (16:08 +0100)
The update-pciids run under timeout(1) within
/etc/grml/fai/config/scripts/GRMLBASE/91-update-pciids
might fail and leave /wget-log* files behind, like:

| root@gf-internal ~ # cat /srv/grml-live/grml64-forensic_2020.01-1/grml_chroot/wget-log
| http://pciids.sourceforge.net/v2.2/pci.ids.bz2:
| 2019-12-10 15:02:31 ERROR 503: Service Temporarily Unavailable.
| root@gf-internal ~ # cat /srv/grml-live/grml64-forensic_2020.01-1/grml_chroot/wget-log.1
| http://pciids.sourceforge.net/v2.2/pci.ids.bz2:
| 2019-12-10 15:07:44 ERROR 503: Service Temporarily Unavailable.

This does *not* happen when being manually invoked,
so it seems to be something related to the environment
of FAI. Couldn't spot the underlying issue yet though
and we clearly don't want to ship any such files
inside the root directory of the rootfs.

etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot

index 88cba00..4a5e0cb 100755 (executable)
@@ -113,6 +113,9 @@ zero(){
   done
 }
 
   done
 }
 
+echo "Removing possible leftovers from update-pciids runs"
+rm -f "${target}"/wget-log*
+
 echo "Cleaning log and cache directories"
 nuke ${target}/var/log       ${target}/var/cache
 zero ${target}/var/account/pacct \
 echo "Cleaning log and cache directories"
 nuke ${target}/var/log       ${target}/var/cache
 zero ${target}/var/account/pacct \