Project

General

Profile

« Previous | Next » 

Revision 0c93b462

Added by Bryan Kearney about 10 years ago

Fixes #4927 - Extend foreman-debug to look for extensions provided by plugins.

This assumes a directory called /usr/share/foreman/script/foreman-debug.d.
Any *.sh file in there is sourced. The expectation is that plugins would put
files into this locations and can add files or commands as necessary

View differences:

script/foreman-debug
add_files /etc/sysconfig/pgsql
add_cmd "foreman-rake plugins" "plugin_list"
# Look for any debug extensions provided by plugins
if [ -d "/usr/share/foreman/script/foreman-debug.d" ]; then
for extension in "/usr/share/foreman/script/foreman-debug.d/*.sh"; do
printv "Processing extension $extension"
source $extension
done
fi
qprintf "\n\n"
qprintf "%10s %s\n" "HOSTNAME:" "$(hostname -f 2>/dev/null)"
qprintf "%10s %s\n" "OS:" "$OS"

Also available in: Unified diff