git: 7e5e762ff7aa - main - ports-mgmt/rc-subr-jail: Update to 4.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Mar 2023 11:20:05 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7e5e762ff7aac688be0bc7c122d989a0a325d3f5
commit 7e5e762ff7aac688be0bc7c122d989a0a325d3f5
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-03-28 11:15:17 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-03-28 11:18:12 +0000
ports-mgmt/rc-subr-jail: Update to 4.
---
ports-mgmt/rc-subr-jail/Makefile | 2 +-
ports-mgmt/rc-subr-jail/files/rc.subr.jail | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/ports-mgmt/rc-subr-jail/Makefile b/ports-mgmt/rc-subr-jail/Makefile
index e380cc8a5302..0bf5f97d5600 100644
--- a/ports-mgmt/rc-subr-jail/Makefile
+++ b/ports-mgmt/rc-subr-jail/Makefile
@@ -1,5 +1,5 @@
PORTNAME= rc-subr-jail
-PORTVERSION= 3
+PORTVERSION= 4
CATEGORIES= ports-mgmt
MASTER_SITES= #
DISTFILES= #
diff --git a/ports-mgmt/rc-subr-jail/files/rc.subr.jail b/ports-mgmt/rc-subr-jail/files/rc.subr.jail
index c40101bbe5b1..e2c479b51df4 100644
--- a/ports-mgmt/rc-subr-jail/files/rc.subr.jail
+++ b/ports-mgmt/rc-subr-jail/files/rc.subr.jail
@@ -127,3 +127,20 @@ destroy_jail()
rm -rf "$jroot"
}
+
+# kill_jail pid signal jail_enable_var
+# Works like kill if passed a variable containing "no", but calls
+# killall -j ${name}_jail otherwise
+kill_jail()
+{
+ local _pid _varname
+ _pid="$1"
+ _signal="$2"
+ _varname="$3"
+
+ if checkyesno "$_varname"; then
+ killall -j ${name}_jail ${signal}
+ else
+ kill ${signal} "$_pid"
+ fi
+}