]> git.pld-linux.org Git - packages/X11.git/commitdiff
- use %useradd/%groupadd macros
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 1 May 2005 17:31:30 +0000 (17:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    X11.spec -> 1.136

X11.spec

index d6779da4193e10b6105afd93da907511e83566e0..f7f10039126a3af4f5d4783d7c80051f5294ac84 100644 (file)
--- a/X11.spec
+++ b/X11.spec
@@ -141,7 +141,7 @@ BuildRequires:      libpng-devel
 BuildRequires: libstdc++-devel
 BuildRequires: ncurses-devel
 BuildRequires: pam-devel
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: utempter-devel
 BuildRequires: zlib-devel
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
@@ -2199,22 +2199,8 @@ if [ "$1" = "0" ]; then
 fi
 
 %pre xfs
-if [ -n "`/usr/bin/getgid xfs`" ]; then
-       if [ "`/usr/bin/getgid xfs`" != "56" ]; then
-               echo "Error: group xfs doesn't have GID=56. Correct this before installing xfs." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 56 -r -f xfs
-fi
-if [ -n "`/bin/id -u xfs 2>/dev/null`" ]; then
-       if [ "`/bin/id -u xfs`" != "56" ]; then
-               echo "Error: user xfs doesn't have UID=56. Correct this before installing xfs." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 56 -r -d /etc/X11/fs -s /bin/false -c "X Font Server" -g xfs xfs 1>&2
-fi
+%groupadd -P %{name}-xfs -g 56 -r -f xfs
+%useradd -P %{name}-xfs -u 56 -r -d /etc/X11/fs -s /bin/false -c "X Font Server" -g xfs xfs
 
 %post xfs
 /sbin/chkconfig --add xfs
@@ -2242,22 +2228,8 @@ fi
 #if [ -s /etc/X11/fs/config.rpmsave ]; then
 #      cp -f /etc/X11/fs/config.rpmsave /etc/X11/fs/config
 #fi
-if [ -n "`/usr/bin/getgid xfs`" ]; then
-       if [ "`/usr/bin/getgid xfs`" != "56" ]; then
-               echo "Error: group xfs doesn't have GID=56. Correct this before installing xfs." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 56 -r -f xfs
-fi
-if [ -n "`/bin/id -u xfs 2>/dev/null`" ]; then
-       if [ "`/bin/id -u xfs`" != "56" ]; then
-               echo "Error: user xfs doesn't have UID=56. Correct this before installing xfs." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 56 -r -d /etc/X11/fs -s /bin/false -c "X Font Server" -g xfs xfs 1>&2
-fi
+%groupadd -P %{name}-xfs -g 56 -r -f xfs
+%useradd -P %{name}-xfs -u 56 -r -d /etc/X11/fs -s /bin/false -c "X Font Server" -g xfs xfs
 /sbin/chkconfig --add xfs
 /etc/rc.d/init.d/xfs start >&2
 
This page took 0.040946 seconds and 4 git commands to generate.