3
# Only run the first time.
4
if [ -f /var/lib/partman/autouse_swap ]; then
7
[ -d /var/lib/partman ] || mkdir /var/lib/partman
8
touch /var/lib/partman/autouse_swap
10
. /lib/partman/definitions.sh
13
for dev in /var/lib/partman/devices/*; do
14
[ -d "$dev" ] || continue
16
open_dialog PARTITIONS
17
while { read_line num id size type fs path name; [ "$id" ]; }; do
18
[ -f $id/detected_filesystem ] || continue
19
fs=$(cat $id/detected_filesystem)
20
if [ "$fs" = linux-swap ]; then
21
partitions="$partitions $dev,$id"
27
for part in $partitions; do
30
[ -d $dev/$id ] || continue
31
echo swap >$dev/$id/method
32
update_partition $dev $id