2011-05-04 13:10:50 +02:00
|
|
|
case "${ACTION}" in
|
|
|
|
post)
|
|
|
|
# Create compat symlinks for /run.
|
2011-05-20 16:41:03 +02:00
|
|
|
mntpnts="tmp /run/tmp"
|
|
|
|
mntpnts="$mntpnts var/tmp /run/tmp"
|
|
|
|
mntpnts="$mntpnts var/run /run"
|
|
|
|
mntpnts="$mntpnts var/lock /run/lock"
|
|
|
|
mntpnts="$mntpnts lib/rc/init.d /run/init.d"
|
|
|
|
|
|
|
|
set -- ${mntpnts}
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
dir="$1"
|
|
|
|
dest="$2"
|
|
|
|
if [ -h "$dir" ]; then
|
|
|
|
if [ "$(readlink -f $dir)" != "$dest" ]; then
|
|
|
|
echo "WARNING: removing wrong symlink in /$dir..."
|
|
|
|
rm -f "$dir"
|
|
|
|
ln -sf "$dest" "$dir"
|
|
|
|
fi
|
|
|
|
elif [ -d "$dir" ]; then
|
|
|
|
echo "WARNING: removing directory /$dir..."
|
|
|
|
rm -rf "$dir"
|
|
|
|
ln -sf "$dest" "$dir"
|
|
|
|
fi
|
|
|
|
shift; shift;
|
2011-05-20 14:25:36 +02:00
|
|
|
done
|
2011-05-04 13:10:50 +02:00
|
|
|
;;
|
|
|
|
esac
|