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