diff --git a/pym/unix/variables/unix.py b/pym/unix/variables/unix.py index e4637aa..bf97d93 100644 --- a/pym/unix/variables/unix.py +++ b/pym/unix/variables/unix.py @@ -103,6 +103,9 @@ class VariableClUnixPwGenerateSet(Variable): self.label = _("Generate new service password") self.help = _("generate new service password") + def uncompatible(self): + if self.Get('server.sr_unix_set') != 'on': + return "Unavailable for unconfigured Unix service" class VariableClUnixRemoveSet(Variable): """ @@ -122,3 +125,6 @@ class VariableClUnixRemoveSet(Variable): if self.Get('server.sr_unix_set') != 'on': raise VariableError(_("Unix service is not setup")) + def uncompatible(self): + if self.Get('server.sr_unix_set') != 'on': + return "Unavailable for unconfigured Unix service"