Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 646512 Details for
Bug 877518
Add systemd scripts for starting nbd-server
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch against HEAD of nbd.git repo
0001-Add-systemd-file-for-nbd-server.patch (text/plain), 3.33 KB, created by
Kenny Root
on 2012-11-16 18:34:11 UTC
(
hide
)
Description:
Patch against HEAD of nbd.git repo
Filename:
MIME Type:
Creator:
Kenny Root
Created:
2012-11-16 18:34:11 UTC
Size:
3.33 KB
patch
obsolete
>From d4b34b1c914a96bb0e9cb00f809a08253815b695 Mon Sep 17 00:00:00 2001 >From: Kenny Root <kenny@the-b.org> >Date: Thu, 15 Nov 2012 22:19:47 -0800 >Subject: [PATCH] Add systemd file for nbd-server > >--- > nbd-server.service | 12 ++++++++++++ > nbd-server.sysconfig | 2 ++ > nbd.spec | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- > 3 files changed, 61 insertions(+), 2 deletions(-) > create mode 100644 nbd-server.service > create mode 100644 nbd-server.sysconfig > >diff --git a/nbd-server.service b/nbd-server.service >new file mode 100644 >index 0000000..040d66f >--- /dev/null >+++ b/nbd-server.service >@@ -0,0 +1,12 @@ >+[Unit] >+Description=Network Block Device server >+After=syslog.target network.target >+ >+[Service] >+Type=forking >+EnvironmentFile=/etc/sysconfig/nbd-server >+ExecStart=/usr/bin/nbd-server $OPTIONS >+PIDFile=/run/nbd-server.pid >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/nbd-server.sysconfig b/nbd-server.sysconfig >new file mode 100644 >index 0000000..46cd23c >--- /dev/null >+++ b/nbd-server.sysconfig >@@ -0,0 +1,2 @@ >+# Command line options for nbd-server >+OPTIONS="" >diff --git a/nbd.spec b/nbd.spec >index db8bbf5..5d6a18f 100644 >--- a/nbd.spec >+++ b/nbd.spec >@@ -1,12 +1,14 @@ > Name: nbd > Version: 2.9.20 >-Release: 4%{dist} >+Release: 5%{dist} > Summary: Network Block Device user-space tools (TCP version) > > Group: Applications/System > License: GPL+ > URL: http://nbd.sourceforge.net/ > Source0: http://downloads.sourceforge.net/nbd/nbd-%{version}.tar.bz2 >+Source1: nbd-server.sysconfig >+Source2: nbd-server.service > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > > BuildRequires: glib2-devel >@@ -24,7 +26,14 @@ make %{?_smp_mflags} > > %install > rm -rf $RPM_BUILD_ROOT >-make install DESTDIR=$RPM_BUILD_ROOT >+make DESTDIR=$RPM_BUILD_ROOT install >+ >+pushd $RPM_BUILD_ROOT >+mkdir -p .%{_sysconfdir}/sysconfig >+mkdir -p .%{_sysconfdir}/nbd-server >+mkdir -p ./lib/systemd/system >+install -p -m644 %{SOURCE1} .%{_sysconfdir}/sysconfig/nbd-server >+install -p -m644 %{SOURCE2} ./lib/systemd/system/nbd-server.service > > %clean > rm -rf $RPM_BUILD_ROOT >@@ -35,8 +44,44 @@ rm -rf $RPM_BUILD_ROOT > %{_mandir}/man*/nbd* > %{_bindir}/nbd-server > %{_sbindir}/nbd-client >+%dir /etc/nbd-server >+%ghost %attr(644,root,root) %config(noreplace) /etc/nbd-server/config >+%config(noreplace) %{_sysconfdir}/sysconfig/nbd-server >+/lib/systemd/system/nbd-server.service >+ >+%post >+%if 0%{?systemd_post:1} >+%systemd_post nbd-server.service >+%else >+/bin/systemctl daemon-reload &> /dev/null || : >+%endif >+ >+%preun >+%if 0%{?systemd_preun:1} >+%systemd_preun nbd-server.service >+%else >+if [ "$1" -eq 0 ]; then >+ /bin/systemctl --no-reload disable nbd-server.service &> /dev/null >+ /bin/systemctl stop nbd-server.service &> /dev/null >+fi >+: >+%endif >+ >+%postun >+%if 0%{?systemd_postun_with_restart:1} >+%systemd_postun_with_restart nbd-server.service >+%else >+/bin/systemctl daemon-reload &> /dev/null >+if [ "$1" -ge 1 ]; then >+ /bin/systemctl try-restart nbd-server.service &> /dev/null >+fi >+: >+%endif > > %changelog >+* Thu Nov 15 2012 Kenny Root <kenny@the-b.org> - 2.9.20-5 >+- Add systemd files for nbd-server >+ > * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.20-4 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild > >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 877518
: 646512