From e0b5ee5cbbe6fc6c10db2dd1693450eecf154d80 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Sat, 3 Feb 2007 02:03:27 +0000 Subject: [PATCH] Stefan Fiedler: stone: fix detection of mounted swap space in install module [2007011821512431810] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8212 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/stone/stone_mod_install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/base/stone/stone_mod_install.sh b/package/base/stone/stone_mod_install.sh index 74cb8b10a..6818ed2b2 100644 --- a/package/base/stone/stone_mod_install.sh +++ b/package/base/stone/stone_mod_install.sh @@ -85,7 +85,10 @@ part_unmounted_action() { part_add() { local action="unmounted" location="currently not mounted" - if grep -q "^/dev/$1/$2 " /proc/swaps; then + # Devices in /proc/swaps are listed with their real device file name, + # while in /proc/mounts they are listed with the device file name that + # was actually used for the mount (which may have been a symlink). + if grep -q "^`readlink -fn /dev/$1/$2` " /proc/swaps; then action=swap ; location="swap " elif grep -q "^/dev/$1/$2 " /proc/mounts; then action=mounted