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 1487881 Details for
Bug 1633814
nvme-cli: nvme-cli.spec should include post and preun sections to handle /etc/nvme/hostnqn
[?]
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.
nvme.spec/debian: Auto generate host nqn as part of install
nvme-spec-post-preun-patch (text/plain), 2.03 KB, created by
David Milburn
on 2018-09-27 19:35:16 UTC
(
hide
)
Description:
nvme.spec/debian: Auto generate host nqn as part of install
Filename:
MIME Type:
Creator:
David Milburn
Created:
2018-09-27 19:35:16 UTC
Size:
2.03 KB
patch
obsolete
>commit c1aa2a05e12bb81da3a34b044a5847ac093bb096 >Author: Sagi Grimberg <sagi@grimberg.me> >Date: Thu Jan 12 13:13:29 2017 +0200 > > nvme.spec/debian: Auto generate host nqn as part of install > > The installation will generate a hostnqn and store it in > /etc/nvme/hostnqn file (in case it doesn't exist). > This file will be removed upon uninstallation (purge on for debian). > > Signed-off-by: Sagi Grimberg <sagi@grimberg.me> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com> > >diff --git a/debian/postinst b/debian/postinst >new file mode 100644 >index 0000000..cd497b7 >--- /dev/null >+++ b/debian/postinst >@@ -0,0 +1,20 @@ >+#!/bin/sh >+ >+set -e >+ >+case "$1" in >+ configure|install) >+ if [ ! -f /etc/nvme/hostnqn ]; then >+ install -D /dev/null /etc/nvme/hostnqn >+ echo `nvme gen-hostnqn` > /etc/nvme/hostnqn >+ fi >+ ;; >+ >+ upgrade|abort-upgrade) >+ ;; >+ *) >+ echo "postinst called with unknown argument \`$1'" >&2 >+ exit 0 >+ ;; >+esac >+exit 0 >diff --git a/debian/postrm b/debian/postrm >new file mode 100644 >index 0000000..c655ee4 >--- /dev/null >+++ b/debian/postrm >@@ -0,0 +1,10 @@ >+#!/bin/sh >+ >+if [ "$1" = "purge" ]; then >+ if [ -d /etc/nvme ]; then >+ rm -f /etc/nvme/hostnqn >+ if [ ! -n "`ls -A /etc/nvme`" ]; then >+ rm -rf /etc/nvme >+ fi >+ fi >+fi >diff --git a/nvme.spec.in b/nvme.spec.in >index a471877..36c3b21 100644 >--- a/nvme.spec.in >+++ b/nvme.spec.in >@@ -33,6 +33,23 @@ make install DESTDIR=%{buildroot} PREFIX=/usr > %clean > rm -rf $RPM_BUILD_ROOT > >+%post >+if [ $1 = 1 ]; then # 1 : This package is being installed for the first time >+ if [ ! -f /etc/nvme/hostnqn ]; then >+ install -D /dev/null /etc/nvme/hostnqn >+ echo $(nvme gen-hostnqn) > /etc/nvme/hostnqn >+ fi >+fi >+ >+%preun >+if [ "$1" = "remove" ]; then >+ if [ -d /etc/nvme ]; then >+ rm -f /etc/nvme/hostnqn >+ if [ ! -n "`ls -A /etc/nvme`" ]; then >+ rm -rf /etc/nvme >+ fi >+ fi >+fi > %changelog > * Thu Oct 15 2015 Keith Busch <keith.busch@intel.com> > - Initial RPM spec
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 Raw
Actions:
View
Attachments on
bug 1633814
: 1487881