From 61803a34fccab804ab06d5bc204bcc1e45139c2d Mon Sep 17 00:00:00 2001 From: cryx Date: Tue, 29 Dec 2009 12:26:00 +0000 Subject: Fix the check for a correct CPUSET --- ezjail.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ezjail.sh b/ezjail.sh index eb5e251..52ce3b9 100755 --- a/ezjail.sh +++ b/ezjail.sh @@ -95,13 +95,14 @@ do_cmd() # Get the JID of the jail [ -f "/var/run/jail_${ezjail_safename}.id" ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return + echo ${ezjail_id} # Attach ZFS-datasets to the jail for zfs in ${ezjail_zfs_datasets}; do /sbin/zfs jail ${ezjail_id} ${zfs} ||Êecho -n "Error: ${zfs} could not be configured" done # Configure processor sets for the jail via cpuset(1) - [ "${ezjail_cpuset}" ] && /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset is malformed" + [ -z "${ezjail_cpuset}" ] || /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset is malformed" fi # Can only detach after unmounting (from fstab.JAILNAME in /etc/rc.d/jail) -- cgit v1.2.3