* Use 'rm -f' rather than more awkward test-then-remove constructions.
r31525
Colin Watson
18 years ago
34 | 34 |
|
35 | 35 |
case "$RET" in
|
36 | 36 |
Do?not?mount?it)
|
37 | |
[ ! -f "$part/mountpoint" ] || rm $part/mountpoint
|
|
37 |
rm -f $part/mountpoint
|
38 | 38 |
break
|
39 | 39 |
;;
|
40 | 40 |
Enter?manually)
|
|
122 | 122 |
if [ "$RET" ]; then
|
123 | 123 |
echo "$RET" >$part/label
|
124 | 124 |
else
|
125 | |
[ ! -f $part/label ] || rm $part/label
|
|
125 |
rm -f $part/label
|
126 | 126 |
fi
|
127 | 127 |
db_reset partman-basicfilesystems/choose_label
|
128 | 128 |
;;
|
|
140 | 140 |
if [ "$RET" ]; then
|
141 | 141 |
echo "$RET" >$part/reserved_for_root
|
142 | 142 |
else
|
143 | |
[ ! -f $part/reserved_for_root ] || rm $part/reserved_for_root
|
|
143 |
rm -f $part/reserved_for_root
|
144 | 144 |
fi
|
145 | 145 |
db_reset partman-basicfilesystems/specify_reserved
|
146 | 146 |
;;
|
|
160 | 160 |
if [ "$RET" != "$typical_usage" ]; then
|
161 | 161 |
echo "$RET" >$part/usage
|
162 | 162 |
else
|
163 | |
[ ! -f $part/usage ] || rm $part/usage
|
|
163 |
rm -f $part/usage
|
164 | 164 |
fi
|
165 | 165 |
;;
|
166 | 166 |
esac
|
12 | 12 |
|
13 | 13 |
echo swap >$dev/$id/method
|
14 | 14 |
>$dev/$id/format
|
15 | |
if [ -f $dev/$id/use_filesystem ]; then
|
16 | |
rm $dev/$id/use_filesystem
|
17 | |
fi
|
|
15 |
rm -f $dev/$id/use_filesystem
|
2 | 2 |
[ Colin Watson ]
|
3 | 3 |
* Set pass field to 0 for FAT filesystems, to prevent filesystem checks
|
4 | 4 |
that sometimes behave strangely (closes: #305137, Ubuntu #1912).
|
|
5 |
* Use 'rm -f' rather than more awkward test-then-remove constructions.
|
5 | 6 |
|
6 | 7 |
[ Christian Perrier ]
|
7 | 8 |
* s/behaviour/behavior for consistency
|
20 | 20 |
mountpoint=$(cat $id/mountpoint)
|
21 | 21 |
# due to #249322, #255135, #258117:
|
22 | 22 |
if [ "$mountpoint" = /tmp ]; then
|
23 | |
rm $id/options/noexec >/dev/null 2>/dev/null || true
|
|
23 |
rm -f $id/options/noexec
|
24 | 24 |
fi
|
25 | 25 |
options=$(get_mountoptions $dev $id)
|
26 | 26 |
if [ "$mountpoint" = / ]; then
|
23 | 23 |
db_input critical $tpl || true
|
24 | 24 |
db_go || exit
|
25 | 25 |
db_get $tpl
|
26 | |
[ -d $part/options ] || mkdir $part/options
|
27 | |
rm $part/options/* >/dev/null 2>/dev/null || true
|
|
26 |
rm -rf $part/options
|
|
27 |
mkdir $part/options
|
28 | 28 |
IFS=,
|
29 | 29 |
for op in $RET; do
|
30 | 30 |
op=${op# }
|
23 | 23 |
|
24 | 24 |
case "$RET" in
|
25 | 25 |
Do?not?mount?it)
|
26 | |
[ ! -f "$part/mountpoint" ] || rm $part/mountpoint
|
|
26 |
rm -f $part/mountpoint
|
27 | 27 |
break
|
28 | 28 |
;;
|
29 | 29 |
Enter?manually)
|