X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=7d6d6a39485e84961b8fbc034387fee3db65e6e2;hp=8cafe546901fa27ce27e7e128b74575079a19f99;hb=43b1b3a0c5b6d1fe61ba035e30cd7ddffd4958a0;hpb=217234f891dc8ce775609cb3d773fc3fb3f6d968 diff --git a/grml-debootstrap b/grml-debootstrap index 8cafe54..7d6d6a3 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -51,6 +51,7 @@ 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 is supported. Configuration options: @@ -149,6 +150,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" ] && { @@ -759,17 +761,18 @@ mount_target() { # install main chroot {{{ debootstrap_system() { - if ! grep -q "$MNTPOINT" /proc/mounts ; then - mount_target - fi if [ "$_opt_nodebootstrap" ]; then einfo "Skipping debootstrap as requested." return fi + if grep -q "$MNTPOINT" /proc/mounts || [ -n "$DIRECTORY" ] ; then einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}" - [ -n "$MIRROR" ] && $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR || \ - $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO + if [ -n "$MIRROR" ] ; then + $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR + else + $DEBOOTSTRAP $ARCHCMD $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO + fi eend $? else eerror "Error: $MNTPOINT not mounted, can not continue."