1 2 3 4 5 6 7 8 9 10 11 12
## arg 1: the new package version post_install() { if [ -z $(</etc/iscsi/initiatorname.iscsi) ]; then name=$(iscsi-iname) echo ">>> Setting Initiatorname '$name'" echo "InitiatorName=$name" > /etc/iscsi/initiatorname.iscsi fi } post_upgrade() { post_install }