1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/bin/sh
set -e
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = "purge" ] ; then
#rm instances (the meta/pkg file can still be used)
if [ -z "$DPKG_ROOT" ] && [ "$(uname -s)" = 'GNU' ] ; then
#rm the console instance we created in portinst on Hurd
for i in 1 2 3 4 5 6 7 ; do
#[ -r /etc/sv/getty@console/.meta/pkg ] || break
#pkgname=$(cat /etc/sv/getty@console/.meta/pkg)
#[ 'getty-run' = "$pkgname" ] || break
if [ ! -e /etc/sv/getty@console/supervise/lock ]; then
rm -rf /etc/sv/getty@console ; break ;
elif timeout 1 flock /etc/sv/getty@console/supervise/lock true ; then
rm -rf /etc/sv/getty@console
break
else
echo "waiting for runsv to exit.."
fi
done
fi
#now rm the template
echo "purging the getty@default template.."
if rm -rf /usr/share/runit/sv.now/getty@default ; then
echo ".. done"
fi
fi
#DEBHELPER#
|