Группа :: Система/Настройка/Пакеты
Пакет: apt-autoclean
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/sh
[ -z "$DURING_INSTALL" ] || exit 0
[ -z "$FAKEROOTKEY" ] || exit 0
lockdir=/var/lock/apt-autoclean/lockdir
exit_handler()
{
local rc=$?
trap - EXIT
rm -rf -- "$lockdir"
exit $rc
}
pidfile="$lockdir/pid"
if ! mkdir -pm700 -- "$lockdir"; then
[ ! -s "$pidfile" ] ||
echo "apt-autoclean is already running, pid=`cat "$pidfile"`"
exit 1
fi
trap exit_handler SIGHUP SIGPIPE SIGINT SIGQUIT SIGTERM EXIT
echo $$ >"$pidfile"
apt-get autoclean >/dev/null