diff options
-rwxr-xr-x | bin/debvm-create | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index b34399b..3da90a5 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -11,7 +11,7 @@ debvm-create - Create a VM image for various Debian releases and architectures =head1 SYNOPSIS -B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> F<sshkey>] [B<-m> I<mirror>] [B<-o> F<output>] [B<-r> I<release>] [B<-s> <task>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>] +B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> F<sshkey>] [B<-m> [B<-o> F<output>] [B<-r> I<release>] [B<-s> <task>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>] =head1 DESCRIPTION @@ -44,11 +44,6 @@ This option also causes the ssh server to be installed. By default, no key or server is installed. To connect to the vm, pass a port number to B<debvm-run> with the B<-s> option. -=item B<-m> I<mirror>, B<--mirror>=I<mirror> - -Specify the Debian mirror to be used for downloading packages and to be configured inside the virtual machine image. -By default, L<http://deb.debian.org/debian> is being used. - =item B<-o> F<output>, B<--output>=F<output> Specify the file name of the resulting virtual machine image. @@ -117,7 +112,6 @@ set -u ARCHITECTURE=$(dpkg --print-architecture) IMAGE=rootfs.ext4 INCLUDE_PACKAGES=init -MIRROR="http://deb.debian.org/debian" SIZE=$((1024*1024*1024)) SKIP=, SSHKEY= @@ -136,7 +130,7 @@ die() { exit 1 } usage() { - die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-m mirror] [-o output] [-r release] [-s task] [-z size_in_GB] [-- mmdebstrap options]" + die "usage: $0 [-a architecture] [-h hostname] [-k sshkey] [-o output] [-r release] [-s task] [-z size_in_GB] [-- mmdebstrap options]" } usage_error() { echo "error: $*" 1>&2 @@ -149,9 +143,6 @@ opt_architecture() { opt_hostname() { VMNAME=$1 } -opt_mirror() { - MIRROR=$1 -} opt_skip() { SKIP="$SKIP$1," } @@ -173,7 +164,6 @@ while getopts :a:h:k:m:o:r:s:z:-: OPTCHAR; do a) opt_architecture "$OPTARG" ;; h) opt_hostname "$OPTARG" ;; k) opt_sshkey "$OPTARG" ;; - m) opt_mirror "$OPTARG" ;; o) opt_output "$OPTARG" ;; r) opt_release "$OPTARG" ;; s) opt_skip "$OPTARG" ;; @@ -183,12 +173,12 @@ while getopts :a:h:k:m:o:r:s:z:-: OPTCHAR; do help) usage ;; - architecture|hostname|mirror|output|release|size|skip|sshkey) + architecture|hostname|output|release|size|skip|sshkey) test "$OPTIND" -gt "$#" && usage_error "missing argument for --$OPTARG" "opt_$OPTARG" "$(nth_arg "$OPTIND" "$@")" OPTIND=$((OPTIND+1)) ;; - architecture=*|hostname=*|mirror=*|output=*|release=*|size=*|skip=*|sshkey=*) + architecture=*|hostname=*|output=*|release=*|size=*|skip=*|sshkey=*) "opt_${OPTARG%%=*}" "${OPTARG#*=}" ;; *) @@ -341,8 +331,7 @@ fi set -- "--customize-hook=$SHARE_DIR/customize-autologin.sh" "$@" -# suite target mirror -set -- "$@" "$SUITE" "$IMAGE" "deb $MIRROR $SUITE main" +set -- "$SUITE" "$IMAGE" "$@" set -ex |