Update rpmbuild spec, fix uninstallation issues for nvme-snsd.

Signed-off-by: 吕光雁 <lvguangyan2@huawei.com>
(cherry picked from commit c19c297f1eb585a049f2786064d20eb95e85867b)
This commit is contained in:
吕光雁 2023-08-31 09:00:20 +00:00 committed by openeuler-sync-bot
parent 19e8ee1c1b
commit 4d248c0806

View File

@ -1,6 +1,6 @@
Name: nvme-snsd
Version: 1.00.029
Release: 2
Release: 3
Summary: nvme-snsd service
License: BSD 3-Clause
Group: Applications/System
@ -43,10 +43,32 @@ rm -rf %{buildroot}
chmod 0550 %{_bindir}/nvme-snsd
chmod 0440 /usr/share/doc/snsd.conf
chmod 0440 /usr/lib/systemd/system/nvme-snsd.service
if [ ! -f /etc/nvme/snsd.conf ];then
mkdir -pv /etc/nvme/
cat >/etc/nvme/snsd.conf <<"EOF"
[BASE]
; The delay time of disconnecting device when net link down. Unit is second.
; The recommended value is 0.
--restrain-time = 0
[SW]
; Switching network configuration, mandatory: --host-traddr, --protocol
; If "--host-traddr" is set to "any", other IP addresses cannot be configured for the switching network, All customer networks support SNSD.
; eg: --host-traddr = xxxx | --protocol = roce
[DC]
; Configuration of the directly connected network, mandatory: --host-traddr, --protocol, --traddr
; eg: --host-traddr = xxxx | --traddr = xxxx | --protocol = roce
EOF
chmod 0644 /etc/nvme/snsd.conf
fi
systemctl enable nvme-snsd
systemctl start nvme-snsd
%postun
%preun
systemctl stop nvme-snsd
systemctl disable nvme-snsd
@ -57,6 +79,9 @@ systemctl disable nvme-snsd
/usr/lib/systemd/system/nvme-snsd.service
%changelog
* Thu Aug 31 2023 Guangyan Lv <lvguangyan2@huawei.com> - 1.00.029-3
- Update rpmbuild spec, fix uninstallation issues for nvme-snsd.
* Sat Jul 30 2022 Ruozhu Li <liruozhu@huawei.com> - 1.00.029-2
- Update src tar fetch from upstream release.