Accepting request 522012 from home:olh:branches:network:utilities

- Add nbd-client.service which will provide a nbd@.service to
  allow other units to require a nbd@nbd0.service if /etc/nbdtab
  is configured accordingly

OBS-URL: https://build.opensuse.org/request/show/522012
OBS-URL: https://build.opensuse.org/package/show/network:utilities/nbd?expand=0&rev=48
This commit is contained in:
Martin Pluskal 2017-09-08 12:33:06 +00:00 committed by Git OBS Bridge
parent f36754c918
commit 6126fb2e26
3 changed files with 23 additions and 0 deletions

12
nbd-client.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=NBD client connection for %i
Documentation=man:nbd-client(8) man:nbdtab(5)
After=network-online.target
[Service]
Type=forking
ExecStart=/usr/sbin/nbd-client %i
ExecStop=/usr/sbin/nbd-client -d /dev/%i
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 7 13:21:03 UTC 2017 - olaf@aepfle.de
- Add nbd-client.service which will provide a nbd@.service to
allow other units to require a nbd@nbd0.service if /etc/nbdtab
is configured accordingly
-------------------------------------------------------------------
Thu Jun 8 12:07:49 UTC 2017 - mpluskal@suse.com

View File

@ -27,6 +27,7 @@ Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{versi
Source1: %{name}-server.service
Source3: config.example
Source4: nbd-server.sysconfig
Source5: nbd-client.service
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(glib-2.0) >= 2.26.0
@ -64,6 +65,8 @@ make %{?_smp_mflags}
%make_install
# install systemd unit
install -D -p -m 0644 %{SOURCE5} \
%{buildroot}/%{_unitdir}/%{name}@.service
install -D -p -m 0644 %{SOURCE1} \
%{buildroot}/%{_unitdir}/%{name}-server.service
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-server
@ -119,6 +122,7 @@ fi
%{_bindir}/nbd-trdump
%{_sbindir}/min-nbd-client
%{_sbindir}/rcnbd-server
%{_unitdir}/%{name}@.service
%{_unitdir}/%{name}-server.service
%{_mandir}/man1/nbd-server.1%{ext_man}
%{_mandir}/man1/nbd-trdump.1%{ext_man}