rpms/psacct/devel psacct.init,1.4,1.5 psacct.spec,1.28,1.29
Ivana Varekova (varekova)
fedora-extras-commits at redhat.com
Wed Jul 25 07:09:24 UTC 2007
- Previous message (by thread): rpms/nip2/devel .cvsignore, 1.5, 1.6 nip2.spec, 1.6, 1.7 sources, 1.5, 1.6
- Next message (by thread): rpms/tellico/devel .cvsignore, 1.8, 1.9 sources, 1.8, 1.9 tellico.spec, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: varekova
Update of /cvs/pkgs/rpms/psacct/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28708
Modified Files:
psacct.init psacct.spec
Log Message:
Resolves: #247034
fix init script
Index: psacct.init
===================================================================
RCS file: /cvs/pkgs/rpms/psacct/devel/psacct.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- psacct.init 28 May 2007 09:34:22 -0000 1.4
+++ psacct.init 25 Jul 2007 07:08:51 -0000 1.5
@@ -6,23 +6,43 @@
#
# chkconfig: - 90 10
# description: Starts and stops process accounting
+# short-description: Starts and stops process accounting
+
# Source function library.
. /etc/init.d/functions
# The location of the accounting file
ACCTFILE=/var/account/pacct
+LOCKFILE=/var/lock/subsys/psacct
start() {
[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
- action $"Starting process accounting: " /sbin/accton $ACCTFILE
- touch /var/lock/subsys/psacct
+ if [ -r $ACCTFILE ]; then
+ action $"Starting process accounting: " /sbin/accton $ACCTFILE
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ touch $LOCKFILE
+ else
+ exit 3
+ fi
+ else
+ exit 1
+ fi
}
stop() {
+
action $"Shutting down process accounting: " /sbin/accton
- rm -f /var/lock/subsys/psacct
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ rm -f $LOCKFILE
+ exit 3
+ else
+ exit 0
+ fi
}
+
# See how we were called.
case "$1" in
start)
@@ -32,11 +52,10 @@
stop
;;
status)
- if [ -e /var/lock/subsys/psacct ]; then
+ if [ -e $LOCKFILE ]; then
echo $"Process accounting is enabled."
else
echo $"Process accounting is disabled."
- exit 3
fi
;;
restart|reload)
Index: psacct.spec
===================================================================
RCS file: /cvs/pkgs/rpms/psacct/devel/psacct.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- psacct.spec 28 May 2007 09:34:22 -0000 1.28
+++ psacct.spec 25 Jul 2007 07:08:51 -0000 1.29
@@ -12,7 +12,7 @@
Summary: Utilities for monitoring process activities
Name: psacct
Version: 6.3.2
-Release: 45%{?dist}
+Release: 46%{?dist}
License: GPL
Group: Applications/System
Source: ftp://ftp.gnu.org/pub/gnu/acct-6.3.2.tar.gz
@@ -78,8 +78,8 @@
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT{/sbin,%{_bindir},%{_mandir},%{_sbindir}}
make install prefix=$RPM_BUILD_ROOT%{_prefix} \
- bindir=$RPM_BUILD_ROOT%{_bindir} sbindir=$RPM_BUILD_ROOT%{_sbindir} \
- infodir=$RPM_BUILD_ROOT%{_datadir}/info mandir=$RPM_BUILD_ROOT%{_mandir}
+ bindir=$RPM_BUILD_ROOT%{_bindir} sbindir=$RPM_BUILD_ROOT%{_sbindir} \
+ infodir=$RPM_BUILD_ROOT%{_datadir}/info mandir=$RPM_BUILD_ROOT%{_mandir}
# move accton to /sbin -- leave historical symlink
mv $RPM_BUILD_ROOT%{_sbindir}/accton $RPM_BUILD_ROOT/sbin/accton
@@ -169,6 +169,10 @@
%{_infodir}/accounting.info.gz
%changelog
+* Wed Jul 25 2007 Ivana Varekova <varekova at redhat.com> - 6.3.2-46
+- Resolves: #247034
+ fix init script
+
* Mon May 28 2007 Ivana Varekova <varekova at redhat.com> - 6.3.2-45
- fix the return value of "service psacct status" command
- Previous message (by thread): rpms/nip2/devel .cvsignore, 1.5, 1.6 nip2.spec, 1.6, 1.7 sources, 1.5, 1.6
- Next message (by thread): rpms/tellico/devel .cvsignore, 1.8, 1.9 sources, 1.8, 1.9 tellico.spec, 1.10, 1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list