All of lore.kernel.org
 help / color / mirror / Atom feed
From: krisman@linux.vnet.ibm.com (Gabriel Krisman Bertazi)
Subject: [PATCH RFC nvme-cli 1/2] debain: generate hostnqn file on install and remove on uninstall
Date: Mon, 14 Nov 2016 12:55:05 -0200	[thread overview]
Message-ID: <87h97a3yd2.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <67cdf4dd-3638-8faf-7512-0ef39ca464a3@grimberg.me> (Sagi Grimberg's message of "Sun, 6 Nov 2016 23:41:41 +0200")

Sagi Grimberg <sagi at grimberg.me> writes:

>> I think the subject should read "debian" :)
>
> Probably :)
>
>>> diff --git a/debian/prerm b/debian/prerm
>>> new file mode 100644
>>> index 000000000000..40c6fea42284
>>> --- /dev/null
>>> +++ b/debian/prerm
>>> @@ -0,0 +1,5 @@
>>> +#!/bin/sh
>>> +
>>> +if [ "$1" = "remove" ]; then
>>> +    rm -rf /etc/nvme
>>> +fi
>>
>> Shouldn't we only do that for a purge?
>
> I haven't given it much thought, it really was a 15 minute
> thing that I thought I'd through out here so people can
> tell suggest how to do it better...
>

I think you need to use postrm and only do it for purge.

https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-mscriptsinstact
https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html#sE.2


-- 
Gabriel Krisman Bertazi

  reply	other threads:[~2016-11-14 14:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-06 19:12 [PATCH RFC nvme-cli 0/2] auto generate hostnqn file on installation Sagi Grimberg
2016-11-06 19:13 ` [PATCH RFC nvme-cli 1/2] debain: generate hostnqn file on install and remove on uninstall Sagi Grimberg
2016-11-06 19:25   ` Christoph Hellwig
2016-11-06 21:41     ` Sagi Grimberg
2016-11-14 14:55       ` Gabriel Krisman Bertazi [this message]
2016-11-06 19:13 ` [PATCH RFC nvme-cli 2/2] nvme.spec: " Sagi Grimberg
2016-11-07  8:36   ` Johannes Thumshirn
2016-11-08 10:31     ` Sagi Grimberg
2016-11-08 10:42       ` Johannes Thumshirn
2016-11-07 20:25   ` J Freyensee
2016-11-08 10:29     ` Sagi Grimberg
2016-11-06 19:24 ` [PATCH RFC nvme-cli 0/2] auto generate hostnqn file on installation Christoph Hellwig
2016-11-06 21:36   ` Sagi Grimberg
2016-11-07 20:34     ` J Freyensee
2016-11-08 10:30       ` Sagi Grimberg
2016-11-08 17:11         ` J Freyensee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h97a3yd2.fsf@linux.vnet.ibm.com \
    --to=krisman@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.