Drop the os-svc-install -n -c options.

Updates os-svc-install so that we disallow the -n and -c options.

Also, corrects the optargs for -h so that it doesn't take a parameter.
And fix some variable bound issues that could occur if the script
was executed with invalid args.

Change-Id: I4eb26fe6793aa1ad19b1dddc63a5f399e17a8325
Closes-bug: #1285283
This commit is contained in:
Dan Prince
2014-02-26 13:06:00 -05:00
parent d8e1508d35
commit 35bebaeb68
2 changed files with 7 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ service will not be started automatically nor can it be manually started.
## example usage
```bash
# clone nova.git from github, and install it and its dependencies to /opt/stack/venvs/nova
os-svc-install -u nova -n nova-all -c 'nova-all --someoption' -r https://github.com/openstack/nova.git
os-svc-install -u nova -r https://github.com/openstack/nova.git
# install a system-start script for nova-api
os-svc-daemon -e 'foo=bar bar=baz' -n nova-api -u nova -c /opt/stack/venvs/nova/bin/nova-api -- --config-dir /etc/nova

View File

@@ -89,16 +89,18 @@ function usage() {
echo " -r service's git repo url"
echo " -b repo branch or ref (default 'master')"
echo " -u name of the service run-as user"
exit 0
}
while getopts r:u:c:n:h:b: opt; do
user=
repo=
while getopts hr:u:b: opt; do
case "$opt" in
u) user=$OPTARG;;
h) usage;;
h) usage; exit 0;;
r) repo=$OPTARG;;
b) branch=$OPTARG;;
\?) usage;;
\?) usage; exit 1;;
:) usage; exit 1;;
esac
done