- Logfile creation in the systemd unit file (#918132)
This commit is contained in:
parent
73565819d0
commit
33de87e741
3
accton-create
Executable file
3
accton-create
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
ACCTFILE=/var/account/pacct
|
||||||
|
[ ! -r $ACCTFILE ] && touch $ACCTFILE && chmod 600 $ACCTFILE
|
@ -1,12 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Kernel process accounting
|
Description=Kernel process accounting
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
ConditionPathExists=/var/account/pacct
|
ConditionPathExists=/var/account
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/sbin/accton /var/account/pacct
|
ExecStartPre=/usr/libexec/psacct/accton-create
|
||||||
ExecStop=/sbin/accton off
|
ExecStart=/usr/sbin/accton /var/account/pacct
|
||||||
|
ExecStop=/usr/sbin/accton off
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
11
psacct.spec
11
psacct.spec
@ -4,13 +4,14 @@
|
|||||||
Summary: Utilities for monitoring process activities
|
Summary: Utilities for monitoring process activities
|
||||||
Name: psacct
|
Name: psacct
|
||||||
Version: 6.6.1
|
Version: 6.6.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: ftp://ftp.gnu.org/pub/gnu/acct/
|
URL: ftp://ftp.gnu.org/pub/gnu/acct/
|
||||||
Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz
|
Source: ftp://ftp.gnu.org/pub/gnu/acct/acct-%{version}.tar.gz
|
||||||
Source1: psacct.service
|
Source1: psacct.service
|
||||||
Source2: psacct-logrotate.in
|
Source2: psacct-logrotate.in
|
||||||
|
Source3: accton-create
|
||||||
Patch1: psacct-6.3.2-lastcomm_man.patch
|
Patch1: psacct-6.3.2-lastcomm_man.patch
|
||||||
Patch2: acct-6.3.2-sa_manpage.patch
|
Patch2: acct-6.3.2-sa_manpage.patch
|
||||||
Patch3: psacct-6.3.2-man-pages.patch
|
Patch3: psacct-6.3.2-man-pages.patch
|
||||||
@ -76,6 +77,10 @@ sed -e 's|%%{_bindir}|%{_bindir}|g' -e 's|%%{_sbindir}|%{_sbindir}|g' %{SOURCE2}
|
|||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
|
# install accton-create script
|
||||||
|
install -d -m 0755 %{buildroot}%{_libexecdir}/psacct
|
||||||
|
install -m 755 %{SOURCE3} %{buildroot}%{_libexecdir}/psacct/
|
||||||
|
|
||||||
%if ! %{with_last}
|
%if ! %{with_last}
|
||||||
rm -f %{buildroot}%{_bindir}/last %{buildroot}%{_mandir}/man1/last.1*
|
rm -f %{buildroot}%{_bindir}/last %{buildroot}%{_mandir}/man1/last.1*
|
||||||
%endif
|
%endif
|
||||||
@ -117,6 +122,7 @@ fi
|
|||||||
%{_sbindir}/sa
|
%{_sbindir}/sa
|
||||||
%{_sbindir}/dump-utmp
|
%{_sbindir}/dump-utmp
|
||||||
%{_sbindir}/dump-acct
|
%{_sbindir}/dump-acct
|
||||||
|
%{_libexecdir}/psacct/accton-create
|
||||||
%{_bindir}/ac
|
%{_bindir}/ac
|
||||||
%if %{with_last}
|
%if %{with_last}
|
||||||
%{_bindir}/last
|
%{_bindir}/last
|
||||||
@ -134,6 +140,9 @@ fi
|
|||||||
%{_infodir}/accounting.info.gz
|
%{_infodir}/accounting.info.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 11 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-2
|
||||||
|
- Logfile creation in the systemd unit file (#918132)
|
||||||
|
|
||||||
* Tue Apr 09 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-1
|
* Tue Apr 09 2013 Jaromir Capik <jcapik@redhat.com> - 6.6.1-1
|
||||||
- Update to 6.6.1
|
- Update to 6.6.1
|
||||||
- Fixing bogus dates in the changelog
|
- Fixing bogus dates in the changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user