diff options
author | Gerhard Brauer <gerbra@archlinux.de> | 2009-07-12 15:47:13 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-07-12 15:47:13 +0200 |
commit | f6c2317a8f7324187abe1c51a775a5d530030f77 (patch) | |
tree | 811db71176042f9cb56522136f474f749621b2dd /src/core/libs | |
parent | 0210ac40343817267e6db7eefe4737cdbb59da68 (diff) |
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 ().
Diffstat (limited to 'src/core/libs')
-rw-r--r-- | 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..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 |