From 643855476609b8fc8d7c768dce3e38ab08af1baa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 16 Jun 2016 21:16:14 +0200 Subject: Harmonizing defintions of long and short options in getopt code of container commands. Signed-off-by: Daniel Baumann --- lib/container/auto | 4 ++-- lib/container/console | 4 ++-- lib/container/create | 4 ++-- lib/container/enter | 3 +-- lib/container/limit | 3 +-- lib/container/list | 4 ++-- lib/container/remove | 4 ++-- lib/container/restart | 4 ++-- lib/container/start | 4 ++-- lib/container/stop | 4 ++-- 10 files changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/container/auto b/lib/container/auto index 247b667..ac65595 100755 --- a/lib/container/auto +++ b/lib/container/auto @@ -24,8 +24,8 @@ CONFIG="/etc/container-tools/config" Parameters () { - LONG_OPTIONS="start,stop" - OPTIONS="s,t" + LONG_OPTIONS="start,stop," + OPTIONS="s,t," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/console b/lib/container/console index 779f3a6..84c561d 100755 --- a/lib/container/console +++ b/lib/container/console @@ -24,8 +24,8 @@ MACHINES="/var/lib/machines" Parameters () { - LONG_OPTIONS="name:" - OPTIONS="n:" + LONG_OPTIONS="name:," + OPTIONS="n:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/create b/lib/container/create index dea1e76..6d6fc86 100755 --- a/lib/container/create +++ b/lib/container/create @@ -25,8 +25,8 @@ MACHINES="/var/lib/machines" Parameters () { - LONG_OPTIONS="name:,cnt.auto:,bind:,capability:,drop-capability:script:" - OPTIONS="n:,b:,c:,d:,s:" + LONG_OPTIONS="name:,cnt.auto:,bind:,capability:,drop-capability:script:," + OPTIONS="n:,b:,c:,d:,s:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/enter b/lib/container/enter index 0de88da..101b43e 100755 --- a/lib/container/enter +++ b/lib/container/enter @@ -25,8 +25,7 @@ MACHINES="/var/lib/machines" Parameters () { LONG_OPTIONS="name:," - - OPTIONS="n:" + OPTIONS="n:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/limit b/lib/container/limit index c3b0ba8..8b5ffd5 100755 --- a/lib/container/limit +++ b/lib/container/limit @@ -25,8 +25,7 @@ MACHINES="/var/lib/machines" Parameters () { LONG_OPTIONS="name:,blockio-device-weight:,blockio-read-bandwith:,blockio-weight:,blockio-write-bandwith:,cpu-quota:,cpu-shares:,memory-limit:,tasks-max:," - - OPTIONS="n:b:c:m:t:" + OPTIONS="n:b:c:m:t:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/list b/lib/container/list index e5f7cd7..60ae782 100755 --- a/lib/container/list +++ b/lib/container/list @@ -25,8 +25,8 @@ MACHINES="/var/lib/machines" Parameters () { - LONG_OPTIONS="all,format:,host:,other,started,stopped" - OPTIONS="a,f:,h:,o,s,t" + LONG_OPTIONS="all,format:,host:,other,started,stopped," + OPTIONS="a,f:,h:,o,s,t," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/remove b/lib/container/remove index 4f26d43..f43bf1c 100755 --- a/lib/container/remove +++ b/lib/container/remove @@ -25,8 +25,8 @@ MACHINES="/var/lib/machines" Parameters () { - LONG_OPTIONS="name:,force" - OPTIONS="n:,f" + LONG_OPTIONS="name:,force," + OPTIONS="n:,f," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/restart b/lib/container/restart index 9b6f18d..295e0de 100755 --- a/lib/container/restart +++ b/lib/container/restart @@ -24,8 +24,8 @@ MACHINES="/var/lib/machines" Parameters () { - LONG_OPTIONS="name:" - OPTIONS="n:" + LONG_OPTIONS="name:," + OPTIONS="n:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/start b/lib/container/start index 82d7e1c..a4dc033 100755 --- a/lib/container/start +++ b/lib/container/start @@ -28,8 +28,8 @@ SYSTEMCTL="true" Parameters () { - LONG_OPTIONS="name:,nspawn,start" - OPTIONS="n:" + LONG_OPTIONS="name:,nspawn,start," + OPTIONS="n:," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" diff --git a/lib/container/stop b/lib/container/stop index fb470f6..dc78f05 100755 --- a/lib/container/stop +++ b/lib/container/stop @@ -27,8 +27,8 @@ CLEAN="false" Parameters () { - LONG_OPTIONS="name:,force,clean" - OPTIONS="n:,f" + LONG_OPTIONS="name:,force,clean," + OPTIONS="n:,f," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${COMMAND} --options ${OPTIONS} --shell sh -- ${@})" -- cgit v1.2.3