GRMLBASE/98-clean-chroot: recursively remove /var/lib/clamav/clamav-*.
[grml-live-grml.git] / etc / grml / fai / config / scripts / GRMLBASE / 98-clean-chroot
index 5b7c533..923277f 100755 (executable)
@@ -24,10 +24,6 @@ else
   echo "Warning: localepurg not installed"
 fi
 
-# find /var -name \*.pid
-echo "Removing pid-files"
-find $target/var/run -name \*.pid -exec rm {} \;
-
 echo "Removing /var/lib/apt/lists/*-stuff, dpkg-status-old and pkgcache.bin"
 rm -f $target/var/lib/apt/lists/*Packages \
       $target/var/lib/apt/lists/*Release \
@@ -71,7 +67,7 @@ find $target/etc -type f -name *.pre_fcopy -delete
 rm -rf --one-file-system $target/etc/sysconfig/* \
        $target/etc/motd.dpkg-* $target/etc/auto.master.*dpkg* \
        $target/etc/samba/*.SID $target/etc/samba/*.tdb \
-       $target/var/run $target/var/log/ksymoops/* $target/var/lock/*  \
+       $target/var/log/ksymoops/* \
        $target/var/state/* $target/var/log/nessus/* \
        $target/halt $target/reboot $target/ash.static \
        $target/etc/dhcpc/*.info $target/etc/dhcpc/resolv* \
@@ -146,7 +142,7 @@ if ! [ -d $target/var/lib/clamav/ ] ; then
   echo "Warning: clamav[-freshclam] not installed"
 else
   echo "Cleaning /var/lib/clamav/"
-  rm -f $target/var/lib/clamav/clamav-*
+  $ROOTCMD rm -rf /var/lib/clamav/clamav-*
 
   echo "Setting up daily.cvd and main.cvd symlinks"
   if [ -f $target/var/lib/clamav/daily.cvd ] ; then