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
Fixes #23134 - support for plugin hooks #79
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good under the assumption there can't be spaces in $LIBEXEC_DIR
or in hook names
You want me to workaround it? I'd be very surprised there was a libexec executable with space, this is not MacOS :-) |
Working around it should be quite easy and I'd rather stay on the safe side, just to be sure. |
Ok done. |
foreman-proxy-selinux-relabel
Outdated
@@ -8,4 +15,9 @@ | |||
/var/log/foreman-proxy \ | |||
/var/run/foreman-proxy | |||
|
|||
# Run hooks | |||
for HOOK in "$LIBEXEC_DIR/*-after-relabel.sh"; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The escaping needs to be done in a slightly different way, see here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm good catch, I have tested this incorrectly.
I actually could not get your example work, but found different solution via find, no shell involved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
We need to allow to katello-selinux to hook onto foreman-selinux-enable (disable, relabel) scripts easily.
This can be done via /usr/libexec/foreman-selinux/enable.d/*.after.sh (and before.sh) scripts executed before or after scripts.
Packaging PR will follow once this is merged to get that directory created.