]> git.pld-linux.org Git - packages/gdm2.20.git/commitdiff
- use macros in %{pre,post}{,un}
authorsaq <saq@pld-linux.org>
Wed, 25 Jul 2001 16:30:44 +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:
    gdm.spec -> 1.34
    gdm2.20.spec -> 1.34

gdm.spec
gdm2.20.spec

index bffe4fdcfa7d0415eb4685b0e3088a35d5b1537a..a299057f8c7e488373f5efcc66922957b58f203f 100644 (file)
--- a/gdm.spec
+++ b/gdm.spec
@@ -88,34 +88,19 @@ gzip -9nf AUTHORS ChangeLog NEWS README TODO
 %find_lang %{name} --all-name --with-gnome
 
 %pre
-/usr/sbin/groupadd -g 55 -r -f xdm
-
-if [ -z "`id -u xdm 2>/dev/null`" ]; then
-       /usr/sbin/useradd -u 55 -r -d /dev/null -s /bin/false -c 'X Display Manager' -g xdm xdm 1>&2
-fi
+GROUP=xdm; GID=55; %groupadd
+USER=xdm; UID=55; HOMEDIR=/dev/null; COMMENT="X Display Manager"; %useradd
 
 %post
-/sbin/chkconfig --add gdm
-if [ -f /var/lock/subsys/gdm ]; then
-        /etc/rc.d/init.d/gdm restart >&2
-else
-        echo "Run \"/etc/rc.d/init.d/gdm start\" to start gdm." >&2
-fi
+%chkconfig_add
 /usr/bin/scrollkeeper-update
 
 %preun
-if [ -f /var/lock/subsys/gdm ]; then
-                /etc/rc.d/init.d/gdm stop >&2
-fi
-/sbin/chkconfig --del gdm
+%chkconfig_del
 
 %postun
-if [ "$1" = "0" ]; then
-       if [ -n "`id -u xdm 2>/dev/null`" ]; then
-               /usr/sbin/userdel xdm
-       fi
-       /usr/sbin/groupdel xdm
-fi
+USER=xdm; %userdel
+GROUP=xdm; %groupdel
 /usr/bin/scrollkeeper-update
 
 %clean
index bffe4fdcfa7d0415eb4685b0e3088a35d5b1537a..a299057f8c7e488373f5efcc66922957b58f203f 100644 (file)
@@ -88,34 +88,19 @@ gzip -9nf AUTHORS ChangeLog NEWS README TODO
 %find_lang %{name} --all-name --with-gnome
 
 %pre
-/usr/sbin/groupadd -g 55 -r -f xdm
-
-if [ -z "`id -u xdm 2>/dev/null`" ]; then
-       /usr/sbin/useradd -u 55 -r -d /dev/null -s /bin/false -c 'X Display Manager' -g xdm xdm 1>&2
-fi
+GROUP=xdm; GID=55; %groupadd
+USER=xdm; UID=55; HOMEDIR=/dev/null; COMMENT="X Display Manager"; %useradd
 
 %post
-/sbin/chkconfig --add gdm
-if [ -f /var/lock/subsys/gdm ]; then
-        /etc/rc.d/init.d/gdm restart >&2
-else
-        echo "Run \"/etc/rc.d/init.d/gdm start\" to start gdm." >&2
-fi
+%chkconfig_add
 /usr/bin/scrollkeeper-update
 
 %preun
-if [ -f /var/lock/subsys/gdm ]; then
-                /etc/rc.d/init.d/gdm stop >&2
-fi
-/sbin/chkconfig --del gdm
+%chkconfig_del
 
 %postun
-if [ "$1" = "0" ]; then
-       if [ -n "`id -u xdm 2>/dev/null`" ]; then
-               /usr/sbin/userdel xdm
-       fi
-       /usr/sbin/groupdel xdm
-fi
+USER=xdm; %userdel
+GROUP=xdm; %groupdel
 /usr/bin/scrollkeeper-update
 
 %clean
This page took 0.060837 seconds and 4 git commands to generate.