From 4976c8893dfa987747061a5f721c8d857cf2bc4f Mon Sep 17 00:00:00 2001 From: Gerhard Brauer Date: Thu, 9 Jul 2009 14:14:46 +0200 Subject: [PATCH 2/2] Fixed swap partitions not in fstab 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 (). Signed-off-by: Gerhard Brauer --- src/core/libs/lib-blockdevices-filesystems.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 7cdd477..a180c67 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" 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 -- 1.6.3.3