]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
radvd: Create tmpfiles in package.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Nov 2011 19:38:04 +0000 (20:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 1 Nov 2011 19:38:04 +0000 (20:38 +0100)
References #280.

radvd/radvd.nm
radvd/radvd.tmpfiles

index 0835bd2a7b7b148a4519a84fb9146f7db249198c..932c991dcc23e12a2daa9abda2c418e995270dde 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = radvd
 version    = 1.8.3
-release    = 3
+release    = 4
 
 groups     = System/Daemons
 url        = http://www.litech.org/radvd/
@@ -28,6 +28,7 @@ build
                flex
                flex-devel
                bison
+               shadow-utils
        end
 
        configure_options += \
@@ -35,8 +36,25 @@ build
                --with-pidfile=/run/radvd/radvd.pid
 
        prepare_cmds
+               %{create_user}
+
                sed -e "s/-lfl/-lfl_pic/g" -i Makefile.*
        end
+
+       install_cmds
+               mkdir -pv -m 750 %{BUILDROOT}/run/radvd
+               chown -v radvd.radvd %{BUILDROOT}/run/radvd
+       end
+end
+
+create_user
+       getent group radvd >/dev/null || groupadd -r radvd
+
+       # The radvd user also needs to be in the wheel group to get access to
+       # /proc.
+       getent passwd radvd >/dev/null || \
+               useradd -r -g radvd -G wheel -d / -s /sbin/nologin \
+                       -c "User for the Router Advertisement daemon." radvd
 end
 
 packages
@@ -46,14 +64,7 @@ packages
                prerequires += shadow-utils
 
                script prein
-                       getent group radvd >/dev/null || groupadd -r radvd
-
-                       # The radvd user also needs to be in the wheel group to get access to
-                       # /proc.
-                       getent passwd radvd >/dev/null || \
-                               useradd -r -g radvd -G wheel -d / -s /sbin/nologin \
-                                       -c "User for the Router Advertisement daemon." radvd
-                       exit  0
+                       %{create_user}
                end
 
                # Just search for new unit files that were just installed.
index 8bab2324d14ed80a9f0c87db3a4fcb13a8dc0fe8..c2a3047174541d7953a7111fadaab20a9f9faad1 100644 (file)
@@ -1,2 +1,2 @@
-d /var/run/radvd 0750 radvd radvd -
+d /run/radvd 0750 radvd radvd -