#!/bin/sh # Check that the root partition is of type UFS. case "$(udpkg --print-os)" in "kfreebsd") ;; *) exit 0 ;; esac . /lib/partman/lib/base.sh for dev in $DEVICES/*; do [ -d "$dev" ] || continue cd $dev open_dialog PARTITIONS while { read_line num id size type fs path name; [ "$id" ]; }; do [ "$fs" != free ] || continue [ -f $id/method ] || continue [ -f $id/acting_filesystem ] || continue [ -f $id/mountpoint ] || continue mountpoint=$(cat $id/mountpoint) filesystem=$(cat $id/acting_filesystem) if [ "$mountpoint" = / ]; then root_fs=$filesystem root_type=$type root_path=$path fi done close_dialog done # We need a root UFS or ZFS filesystem if [ "$root_fs" != ufs ] && [ "$root_fs" != zfs ]; then db_set partman-ufs/root_not_ufs true db_input critical partman-ufs/root_not_ufs || true db_go || true db_get partman-ufs/root_not_ufs if [ "$RET" = true ]; then exit 1 fi fi