Details
-
Bug
-
Status: Resolved (View Workflow)
-
Blocker
-
Resolution: Fixed
-
29.0.0
-
Security Level: Default (Default Security Scheme)
-
None
-
Backlog NG
Description
Today I deployed a recent 29.x branch in order to review a PR locally on my machine. When I tried to start the instance it fails with:
WARNING: relaunching as chris Usage: /opt/opennms/bin/opennms [-f] [-n] [-t] [-p] [-o] [-c timeout] [-v] [-Q] <command> [<service>] command options: start|stop|restart|status|ssh|check|pause|resume|kill service options: all|<a service id from the etc/service-configuration.xml> defaults to all The following options are available: -f Foreground mode. Don't fork & execute. -n "No execute" mode. Don't call Java to do anything. -t Test mode. Enable JPDA on port 8001. -T Test mode. Enable JPDA on port 8001 and suspend until a debugger is attached. -p Enable TIJMP profiling -o Enable OProfile profiling -c Controller HTTP connection timeout in seconds. -v Verbose mode. When used with the "status" command, gives the results for all OpenNMS services. When used with "start", enables some verbose debugging, such as details on garbage collection. -Q Quick mode. Don't wait for OpenNMS to start up. Useful if you want to watch the logs while OpenNMS starts up without wanting to open another terminal window.
While digging through the script bin/opennms I saw that shift is used. This alters beside $# and $0...$n also the variable $@. So, when the script is relaunched using the user given by $RUNAS the script is relaunched with an empty $@. So, no arguments are passed to the script call.