Rewriting postinst with the standard maintainer script.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
cfe5968bf1
commit
02ba105e52
1 changed files with 23 additions and 8 deletions
23
debian/nvme-cli.postinst
vendored
23
debian/nvme-cli.postinst
vendored
|
@ -2,14 +2,29 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$1" = "configure" ]; then
|
case "${1}" in
|
||||||
if [ ! -s /etc/nvme/hostnqn ]; then
|
configure)
|
||||||
|
if [ ! -s /etc/nvme/hostnqn ]
|
||||||
|
then
|
||||||
nvme gen-hostnqn > /etc/nvme/hostnqn
|
nvme gen-hostnqn > /etc/nvme/hostnqn
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -s /etc/nvme/hostid ]; then
|
if [ ! -s /etc/nvme/hostid ]
|
||||||
|
then
|
||||||
uuidgen > /etc/nvme/hostid
|
uuidgen > /etc/nvme/hostid
|
||||||
fi
|
fi
|
||||||
fi
|
;;
|
||||||
|
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`${1}'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue