diff options
author | cryx <cryx@h3q.com> | 2009-12-29 12:26:00 +0000 |
---|---|---|
committer | cryx <cryx@h3q.com> | 2009-12-29 12:26:00 +0000 |
commit | 61803a34fccab804ab06d5bc204bcc1e45139c2d (patch) | |
tree | 83b27c3b903673d82405a3c57381813927f8ca0f /ezjail.sh | |
parent | 3d3343d6a221d7c7770bb8c53afa1c51165c2af3 (diff) |
Fix the check for a correct CPUSET
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-x | ezjail.sh | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -95,13 +95,14 @@ do_cmd() | |||
95 | # Get the JID of the jail | 95 | # Get the JID of the jail |
96 | [ -f "/var/run/jail_${ezjail_safename}.id" ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return | 96 | [ -f "/var/run/jail_${ezjail_safename}.id" ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return |
97 | 97 | ||
98 | echo ${ezjail_id} | ||
98 | # Attach ZFS-datasets to the jail | 99 | # Attach ZFS-datasets to the jail |
99 | for zfs in ${ezjail_zfs_datasets}; do | 100 | for zfs in ${ezjail_zfs_datasets}; do |
100 | /sbin/zfs jail ${ezjail_id} ${zfs} ||Êecho -n "Error: ${zfs} could not be configured" | 101 | /sbin/zfs jail ${ezjail_id} ${zfs} ||Êecho -n "Error: ${zfs} could not be configured" |
101 | done | 102 | done |
102 | 103 | ||
103 | # Configure processor sets for the jail via cpuset(1) | 104 | # Configure processor sets for the jail via cpuset(1) |
104 | [ "${ezjail_cpuset}" ] && /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset is malformed" | 105 | [ -z "${ezjail_cpuset}" ] || /usr/bin/cpuset -l ${ezjail_cpuset} -j ${ezjail_id} || echo -n "Error: The defined cpuset is malformed" |
105 | fi | 106 | fi |
106 | 107 | ||
107 | # Can only detach after unmounting (from fstab.JAILNAME in /etc/rc.d/jail) | 108 | # Can only detach after unmounting (from fstab.JAILNAME in /etc/rc.d/jail) |