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}
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
#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