14 | 14 |
;;
|
15 | 15 |
esac
|
16 | 16 |
fi
|
|
17 |
|
|
18 |
os="$(udpkg --print-os)"
|
17 | 19 |
|
18 | 20 |
for dev in $DEVICES/*; do
|
19 | 21 |
[ -d $dev ] || continue
|
|
38 | 40 |
fi
|
39 | 41 |
options=$(get_mountoptions $dev $id)
|
40 | 42 |
if [ "$mountpoint" = / ]; then
|
41 | |
if [ "$(udpkg --print-os)" = hurd ]; then
|
|
43 |
if [ "$os" = hurd ] || [ "$os" = kfreebsd ] ; then
|
42 | 44 |
: # remount-ro not supported
|
43 | 45 |
elif [ "$options" = defaults ]; then
|
44 | 46 |
options="errors=remount-ro"
|
|
49 | 51 |
else
|
50 | 52 |
pass=2
|
51 | 53 |
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
|
53 | 64 |
;;
|
54 | 65 |
fat16|fat32)
|
55 | 66 |
[ -f "$id/mountpoint" ] || continue
|
56 | 67 |
mountpoint=$(cat $id/mountpoint)
|
57 | 68 |
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"
|
63 | 74 |
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
|
64 | 85 |
fi
|
65 | |
echo "$path" "$mountpoint" vfat $options 0 0
|
66 | 86 |
;;
|
67 | 87 |
esac
|
68 | 88 |
done
|