clean up systemd service
This commit is contained in:
parent
bd1bae9a41
commit
1f084d071c
@ -1,6 +1,6 @@
|
||||
Name: powerpc-utils
|
||||
Version: 1.3.8
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Utilities for PowerPC platforms
|
||||
|
||||
License: GPLv2
|
||||
@ -11,6 +11,7 @@ Source1: nvsetenv
|
||||
ExclusiveArch: ppc %{power64}
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: automake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: zlib-devel
|
||||
@ -98,26 +99,26 @@ ln -s serv_config.8 %{buildroot}%{_mandir}/man8/uspchrp.8
|
||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/snap $RPM_BUILD_ROOT%{_mandir}/man8/snap.8*
|
||||
|
||||
%post
|
||||
systemctl daemon-reload
|
||||
#systemctl start hcn-init.service
|
||||
#systemctl enable hcn-init.service
|
||||
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
systemctl start hcn-init.service >/dev/null 2>&1 || :
|
||||
systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
||||
# update the smt.state file with current SMT
|
||||
/usr/sbin/smtstate --save
|
||||
/usr/sbin/smtstate --save >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%preun
|
||||
svc=$(systemctl list-units -la | grep -Fq smtstate.service; echo $?)
|
||||
if [ "$svc" = "0" ]; then
|
||||
systemctl stop smtstate.service
|
||||
systemctl disable smtstate.service
|
||||
systemctl stop smtstate.service >/dev/null 2>&1 || :
|
||||
systemctl disable smtstate.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
if systemctl is-enabled hcn-init.service |grep -q "enabled"; then
|
||||
systemctl stop hcn-init.service >/dev/null 2>&1 || :
|
||||
systemctl disable hcn-init.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
#if systemctl is-enabled hcn-init.service |grep -q "enabled"; then
|
||||
# systemctl stop hcn-init.service
|
||||
# systemctl disable hcn-init.service
|
||||
#fi
|
||||
|
||||
%postun
|
||||
systemctl daemon-reload
|
||||
systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%doc README Changelog
|
||||
@ -205,6 +206,9 @@ systemctl daemon-reload
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 1.3.8-2
|
||||
- clean up systemd service
|
||||
|
||||
* Fri Sep 04 2020 Than Ngo <than@redhat.com> - 1.3.8-1
|
||||
- update to 1.3.8
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user