git: a418a01b1f2a - main - sysutils/cbsd: use pkg-message to show message on remove

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 27 Jul 2022 14:27:23 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a418a01b1f2af140f7cfc5b4c4dd7c57de9ff174

commit a418a01b1f2af140f7cfc5b4c4dd7c57de9ff174
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-07-27 14:18:56 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-07-27 14:27:13 +0000

    sysutils/cbsd: use pkg-message to show message on remove
---
 sysutils/cbsd/Makefile               |  3 ++-
 sysutils/cbsd/files/pkg-deinstall.in | 23 -----------------------
 sysutils/cbsd/files/pkg-message.in   | 22 ++++++++++++++++++++++
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/sysutils/cbsd/Makefile b/sysutils/cbsd/Makefile
index 6702f996e007..bbf171e19dd0 100644
--- a/sysutils/cbsd/Makefile
+++ b/sysutils/cbsd/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	cbsd
 DISTVERSION=	13.1.2
+PORTREVISION=	1
 CATEGORIES=	sysutils
 
 MAINTAINER=	olevole@olevole.ru
@@ -21,7 +22,7 @@ USE_RC_SUBR=	cbsdd cbsdrsyncd cbsd-statsd-bhyve cbsd-statsd-hoster \
 		cbsd-statsd-jail
 MAKE_JOBS_UNSAFE=	yes
 
-SUB_FILES=	pkg-deinstall pkg-message
+SUB_FILES=	pkg-message
 
 USERS=		${PORTNAME}
 GROUPS=		${PORTNAME}
diff --git a/sysutils/cbsd/files/pkg-deinstall.in b/sysutils/cbsd/files/pkg-deinstall.in
deleted file mode 100644
index 4bf3facc595b..000000000000
--- a/sysutils/cbsd/files/pkg-deinstall.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-case $2 in
-POST-DEINSTALL)
-    echo
-    echo "The cbsd package has been deleted."
-    echo
-    echo "If you are *not* upgrading this package, you may want to"
-    echo "remove the following to complete the deinstallation process:"
-    echo
-    echo "1) Records in /etc/rc.conf"
-    echo
-    echo "  cbsdrsyncd_enable=\"YES\""
-    echo "  cbsdrsyncd_flags=\"--config=\$workdir/etc/rsyncd.conf\""
-    echo "  cbsdd_enable=\"YES\""
-    echo "  devfs_load_rulesets=\"YES\""
-    echo "  cbsd_workdir=\"\$workdir\""
-    echo "  rcshutdown_timeout=\"900\""
-    echo "  sshd_flags=\"-oPort=22222\""
-    echo
-    echo "2) Remove %%LOCALBASE%%/etc/sudoers.d/cbsd_sudoers"
-    echo
-  ;;
-esac
diff --git a/sysutils/cbsd/files/pkg-message.in b/sysutils/cbsd/files/pkg-message.in
index e1ddcadd7bf4..d78189ebe990 100644
--- a/sysutils/cbsd/files/pkg-message.in
+++ b/sysutils/cbsd/files/pkg-message.in
@@ -12,6 +12,28 @@ Where /path is the path to the cbsd workdir, e.g.: /usr/jails
 For upgrading an existing installation, run:
 
   cbsd initenv
+EOM
+},
+{ type: remove
+  message: <<EOM
+
+The cbsd package has been deleted."
+
+If you are *not* upgrading this package, you may want to"
+remove the following to complete the deinstallation process:"
+
+1) Records in /etc/rc.conf"
+
+  cbsdrsyncd_enable="YES"
+  cbsdrsyncd_flags="--config=\$workdir/etc/rsyncd.conf"
+  cbsdd_enable="YES"
+  devfs_load_rulesets="YES"
+  cbsd_workdir="$workdir"
+  rcshutdown_timeout="900"
+  sshd_flags="-oPort=22222"
+
+2) Remove %%LOCALBASE%%/etc/sudoers.d/cbsd_sudoers
+
 EOM
 }
 ]