dns/openresolv: use pkg-message to show message on remove

This commit is contained in:
Baptiste Daroussin 2022-07-27 15:41:46 +02:00
parent a732af5ee1
commit 02ee212d4b
3 changed files with 16 additions and 22 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= openresolv
PORTVERSION= 3.12.0
PORTREVISION= 1
CATEGORIES= dns
MASTER_SITES= https://roy.marples.name/downloads/openresolv/
@ -12,6 +13,7 @@ CPE_VENDOR= ${PORTNAME}_project
GNU_CONFIGURE= yes
NO_ARCH= yes
SUB_FILES= pkg-deinstall pkg-message
SUB_FILES= pkg-message
SUB_LIST= PORTNAME=${PORTNAME}
.include <bsd.port.mk>

View File

@ -1,21 +0,0 @@
#!/bin/sh
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
echo "===> post-deinstallation information for $1"
echo ""
echo "Please note that $1 was not completely removed"
echo "from this system:"
echo ""
echo "/etc/resolv.conf should now be changed to be a regular"
echo "file and /var/run/resolvconf can be removed if openresolv"
echo "will no longer be used."
echo ""
;;
*)
exit 64
;;
esac
exit 0

View File

@ -4,6 +4,19 @@
To make sure openresolv runs correctly
please symlink /etc/resolv.conf to
%%PREFIX%%/etc/resolvconf/run/resolv.conf
EOM
},
{ type: remove
message: <<EOM
===> post-deinstallation information for %%PORTNAME%%
Please note that %%PORTNAME%% was not completely removed
from this system:
/etc/resolv.conf should now be changed to be a regular
file and /var/run/resolvconf can be removed if openresolv
will no longer be used.
EOM
}
]