]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/commitdiff
rpcbind: Switch to systemd sysusers mechanism for user/group creation
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 11 Apr 2023 13:59:07 +0000 (15:59 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 11 Apr 2023 13:59:07 +0000 (15:59 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
rpcbind/rpcbind.nm
rpcbind/rpcbind.sysusers [new file with mode: 0644]

index 7c2fb3638e9f6ebb12f38defca541331771345b6..ab0bc32f7b3a033326b38dc728c60f01b5758acb 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = rpcbind
 version    = 1.2.6
-release    = 1
+release    = 2
 
 groups     = System/Daemons
 url        = https://nfsv4.bullopensource.org
@@ -29,12 +29,11 @@ build
                libtool
                quota-devel
                systemd-devel
+               systemd-sysusers
        end
 
        prepare_cmds
                autoreconf -fisv
-
-               %{create_user}
        end
 
        configure_options += \
@@ -49,12 +48,6 @@ build
        end
 end
 
-create_user
-       getent group rpc >/dev/null || groupadd -r -g 32 rpc
-       getent passwd rpc >/dev/null || useradd -r -g 32 \
-               -c "Rpcbind Daemon" -d /var/lib/rpcbind -s /sbin/nologin rpc
-end
-
 packages
        package %{name}
                provides
@@ -65,10 +58,6 @@ packages
                        setup >= 3.0-7
                end
 
-               script prein
-                       %{create_user}
-               end
-
                script postin
                        systemctl daemon-reload >/dev/null 2>&1 || :
                        systemctl --no-reload enable rpcbind.service >/dev/null 2>&1 || :
diff --git a/rpcbind/rpcbind.sysusers b/rpcbind/rpcbind.sysusers
new file mode 100644 (file)
index 0000000..2bc6333
--- /dev/null
@@ -0,0 +1 @@
+u rpc - "Rpcbind Daemon" /var/lib/rpcbind /usr/sbin/nologin