From 46d5426b1b3f2ebf9965c33639918830c84a61d0 Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Sun, 7 May 2006 23:15:39 +0000 Subject: [PATCH] - Check for some mandatory variables. Approved by: cperciva (mentor) MFC after: 1 week --- etc/rc.d/jail | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 0edf078dd3d9..fbb2dd6ce2a4 100644 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -86,6 +86,17 @@ init_variables() debug "$_j exec start: $jail_exec_start" debug "$_j exec stop: $jail_exec_stop" debug "$_j flags: $jail_flags" + + if [ -z "${jail_hostname}" ]; then + err 3 "$name: No hostname has been defined for ${_j}" + fi + if [ -z "${jail_rootdir}" ]; then + err 3 "$name: No root directory has been defined for ${_j}" + fi + if [ -z "${jail_ip}" ]; then + err 3 "$name: No IP address has been defined for ${_j}" + fi + } # set_sysctl rc_knob mib msg