debian/nvme-cli.postinst
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | case "${1}" in |
| 6 | configure) |
| 7 | if [ ! -s /etc/nvme/hostnqn ] |
| 8 | then |
| 9 | nvme gen-hostnqn > /etc/nvme/hostnqn |
| 10 | fi |
| 11 | |
| 12 | if [ ! -s /etc/nvme/hostid ] |
| 13 | then |
| 14 | uuidgen > /etc/nvme/hostid |
| 15 | fi |
| 16 | ;; |
| 17 | |
| 18 | abort-upgrade|abort-remove|abort-deconfigure) |
| 19 | |
| 20 | ;; |
| 21 | |
| 22 | *) |
| 23 | echo "postinst called with unknown argument \`${1}'" >&2 |
| 24 | exit 1 |
| 25 | ;; |
| 26 | esac |
| 27 | |
| 28 | #DEBHELPER# |
| 29 | |
| 30 | exit 0 |