From: Ulrich Dangel Date: Thu, 10 Sep 2009 13:22:51 +0000 (+0200) Subject: Added cmdline option for specifying target architecture X-Git-Tag: v0.30~3 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=a36c5f49a8d44894b61d9a4a503a901e92bb92cb;hp=f75b02d87e66bb29f0f0d58d953fd437840a16bf Added cmdline option for specifying target architecture Allow to specify target architecture to install correct kernel inside the chroot and not kernel for host architecture --- diff --git a/cmdlineopts.clp b/cmdlineopts.clp index ea04eeb..39f7e68 100644 --- a/cmdlineopts.clp +++ b/cmdlineopts.clp @@ -13,7 +13,7 @@ ################################################################################ _opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \ - mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,config:,confdir:,packages::,chroot-scripts::,scripts::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,verbose,help,version \ + mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,config:,confdir:,packages::,chroot-scripts::,scripts::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,arch:,verbose,help,version \ -- "$@"` if [ $? != 0 ]; then eerror "Try 'grml-debootstrap --help' for more information."; eend 1; exit 1 @@ -48,6 +48,9 @@ while :; do --nodebootstrap) # Skip debootstrap, only do configuration to the target _opt_nodebootstrap=T ;; + --arch) # Target architecutre + shift; _opt_arch="$1" + ;; # # == Configuration options diff --git a/grml-debootstrap b/grml-debootstrap index 5295be1..b693666 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -51,6 +51,8 @@ Bootstrap options: \$TARGET in grub syntax, like hd0,0 for /dev/sda1. --grub Target for grub installation. Use grub syntax for specifying, like hd0 for /dev/sda. + --arch Architecture to use. Currently only i386 and amd64 + are supported. Configuration options: @@ -149,6 +151,7 @@ fi [ "$_opt_bootappend" ] && BOOT_APPEND=$_opt_bootappend [ "$_opt_groot" ] && GROOT=$_opt_groot [ "$_opt_grub" ] && GRUB=$_opt_grub +[ "$_opt_arch" ] && ARCH=$_opt_arch [ "$_opt_verbose" ] && VERBOSE="-v" [ "$_opt_help" ] && {