]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
filesystem: Add /var/{lock,run} symlinks and fix scriplet.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 15 Apr 2012 20:55:07 +0000 (22:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 15 Apr 2012 20:55:07 +0000 (22:55 +0200)
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.

filesystem/filesystem.nm

index 65d62e9b4e56210ecaec7942bb5e58d9b5fa8b9c..b7966a8c5ac8bc30609c1479b5b9aa4c01d6b94a 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = filesystem
 version    = 002
-release    = 1
+release    = 2
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 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