Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37860558
en ru br
ALT Linux repos
S:0.1-alt1

Group :: System/Configuration/Packaging
RPM: apt-autoclean

 Main   Changelog   Spec   Patches   Sources   Download   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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin