Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not allow setting DHCP while a jail is running.
FreeNAS ticket: #34771
  • Loading branch information
Brandon Schneider committed Jun 11, 2018
1 parent 2af32de commit ec15598
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion iocage/lib/ioc_json.py
Expand Up @@ -738,7 +738,17 @@ def json_set_value(self, prop, _import=False, default=False):
exit_on_error=self.exit_on_error,
_callback=self.callback,
silent=self.silent)

elif key == "dhcp":
if status:
iocage.lib.ioc_common.logit(
{
"level": "EXCEPTION",
"message":
f"{uuid} is running.\nPlease stop it first!"
},
exit_on_error=self.exit_on_error,
_callback=self.callback,
silent=self.silent)
else:
_, iocroot = _get_pool_and_iocroot()
with open(f"{iocroot}/defaults.json", "r") as default_json:
Expand Down

0 comments on commit ec15598

Please sign in to comment.