slackbuilds/a/UNUSED/aaa_cycojesus/config/etc/rc.d/rc.local_shutdown
Gwenhael Le Moine 0da671b6e8 big spring cleanup, putting aside currently unused scripts
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2013-03-25 22:41:45 +01:00

16 lines
483 B
Bash
Executable file

#!/bin/sh
PKGS_REPO=/home/installs/PKGs
# Move all recently built packages into our packages repository
mkdir -p $PKGS_REPO
find /tmp -name \*.t\?z -maxdepth 1 -exec mv {} $PKGS_REPO \;
# Clean up said repository of obsolete (not installed) packages
cd $PKGS_REPO
for i in *.t?z; do [ ! -e /var/adm/packages/${i%.t?z} ] && rm $i; done
if [ -x /etc/rc.d/rc.avahidaemon -a -x /etc/rc.d/rc.avahidnsconfd ]; then
/etc/rc.d/rc.avahidaemon stop
/etc/rc.d/rc.avahidnsconfd stop
fi