Codebase list partman-basicfilesystems / 2a6c723
GNU/kFreeBSD support: Add code to mount and write fstab. r64390 Aurelien Jarno 13 years ago
3 changed file(s) with 31 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
1414 * GNU/kFreeBSD support:
1515 - Add support for module loading and detection.
1616 - Add kfreebsd specific mount options.
17 - Add code to mount and write fstab.
1718
1819 -- Colin Watson <cjwatson@debian.org> Tue, 13 Jul 2010 10:31:28 +0100
1920
1414 ;;
1515 esac
1616 fi
17
18 os="$(udpkg --print-os)"
1719
1820 for dev in $DEVICES/*; do
1921 [ -d $dev ] || continue
3840 fi
3941 options=$(get_mountoptions $dev $id)
4042 if [ "$mountpoint" = / ]; then
41 if [ "$(udpkg --print-os)" = hurd ]; then
43 if [ "$os" = hurd ] || [ "$os" = kfreebsd ] ; then
4244 : # remount-ro not supported
4345 elif [ "$options" = defaults ]; then
4446 options="errors=remount-ro"
4951 else
5052 pass=2
5153 fi
52 echo "$path" "$mountpoint" ext2 $options 0 $pass
54 if [ "$os" = kfreebsd ] ; then
55 if [ "$options" = "defaults" ] ; then
56 options="rw"
57 elif ! echo "$options" | grep -q '\(^\|,\)r\(o\|w\)\(,\|$\)' ; then
58 options="${options},rw"
59 fi
60 echo "$path" "$mountpoint" ext2fs $options 0 $pass
61 else
62 echo "$path" "$mountpoint" ext2 $options 0 $pass
63 fi
5364 ;;
5465 fat16|fat32)
5566 [ -f "$id/mountpoint" ] || continue
5667 mountpoint=$(cat $id/mountpoint)
5768 options=$(get_mountoptions $dev $id)
58 if [ "$utf8" ]; then
59 if [ "$options" = defaults ]; then
60 options="utf8"
61 else
62 options="$options,utf8"
69 if [ "$os" = kfreebsd ] ; then
70 if [ "$options" = "defaults" ] ; then
71 options="rw"
72 elif ! echo "$options" | grep -q '\(^\|,\)r\(o\|w\)\(,\|$\)' ; then
73 options="${options},rw"
6374 fi
75 echo "$path" "$mountpoint" msdosfs $options 0 0
76 else
77 if [ "$utf8" ] ; then
78 if [ "$options" = defaults ]; then
79 options="utf8"
80 else
81 options="$options,utf8"
82 fi
83 fi
84 echo "$path" "$mountpoint" vfat $options 0 0
6485 fi
65 echo "$path" "$mountpoint" vfat $options 0 0
6686 ;;
6787 esac
6888 done
99 pass=$6
1010
1111 case $type in
12 ext2|vfat)
13 mount ${options:+-o "$options"} $fs /target$mp || exit 1
12 ext2|vfat|ext2fs|msdosfs)
13 mount ${options:+-o "$options"} ${type:+-t "$type"} $fs /target$mp || exit 1
1414 echo "umount /target$mp"
1515 exit 0
1616 ;;