X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=007792fff4e8789699ed9a83c9f5abdaf11cd7e0;hp=498451fec6de960d60afd22fb100994d889b9e34;hb=7bab80c89ec11649062162119e0ba28d18e9fa58;hpb=73829b0497532dfff79a0c23c3f39c7bfb83ea05 diff --git a/chroot-script b/chroot-script index 498451f..007792f 100755 --- a/chroot-script +++ b/chroot-script @@ -530,6 +530,28 @@ fstab() { } # }}} +# ensure we have according filesystem tools available {{{ +install_fs_tools() { + local pkg="" + + # note: this is supposed to be coming either via command lines' + # $_opt_filesystem or via createfstab() + case "${FILESYSTEM}" in + jfs) + pkg="jfsutils" + ;; + xfs) + pkg="xfsprogs" + ;; + esac + + if [ -n "${pkg:-}" ] && ! dpkg --list "${pkg}" 2>/dev/null | grep -q '^ii' ; then + echo "Filesystem package ${pkg} not present, installing now" + DEBIAN_FRONTEND=$DEBIAN_FRONTEND $APTINSTALL "${pkg}" + fi +} +# }}} + # set up hostname {{{ hostname() { if [ -n "$HOSTNAME" ] ; then @@ -751,7 +773,8 @@ trap signal_handler HUP INT QUIT TERM for i in chrootmirror grmlrepos backportrepos kernelimg_conf \ kernel packages extrapackages reconfigure hosts \ - default_locales timezone fstab hostname initrd grub_install passwords \ + default_locales timezone fstab install_fs_tools hostname \ + initrd grub_install passwords \ custom_scripts upgrade_system remove_apt_cache services \ remove_chrootmirror; do if stage $i ; then