summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-04 04:20:57 +0000
committerMike Frysinger <vapier@gentoo.org>2011-10-04 04:20:57 +0000
commitbc72d8bf4e11e19c490d8e684e69686746ef6cc8 (patch)
tree9898be3a9d7d5c9fa2324d71bec71109c7d353e8
parentsymlink /var/run to /run and /var/lock to /run/lock (diff)
downloadbaselayout-bc72d8bf4e11e19c490d8e684e69686746ef6cc8.tar.gz
baselayout-bc72d8bf4e11e19c490d8e684e69686746ef6cc8.tar.bz2
baselayout-bc72d8bf4e11e19c490d8e684e69686746ef6cc8.zip
restore /var/lock and /var/run for BSD, and move /run and /run/lock into Linux-specific logic
svn path=/trunk/; revision=3201
-rw-r--r--Makefile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d22e9159..6f066243 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,9 @@ OS=BSD
endif
endif
+KEEP_DIRS-BSD += \
+ /var/lock \
+ /var/run
KEEP_DIRS-Linux += \
/dev \
/run \
@@ -56,13 +59,23 @@ install:
$(INSTALL_DIR) $(DESTDIR)/usr/share/baselayout
cp -pPR share.$(OS)/* $(DESTDIR)/usr/share/baselayout/
-layout:
+layout-dirs:
# Create base filesytem layout
for x in $(KEEP_DIRS) ; do \
test -e $(DESTDIR)$$x/.keep && continue ; \
$(INSTALL_DIR) $(DESTDIR)$$x || exit $$? ; \
touch $(DESTDIR)$$x/.keep || echo "ignoring touch failure; mounted fs?" ; \
done
+
+layout-BSD: layout-dirs
+ -chgrp uucp $(DESTDIR)/var/lock
+ install -m 0775 -d $(DESTDIR)/var/lock
+
+layout-Linux: layout-dirs
+ ln -snf /run $(DESTDIR)/var/run
+ ln -snf /run/lock $(DESTDIR)/var/lock
+
+layout: layout-dirs layout-$(OS)
# Special dirs
install -m 0700 -d $(DESTDIR)/root
touch $(DESTDIR)/root/.keep
@@ -70,8 +83,6 @@ layout:
touch $(DESTDIR)/var/tmp/.keep
install -m 1777 -d $(DESTDIR)/tmp
touch $(DESTDIR)/tmp/.keep
- ln -snf /run $(DESTDIR)/var/run
- ln -snf /run/lock $(DESTDIR)/var/lock
# FHS compatibility symlinks stuff
ln -snf /var/tmp $(DESTDIR)/usr/tmp