base-directories: generate required system dirs/symlinks before unpacking.
This commit is contained in:
parent
0b2716399b
commit
14b1d539e8
2 changed files with 13 additions and 12 deletions
|
@ -41,16 +41,6 @@ make_system_dirs()
|
|||
[ ! -d var/${d} ] && install -d var/${d}
|
||||
done
|
||||
|
||||
# Create /var/run and /var/lock symlinks.
|
||||
for d in run lock; do
|
||||
if [ ! -h "var/$d" -a -d var/${d} ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
cd var && ln -sf ../run . && cd ..
|
||||
cd var && ln -sf ../run/lock . && cd ..
|
||||
|
||||
if [ "$(uname -m)" = "x86_64" ]; then
|
||||
ln -sf usr/lib lib64
|
||||
cd usr && ln -sf lib lib64 && cd ..
|
||||
|
@ -62,12 +52,23 @@ make_system_dirs()
|
|||
ln -sf lib usr/lib32
|
||||
fi
|
||||
|
||||
# Create /var/run and /var/lock symlinks.
|
||||
for d in run lock; do
|
||||
if [ ! -h "var/$d" -a -d var/${d} ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
cd var && ln -sf ../run . && cd ..
|
||||
cd var && ln -sf ../run/lock . && cd ..
|
||||
|
||||
install -dm1777 tmp
|
||||
install -dm1777 var/tmp
|
||||
}
|
||||
|
||||
case "${ACTION}" in
|
||||
post)
|
||||
pre)
|
||||
echo "Creating system directories/symlinks..."
|
||||
make_system_dirs
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'base-directories'
|
||||
pkgname=base-directories
|
||||
version=0.25
|
||||
version=0.26
|
||||
revision=1
|
||||
noarch=yes
|
||||
bootstrap=yes
|
||||
|
|
Loading…
Reference in a new issue