2011-05-04 11:10:50 +00:00
|
|
|
case "${ACTION}" in
|
|
|
|
post)
|
|
|
|
# Create compat symlinks for /run.
|
2011-05-20 14:41:03 +00: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"
|
|
|
|
fi
|
|
|
|
elif [ -d "$dir" ]; then
|
|
|
|
echo "WARNING: removing directory /$dir..."
|
|
|
|
rm -rf "$dir"
|
2011-05-20 14:49:58 +00:00
|
|
|
fi
|
|
|
|
if [ ! -e "$dir" ]; then
|
2011-05-20 14:41:03 +00:00
|
|
|
ln -sf "$dest" "$dir"
|
|
|
|
fi
|
|
|
|
shift; shift;
|
2011-05-20 12:25:36 +00:00
|
|
|
done
|
2011-05-04 11:10:50 +00:00
|
|
|
;;
|
|
|
|
esac
|