Fix uninstall error when service not stopped
Signed-off-by: zhangsong234 <zhangsong34@huawei.com>
This commit is contained in:
parent
7002237134
commit
64246b6c36
@ -4,7 +4,7 @@
|
||||
#Basic Information
|
||||
Name: lxcfs
|
||||
Version: 4.0.5
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: FUSE filesystem for LXC
|
||||
License: Apache-2.0
|
||||
URL: http://linuxcontainers.org
|
||||
@ -57,10 +57,11 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/lib/lxc/%{name}/
|
||||
%pre
|
||||
|
||||
%preun
|
||||
%systemd_preun lxcfs
|
||||
|
||||
%post
|
||||
ret=`systemctl is-active lxcfs`
|
||||
if [ "$ret" == "active" ]; then
|
||||
systemctl status lxcfs | grep 'Active:' | grep 'running'
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl restart lxcfs
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user