From f6c2317a8f7324187abe1c51a775a5d530030f77 Mon Sep 17 00:00:00 2001 From: Gerhard Brauer Date: Sun, 12 Jul 2009 15:47:13 +0200 Subject: Cause swap partitions have no (user) defined mountpoint they are not added to the generated fstab. Fixed this with giving them a fs_mountpoint to "swap" while processing process_filesystem (). --- src/core/libs/lib-blockdevices-filesystems.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 7cdd477..577fd81 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -684,6 +684,7 @@ process_filesystem () then debug 'FS' "swaponning $part" swapon $part >$LOG 2>&1 || ( show_warning 'Swapon' "Error activating swap: swapon $part" ; return 1 ) + fs_mountpoint="swap" # actually it's a hack to set the mountpoint in this (late) stage. this could be cleaner.. else [ "$fs_mount" = runtime ] && dst=$fs_mountpoint [ "$fs_mount" = target ] && dst=$var_TARGET_DIR$fs_mountpoint @@ -709,7 +710,7 @@ process_filesystem () if ! grep -q "$part $fs_mountpoint $fs_type defaults 0 " $TMP_FSTAB 2>/dev/null #$TMP_FSTAB may not exist yet then echo -n "$part $fs_mountpoint $fs_type defaults 0 " >> $TMP_FSTAB - if [ "$FSTYPE" = "swap" ]; then + if [ "$fs_type" = "swap" ]; then echo "0" >>$TMP_FSTAB else echo "1" >>$TMP_FSTAB -- cgit v1.2.3-54-g00ecf