Correct machinectl become plugin function arguments (#58734)

* Correct get_option function name and change flags to become_flags

* Remove the '--' from the returned command

* add changelog fragment

* change changelog fragment description

* move the -q argument to machinectl before the shell argument to resolve issues with machinectl v230 (see #56571)
This commit is contained in:
Joseph 2019-07-05 16:03:24 +01:00 committed by Brian Coca
parent 61647731e2
commit 4f642daae5
2 changed files with 5 additions and 3 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- machinectl become plugin - correct bugs which induced errors on plugin usage

View file

@ -81,7 +81,7 @@ class BecomeModule(BecomeBase):
if not cmd: if not cmd:
return cmd return cmd
become = self._get_option('become_exe') or self.name become = self.get_option('become_exe') or self.name
flags = self.get_option('flags') or '' flags = self.get_option('become_flags') or ''
user = self.get_option('become_user') or '' user = self.get_option('become_user') or ''
return '%s shell -q %s %s@ -- %s' % (become, flags, user, cmd) return '%s -q shell %s %s@ %s' % (become, flags, user, cmd)