X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=0d2efbb1f2f8f68aa469c679618ed73f48ea25e3;hp=02015ce78c95833a0e9437fbce310d42ee77ee76;hb=87394f3ff5c561c572d786c96c4231503ccfb2f2;hpb=444d8dfca8c5fe66bad93e8e74d7d2eb4777712e diff --git a/grml-debootstrap b/grml-debootstrap index 02015ce..0d2efbb 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -40,8 +40,10 @@ Bootstrap options: -i, --iso Mountpoint where a Debian ISO is mounted to, for use instead of fetching packages from a mirror. -r, --release Release of new Debian system (default: lenny). - -t, --target Target partition (/dev/...) or directory. - -p, --mntpoint Mountpoint used for mounting the target system. + -t, --target Target partition (/dev/...) or directory where the + system should be installed to. + -p, --mntpoint Mountpoint used for mounting the target system, + has no effect if -t is given and represents a directory. --debopt Extra parameters passed to the debootstrap command. --interactive Use interactive mode (frontend). --nodebootstrap Skip debootstrap, only do configuration to the target. @@ -734,14 +736,14 @@ mount_target() { # install main chroot {{{ debootstrap_system() { - if ! grep -q $MNTPOINT /proc/mounts ; then + 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 + 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 @@ -777,7 +779,7 @@ preparechroot() { cp $VERBOSE $CONFFILES/chroot-script $MNTPOINT/bin/chroot-script chmod 755 $MNTPOINT/bin/chroot-script - mkdir $MNTPOINT/etc/debootstrap/ + [ -d "$MNTPOINT"/etc/debootstrap/ ] || mkdir "$MNTPOINT"/etc/debootstrap/ # make sure we have our files for later use via chroot-script cp $VERBOSE $CONFFILES/config $MNTPOINT/etc/debootstrap/