[PATCH RFC nvme-cli 1/2] debain: generate hostnqn file on install and remove on uninstall

Gabriel Krisman Bertazi krisman at linux.vnet.ibm.com
Mon Nov 14 06:55:05 PST 2016


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




More information about the Linux-nvme mailing list