]> git.pld-linux.org Git - packages/PowerChutePlus.git/commitdiff
- reverting last change: removing new macros from %p{re,ost}{,un}
authorsaq <saq@pld-linux.org>
Thu, 26 Jul 2001 05:42:02 +0000 (05:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PowerChutePlus.spec -> 1.6

PowerChutePlus.spec

index 91b7aee933ec4583ba5c956fdaf023c2bb24453c..5b7305c00ef220c2dee387a9bd494ef028a532c4 100644 (file)
@@ -81,23 +81,38 @@ ln -s /var/run/bkupsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute/
 gzip -9nf language.txt readme_apache
 
 %pre
-GROUP=pwrchute; GID=68; %groupadd
-USER=pwrchute; UID=68; HOMEDIR=/dev/null; COMMENT="PowerChute Plus"
-%useradd
+if ! id -g pwrchute > /dev/null 2>&1 ; then
+       %{_sbindir}/groupadd -g 68 pwrchute
+fi
+if ! id -u pwrchute > /dev/null 2>&1 ; then
+       %{_sbindir}/useradd -u 68 -g 68 -d /dev/null -s /bin/false -c "PowerChute Plus" pwrchute
+fi
 
 %post
-NAME=upsd; DESC="UPSd server"; %chkconfig_add
+/sbin/chkconfig --add upsd
+if [ -f /var/lock/subsys/upsd ]; then
+       /etc/rc.d/init.d/upsd restart 1>&2
+else
+       echo "Type \"/etc/rc.d/init.d/upsd start\" to start UPSd server" 1>&2
+fi
 cd %{_libdir}/powerchute
 ./machine_id
 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
 echo "Remember to set the password for pwrchute account"
        
 %preun
-NAME=upsd; %chkconfig_del
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/upsd ]; then
+               /etc/rc.d/init.d/upsd stop 1>&2
+       fi
+       /sbin/chkconfig --del upsd
+fi
 
 %postun
-USER=pwrchute; %userdel
-GROUP=pwrchute; %groupdel
+if [ "$1" = "0" ]; then
+       %{_sbindir}/userdel pwrchute
+       %{_sbindir}/groupdel pwrchute
+fi
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.094606 seconds and 4 git commands to generate.