init.d/root: don't remount swap

While refactoring the changes proposed in #533 a minor error was
introduced were the root service will now attempt to remount swap.
This will fail with the error message `mountinfo: 'swap' is not a
mountpoint`.

This fixes #546
This commit is contained in:
Sören Tempel 2022-09-03 00:10:56 +02:00 committed by William Hubbs
parent 9b08de926b
commit d21dde73ba

View File

@ -48,8 +48,12 @@ start()
ebegin "Remounting filesystems"
local mountpoint
for mountpoint in $(fstabinfo); do
mountinfo -q "${mountpoint}" && \
fstabinfo --remount "${mountpoint}"
case "${mountpoint}" in
/*) # Don't remount swap etc.
mountinfo -q "${mountpoint}" && \
fstabinfo --remount "${mountpoint}"
;;
esac
done
eend 0
}