**Summary of Changes**

* Fail in sysctl.persist when we were unable to set a value into memory.

**Testing**

Tested in 2016.3.4 and 2016.11.
This commit is contained in:
Steve Linn 2016-12-24 10:33:47 -08:00
parent e5eb51255b
commit 22af87a3fc

View File

@ -232,7 +232,12 @@ def persist(name, value, config=None):
if str(running[name]) != str(value):
assign(name, value)
return 'Updated'
return 'Already set'
else:
return 'Already set'
# It is missing from the running config. We can not set it.
else:
raise CommandExecutionError('sysctl {0} does not exist'.format(name))
nlines.append('{0} = {1}\n'.format(name, value))
edited = True
continue