From 7a2b4669765963b76e0a8127f7a3b05ce6e79781 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sun, 15 Jan 2023 20:17:55 +0100 Subject: Drop mirror option It is not needed and can also be done with: debvm-create -- "deb http://ftp.de.debian.org/debian/ unstable main" --- bin/debvm-create | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'bin/debvm-create') 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 [B<-a> I] [B<-h> I] [B<-k> F] [B<-m> I] [B<-o> F] [B<-r> I] [B<-s> ] [B<-z> I] [B<--> I] +B [B<-a> I] [B<-h> I] [B<-k> F] [B<-m> [B<-o> F] [B<-r> I] [B<-s> ] [B<-z> I] [B<--> I] =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 with the B<-s> option. -=item B<-m> I, B<--mirror>=I - -Specify the Debian mirror to be used for downloading packages and to be configured inside the virtual machine image. -By default, L is being used. - =item B<-o> F, B<--output>=F 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 -- cgit v1.2.3