From: Michael Tremer Date: Sun, 15 Apr 2012 20:55:07 +0000 (+0200) Subject: filesystem: Add /var/{lock,run} symlinks and fix scriplet. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cdab979a319217dfdce2491a28736ff1470b1dc;p=ipfire-3.x.git filesystem: Add /var/{lock,run} symlinks and fix scriplet. systemd apparently does not bind-mount /var/lock and /var/run anymore but symlinks them instead to their corresponding directories in /run. The scriptlet contained an error which caused a crash on all architectures except x86_64 because of a bad checking of the directory existance. Hopefully this is now properly fixed. --- diff --git a/filesystem/filesystem.nm b/filesystem/filesystem.nm index 65d62e9b4..b7966a8c5 100644 --- a/filesystem/filesystem.nm +++ b/filesystem/filesystem.nm @@ -5,7 +5,7 @@ name = filesystem version = 002 -release = 1 +release = 2 maintainer = Michael Tremer groups = Base Build System/Base @@ -75,11 +75,9 @@ build var/empty \ var/lib \ var/local \ - var/lock/subsys \ var/log \ var/nis \ var/preserve \ - var/run \ var/spool/{mail,lpd} \ var/tmp \ var/db \ @@ -92,6 +90,8 @@ build ln -snf ../var/tmp usr/tmp ln -snf spool/mail var/mail + ln -snf ../run var/run + ln -snf ../run/lock var/lock # Setting correct permissions. chmod 1777 %{BUILDROOT}/{,var/}tmp @@ -121,7 +121,9 @@ packages if not os.path.exists(usr_dir): os.makedirs(usr_dir) - if not os.path.exists(dir): + try: + os.lstat(dir) + except OSError: os.symlink(usr_dir[1:], dir) end end