From 14b1d539e8835203fec69dfc132c9d09889ab5e9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 16 Mar 2014 09:39:30 +0100 Subject: [PATCH] base-directories: generate required system dirs/symlinks before unpacking. --- srcpkgs/base-directories/INSTALL | 23 ++++++++++++----------- srcpkgs/base-directories/template | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/srcpkgs/base-directories/INSTALL b/srcpkgs/base-directories/INSTALL index 964edc3431e..32b417e0187 100644 --- a/srcpkgs/base-directories/INSTALL +++ b/srcpkgs/base-directories/INSTALL @@ -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 diff --git a/srcpkgs/base-directories/template b/srcpkgs/base-directories/template index b56b7ec8320..5a6bc090375 100644 --- a/srcpkgs/base-directories/template +++ b/srcpkgs/base-directories/template @@ -1,6 +1,6 @@ # Template file for 'base-directories' pkgname=base-directories -version=0.25 +version=0.26 revision=1 noarch=yes bootstrap=yes