plugin_sysctl: pass verification even if the option doesn't exist
In case sysctl option doesn't exist (e.g. is unsupported on the system), the verification now passes. Related: rhbz#1252153 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
cb826c1e38
commit
d49469f711
1 changed files with 6 additions and 2 deletions
|
|
@ -51,8 +51,12 @@ class SysctlPlugin(base.Plugin):
|
|||
ret = True
|
||||
for option, value in instance._sysctl.iteritems():
|
||||
curr_val = self._read_sysctl(option)
|
||||
if self._verify_value(option, self._cmd.remove_ws(self._variables.expand(value)), curr_val) == False:
|
||||
ret = False
|
||||
if curr_val is None:
|
||||
log.warn("verify: option '%s' is None, option is probably unavailable/unsupported on your system, skipping it",
|
||||
str(option))
|
||||
else:
|
||||
if self._verify_value(option, self._cmd.remove_ws(self._variables.expand(value)), curr_val) == False:
|
||||
ret = False
|
||||
return ret
|
||||
|
||||
def _instance_unapply_static(self, instance, profile_switch = False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue