replace scriptlets with systemd macros (#850249)
This commit is contained in:
parent
65ba94ef1a
commit
94943d59db
21
openssh.spec
21
openssh.spec
@ -669,24 +669,13 @@ getent passwd sshd >/dev/null || \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post server
|
%post server
|
||||||
if [ $1 -eq 1 ] ; then
|
%systemd_post sshd.service
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl enable sshd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun server
|
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
if [ $1 -ge 1 ] ; then
|
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart sshd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun server
|
%preun server
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun sshd.service
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl --no-reload disable sshd.service > /dev/null 2>&1 || :
|
%postun server
|
||||||
/bin/systemctl stop sshd.service > /dev/null 2>&1 || :
|
%systemd_postun_with_restart sshd.service
|
||||||
fi
|
|
||||||
|
|
||||||
%triggerun -n openssh-server -- openssh-server < 5.8p2-12
|
%triggerun -n openssh-server -- openssh-server < 5.8p2-12
|
||||||
/usr/bin/systemd-sysv-convert --save sshd >/dev/null 2>&1 || :
|
/usr/bin/systemd-sysv-convert --save sshd >/dev/null 2>&1 || :
|
||||||
|
Loading…
Reference in New Issue
Block a user