X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=e51f7bfefc9401645314e7d29b4ece1251144c5a;hb=01b5b0ff;hp=97b1927b560134757d4b2fcc174e6e5f8a2a3caf;hpb=9506ba5c75a7baaefed8611bae9412734bf73e99;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index 97b1927..e51f7bf 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -183,10 +183,18 @@ fi # }}} # early helper functions {{{ -GOOD='' -BAD='' -WARN='' -NORMAL='' +# skip colors when running within a dumb terminal +if [ "${TERM}" = "dumb" ] ; then + GOOD= + BAD= + WARN= + NORMAL= +else + GOOD='' + BAD='' + WARN='' + NORMAL='' +fi einfo() { einfon "$1\\n" @@ -1523,7 +1531,16 @@ if [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v | ;; esac dd if="${MNTPOINT}/usr/lib/grub/i386-pc/boot.img" of="${ORIG_TARGET}" conv=notrunc bs=440 count=1 - chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2 + case "${_opt_filesystem}" in + f2fs) + chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos f2fs + ;; + # NOTE - we might need to distinguish between further filesystems + *) + chroot "${MNTPOINT}" grub-mkimage -O i386-pc -p "(hd0,msdos1)/boot/grub" -o /tmp/core.img biosdisk part_msdos ext2 + ;; + esac + dd if="${MNTPOINT}/tmp/core.img" of="${ORIG_TARGET}" conv=notrunc seek=1 rm -f "${MNTPOINT}/tmp/core.img" fi