Codebase list partman-basicfilesystems / 69c08b2
* Use 'rm -f' rather than more awkward test-then-remove constructions. r31525 Colin Watson 18 years ago
6 changed file(s) with 10 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
3434
3535 case "$RET" in
3636 Do?not?mount?it)
37 [ ! -f "$part/mountpoint" ] || rm $part/mountpoint
37 rm -f $part/mountpoint
3838 break
3939 ;;
4040 Enter?manually)
122122 if [ "$RET" ]; then
123123 echo "$RET" >$part/label
124124 else
125 [ ! -f $part/label ] || rm $part/label
125 rm -f $part/label
126126 fi
127127 db_reset partman-basicfilesystems/choose_label
128128 ;;
140140 if [ "$RET" ]; then
141141 echo "$RET" >$part/reserved_for_root
142142 else
143 [ ! -f $part/reserved_for_root ] || rm $part/reserved_for_root
143 rm -f $part/reserved_for_root
144144 fi
145145 db_reset partman-basicfilesystems/specify_reserved
146146 ;;
160160 if [ "$RET" != "$typical_usage" ]; then
161161 echo "$RET" >$part/usage
162162 else
163 [ ! -f $part/usage ] || rm $part/usage
163 rm -f $part/usage
164164 fi
165165 ;;
166166 esac
1212
1313 echo swap >$dev/$id/method
1414 >$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
22 [ Colin Watson ]
33 * Set pass field to 0 for FAT filesystems, to prevent filesystem checks
44 that sometimes behave strangely (closes: #305137, Ubuntu #1912).
5 * Use 'rm -f' rather than more awkward test-then-remove constructions.
56
67 [ Christian Perrier ]
78 * s/behaviour/behavior for consistency
2020 mountpoint=$(cat $id/mountpoint)
2121 # due to #249322, #255135, #258117:
2222 if [ "$mountpoint" = /tmp ]; then
23 rm $id/options/noexec >/dev/null 2>/dev/null || true
23 rm -f $id/options/noexec
2424 fi
2525 options=$(get_mountoptions $dev $id)
2626 if [ "$mountpoint" = / ]; then
2323 db_input critical $tpl || true
2424 db_go || exit
2525 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
2828 IFS=,
2929 for op in $RET; do
3030 op=${op# }
2323
2424 case "$RET" in
2525 Do?not?mount?it)
26 [ ! -f "$part/mountpoint" ] || rm $part/mountpoint
26 rm -f $part/mountpoint
2727 break
2828 ;;
2929 Enter?manually)