[PC-BSD Commits] r14005 - pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts
svn at pcbsd.org
svn at pcbsd.org
Sun Nov 20 17:19:29 PST 2011
Author: kris
Date: 2011-11-20 17:19:29 -0800 (Sun, 20 Nov 2011)
New Revision: 14005
Modified:
pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts/portjail.sh
Log:
Fix a bug in portjail, make sure we only exit when called as an rc script and
if its not installed
Modified: pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts/portjail.sh
===================================================================
--- pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts/portjail.sh 2011-11-21 01:11:49 UTC (rev 14004)
+++ pcbsd/current/system-overlay/usr/local/share/pcbsd/scripts/portjail.sh 2011-11-21 01:19:29 UTC (rev 14005)
@@ -88,6 +88,7 @@
### Warn and exit if the jail is not yet installed
checkinitneeded() {
+ [ "$1" = "rc" ] && exit 0
checkjailinstalled || printerror "Error: The jail is not installed. Please run 'portjail init' as root."
}
@@ -371,14 +372,14 @@
case "$1" in
start)
- checkinitneeded
+ checkinitneeded $2
checkroot $1
checkjailrunning || startjail $2
;;
stop)
# The portjail gets only stopped if the jail is installed and we're root.
- checkinitneeded
+ checkinitneeded $2
checkroot $1
checkjailrunning && stopjail $2 || printerror "The jail is not running."
;;
More information about the Commits
mailing list