Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Constants like PluginDir everywhere in the Command path #2123

Open
Linuxfabrik opened this issue May 8, 2020 · 0 comments
Open

Allow Constants like PluginDir everywhere in the Command path #2123

Linuxfabrik opened this issue May 8, 2020 · 0 comments

Comments

@Linuxfabrik
Copy link

Expected Behavior

PluginDir and other constants should be usable in Commands, no matter where in the path.

Current Behavior

PluginDir and other constants are only allowed when they are placed at the start.
According to #1075 the accepted way to use sudo is to use the full path, however this does not work across operating systems, as the PluginDir can be different (eg RHEL vs Ubuntu).
This means, that we either need to create different command definitions for different operating systems, or symlink the directories on the remote servers themselves. Both would not be necessary if reserved words/constants like "PluginDir" would be replaced everywhere in the string.

Possible Solution

Fully allow the use of constants.

Steps to Reproduce (for bugs)

  • Create a new command, try to use PluginDir somwhere in the command, eg /usr/bin/sudo + PluginDir + check_...
  • Look at the preview, or create a service on a host and look at Actions > Inspect

Your Environment

  • Director version (System - About): 1.7.2
  • Icinga Web 2 version and modules (System - About): 2.7.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants