3
. /lib/partman/definitions.sh
3
. /lib/partman/lib/base.sh
6
6
if db_get debian-installer/locale; then
7
# TODO: This check breaks for locales that use the UTF-8 encoding but
8
# whose names don't include ".UTF-8". This is difficult to fix without
9
# adding more encoding intelligence to localechooser. In the meantime,
10
# we hardcode certain such non-obvious UTF-8 locales known to be used in
13
*.UTF-8|bn_BD|dz_BT|gu_IN|hi_IN|km_KH|ml_IN|ne_NP|pa_IN|se_NO|ta_IN|vi_VN|wo_SN)
7
# TODO: This check breaks for locales that use the UTF-8 encoding but
8
# whose names don't include ".UTF-8". This is difficult to fix without
9
# adding more encoding intelligence to localechooser. In the meantime,
10
# we hardcode certain such non-obvious UTF-8 locales known to be used in
13
*.UTF-8|bn_BD|dz_BT|gu_IN|hi_IN|km_KH|ml_IN|ne_NP|pa_IN|se_NO|ta_IN|vi_VN|wo_SN)
19
19
for dev in $DEVICES/*; do
22
22
open_dialog PARTITIONS
23
23
while { read_line num id size type fs path name; [ "$id" ]; }; do
24
[ $fs != free ] || continue
25
[ -f "$id/method" ] || continue
26
method=$(cat $id/method)
27
if [ "$method" = swap ]; then
28
echo "$path" none swap sw 0 0
30
[ -f "$id/acting_filesystem" ] || continue
31
filesystem=$(cat $id/acting_filesystem)
34
[ -f "$id/mountpoint" ] || continue
35
mountpoint=$(cat $id/mountpoint)
36
# due to #249322, #255135, #258117:
37
if [ "$mountpoint" = /tmp ]; then
38
rm -f $id/options/noexec
40
options=$(get_mountoptions $dev $id)
41
if [ "$mountpoint" = / ]; then
42
if [ "$options" = defaults ]; then
43
options="errors=remount-ro"
45
options="${options},errors=remount-ro"
51
echo "$path" "$mountpoint" ext2 $options 0 $pass
54
[ -f "$id/mountpoint" ] || continue
55
mountpoint=$(cat $id/mountpoint)
56
options=$(get_mountoptions $dev $id)
58
if [ "$options" = defaults ]; then
61
options="$options,utf8"
64
# base-passwd defines gid 46 as group plugdev
65
echo "$path" "$mountpoint" vfat $options,umask=007,gid=46 0 1
68
[ -f "$id/mountpoint" ] || continue
69
mountpoint=$(cat $id/mountpoint)
70
options=$(get_mountoptions $dev $id)
71
if [ "$utf8" ] && [ ! -f /var/lib/partman/ntfs-3g ]; then
72
options="$options,nls=utf8"
74
# base-passwd defines gid 46 as group plugdev
75
echo "$path" "$mountpoint" ntfs $options,umask=007,gid=46 0 1
24
[ $fs != free ] || continue
25
[ -f "$id/method" ] || continue
26
method=$(cat $id/method)
27
if [ "$method" = swap ]; then
28
echo "$path" none swap sw 0 0
30
[ -f "$id/acting_filesystem" ] || continue
31
filesystem=$(cat $id/acting_filesystem)
34
[ -f "$id/mountpoint" ] || continue
35
mountpoint=$(cat $id/mountpoint)
36
# due to #249322, #255135, #258117:
37
if [ "$mountpoint" = /tmp ]; then
38
rm -f $id/options/noexec
40
options=$(get_mountoptions $dev $id)
41
if [ "$mountpoint" = / ]; then
42
if [ "$options" = defaults ]; then
43
options="errors=remount-ro"
45
options="${options},errors=remount-ro"
51
echo "$path" "$mountpoint" ext2 $options 0 $pass
54
[ -f "$id/mountpoint" ] || continue
55
mountpoint=$(cat $id/mountpoint)
56
options=$(get_mountoptions $dev $id)
58
if [ "$options" = defaults ]; then
61
options="$options,utf8"
64
# base-passwd defines gid 46 as group plugdev
65
echo "$path" "$mountpoint" vfat $options,umask=007,gid=46 0 1
68
[ -f "$id/mountpoint" ] || continue
69
mountpoint=$(cat $id/mountpoint)
70
options=$(get_mountoptions $dev $id)
71
if [ "$utf8" ] && [ ! -f /var/lib/partman/ntfs-3g ]; then
72
options="$options,nls=utf8"
74
# base-passwd defines gid 46 as group plugdev
75
echo "$path" "$mountpoint" ntfs $options,umask=007,gid=46 0 1