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
|
case "${ACTION}" in
|
||||||
post)
|
post)
|
||||||
# Create compat symlinks for /run.
|
# Create compat symlinks for /run.
|
||||||
for d in tmp var/tmp var/run var/lock lib/rc/init.d; do
|
mntpnts="tmp /run/tmp"
|
||||||
[ -h "$d" ] && rm -f "$d"
|
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
|
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
|
esac
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'base-directories'
|
# Template file for 'base-directories'
|
||||||
pkgname=base-directories
|
pkgname=base-directories
|
||||||
version=0.7
|
version=0.10
|
||||||
build_style=custom-install
|
build_style=custom-install
|
||||||
short_desc="XBPS FHS Base System directories"
|
short_desc="XBPS FHS Base System directories"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue