base-directories: really fix the /run compat symlinks.
This commit is contained in:
parent
d82ab55252
commit
147080c7bb
2 changed files with 23 additions and 8 deletions
|
@ -1,13 +1,28 @@
|
|||
case "${ACTION}" in
|
||||
post)
|
||||
# Create compat symlinks for /run.
|
||||
for d in tmp var/tmp var/run var/lock lib/rc/init.d; do
|
||||
[ -h "$d" ] && rm -f "$d"
|
||||
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;
|
||||
done
|
||||
ln -sf /run/init.d lib/rc/init.d
|
||||
ln -sf /run/tmp tmp
|
||||
ln -sf /run/tmp var/tmp
|
||||
ln -sf /run var/run
|
||||
ln -sf /run/lock var/lock
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'base-directories'
|
||||
pkgname=base-directories
|
||||
version=0.7
|
||||
version=0.10
|
||||
build_style=custom-install
|
||||
short_desc="XBPS FHS Base System directories"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
Loading…
Reference in a new issue