]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-alpine: add --repository option
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 31 Dec 2012 19:49:17 +0000 (20:49 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 2 Jan 2013 18:06:43 +0000 (13:06 -0500)
This allows specifying what repository to use for the container.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-alpine.in

index 7787e757cf76fd3857faf1d626e9cdf9bd87749f..87886f59e3d96c6da2d08d2570d3d5f93347ed57 100644 (file)
@@ -119,7 +119,10 @@ die() {
 }
 
 usage() {
-    echo "Usage: $(basename $0) [-h|--help] -p|--path <path> -n|--name <name>" >&2
+    cat >&2 <<EOF
+Usage: $(basename $0) [-h|--help] [-r|--repository <url>]
+                   -p|--path <path> -n|--name <name>
+EOF
 }
 
 usage_err() {
@@ -153,6 +156,11 @@ while [ $# -gt 0 ]; do
         path=$1
         shift
         ;;
+    -r|--repository)
+        optarg_check $opt "$1"
+        repository=$1
+        shift
+       ;;
     --)
         break;;
     --*=*)