!10 fix post error when update versions
From: @eaglegai Reviewed-by: @seuzw Signed-off-by: @seuzw
This commit is contained in:
commit
38d03e9007
@ -1,6 +1,6 @@
|
|||||||
Name: arptables
|
Name: arptables
|
||||||
Version: 0.0.5
|
Version: 0.0.5
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Administration tool for arp packet filtering
|
Summary: Administration tool for arp packet filtering
|
||||||
|
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -40,17 +40,24 @@ install -p -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir}/
|
|||||||
install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/arptables.service
|
install -p -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/arptables.service
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||||
echo '# Configure prior to use' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
|
echo '# Configure prior to use' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
|
||||||
|
ln -s arptables-legacy $RPM_BUILD_ROOT/%{_sbindir}/arptables
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post %{name}.service
|
%systemd_post %{name}.service
|
||||||
update-alternatives --install /usr/sbin/arptables arptables /usr/sbin/arptables-legacy 10
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun %{name}.service
|
%systemd_preun %{name}.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
if [ $1 -eq 1 ] && [ -x /usr/sbin/arptables-legacy ] && [ ! -h /usr/sbin/arptables ];then
|
||||||
|
ln -s /usr/sbin/arptables-legacy /usr/sbin/arptables
|
||||||
|
fi
|
||||||
%systemd_postun_with_restart %{name}.service
|
%systemd_postun_with_restart %{name}.service
|
||||||
update-alternatives --remove arptables /usr/sbin/arptables-legacy
|
|
||||||
|
%posttrans
|
||||||
|
if [ -x /usr/sbin/arptables-legacy ] && [ ! -h /usr/sbin/arptables ];then
|
||||||
|
ln -s /usr/sbin/arptables-legacy /usr/sbin/arptables
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -64,6 +71,12 @@ update-alternatives --remove arptables /usr/sbin/arptables-legacy
|
|||||||
%{_mandir}/man8/*.gz
|
%{_mandir}/man8/*.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 25 2022 gaihuiying <eaglegai@163.com> - 0.0.5-5
|
||||||
|
- Type:bugfix
|
||||||
|
- Id:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix post error when update versions
|
||||||
|
|
||||||
* Sat Aug 28 2021 gaihuiying <gaihuiying1@huawei.com> - 0.0.5-4
|
* Sat Aug 28 2021 gaihuiying <gaihuiying1@huawei.com> - 0.0.5-4
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- Id:NA
|
- Id:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user