X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=308563709672359da2d33c3a9a737a3f76d330fb;hp=7f367eca386a9037b5c61866f1a41c85302bbd66;hb=10690a93c8cfddf92ee4d6ab17015b293b0e3709;hpb=ddbb875446e0efa8cd310ed96270713615db1a46 diff --git a/grml-debootstrap b/grml-debootstrap index 7f367ec..3085637 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -845,7 +845,7 @@ if [ -n "$ISO" ] ; then file*) # do nothing ;; *) - ISO=file:$1 + ISO=file:$ISO ;; esac fi @@ -853,6 +853,12 @@ ISODIR=${ISO##file:} ISODIR=${ISODIR%%/} # }}} +# Debian ISOs do not contain signed Release files {{{ +if [ -n "$ISO" ] ; then + DEBOOTSTRAP_OPT="$DEBOOTSTRAP_OPT --no-check-gpg" +fi +# }}} + # create filesystem {{{ mkfs() { if [ -n "$DIRECTORY" ] ; then @@ -945,7 +951,7 @@ prepare_vm() { # if dm-mod isn't available then kpartx will fail with # "Is device-mapper driver missing from kernel? [...]" - if ! kpartx -av $TARGET >/dev/null 2>&1 ; then + if ! kpartx -av $TARGET >/dev/null 2>&1 || ! grep -q device-mapper /proc/misc >/dev/null 2>&1 ; then einfo "Device-mapper not ready yet, trying to load dm-mod module." modprobe dm-mod ; eend $? fi @@ -1041,15 +1047,16 @@ debootstrap_system() { eend 1 ; exit 1 fi - einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}${ISO}" - if [ -n "$MIRROR" ] ; then - einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR" - $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR - RC=$? - else + if [ -n "$ISO" ] ; then + einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${ISO}" einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO" $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $ISO RC=$? + else + einfo "Running $DEBOOTSTRAP $DEBOOTSTRAP_OPT for release ${RELEASE}${ARCHINFO} using ${MIRROR}" + einfo "Executing: $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR" + $DEBOOTSTRAP $ARCHCMD $KEYRING $DEBOOTSTRAP_OPT $RELEASE $MNTPOINT $MIRROR + RC=$? fi if [ $RC -ne 0 ] ; then