]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd/lxc-update-config: check for empty arguments 2174/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 12:36:31 +0000 (13:36 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 12:36:31 +0000 (13:36 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cmd/lxc-update-config.in

index 785322c386cc1a2b839358321406e25f26e7ef18..fd9110345926643a78bbd7691d1cc847797f0e2b 100644 (file)
@@ -14,6 +14,12 @@ EOF
     return 0
 }
 
+# Check whether any arguments are provided.
+if [ $# -eq 0 ]; then
+    usage "${0}"
+    exit 0
+fi
+
 OPTIONS=$(getopt -o c:h --long config:,help -- "${@}")
 eval set -- "${OPTIONS}"