]> git.pld-linux.org Git - packages/XFree86.git/commitdiff
- use macros in %{pre,post}{,un}
authorsaq <saq@pld-linux.org>
Wed, 25 Jul 2001 16:30:40 +0000 (16:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- need rebuilt rpm (with new macros.pld) to build these

Changed files:
    XFree86.spec -> 1.231

XFree86.spec

index 4e5e22b8b3d1f91d7c5d0b499969059ede2ae777..b7103827bdc43ab7ff28b67157c8e9f0b06d7035 100644 (file)
@@ -1392,60 +1392,24 @@ else
 fi
 
 %pre -n xfs
-if [ -n "`/usr/bin/getgid xfs`" ]; then
-       if [ "`/usr/bin/getgid xfs`" != "56" ]; then
-               echo "Warning: group xfs hasn't 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 "Warning: user xfs hasn't uid=56. Corrent 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
+GROUP=xfs; GID=56; NAME=xfs; %groupadd
+USER=xfs; UID=56; HOMEDIR=/etc/X11/fs; COMMENT="X Font Server"; %useradd
 
 %post -n xfs
-/sbin/chkconfig --add xfs
-if [ -f /var/lock/subsys/xfs ]; then
-       /etc/rc.d/init.d/xfs restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/xfs start\" to start font server." >&2
-fi
+NAME=xfs; DESC="font server"; %chkconfig_post
 
 %preun -n xfs
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/xfs ]; then
-               /etc/rc.d/init.d/xfs stop >&2
-       fi
-       /sbin/chkconfig --del xfs
-fi
+NAME=xfs; %chkconfig_preun
 
 %postun -n xfs
-if [ $1 = 0 ]; then
-       /usr/sbin/userdel xfs 2>/dev/null
-       /usr/sbin/groupdel xfs 2>/dev/null
-fi
+USER=xfs; %userdel
+GROUP=xfs; %groupdel
 
 %post -n xdm
-/sbin/chkconfig --add xdm
-if [ -f /var/lock/subsys/xdm ]; then
-       /etc/rc.d/init.d/xdm restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/xdm start\" to start xdm." >&2
-fi
+NAME=xdm; %chkconfig_post
                
 %preun -n xdm
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/xdm ]; then
-               /etc/rc.d/init.d/xdm stop >&2
-       fi
-       /sbin/chkconfig --del xdm
-fi
+NAME=xdm; %chkconfig_preun
 
 %post   DPS -p /sbin/ldconfig
 %postun DPS -p /sbin/ldconfig
This page took 0.043628 seconds and 4 git commands to generate.