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" ebegin "Remounting filesystems"
local mountpoint local mountpoint
for mountpoint in $(fstabinfo); do for mountpoint in $(fstabinfo); do
case "${mountpoint}" in
/*) # Don't remount swap etc.
mountinfo -q "${mountpoint}" && \ mountinfo -q "${mountpoint}" && \
fstabinfo --remount "${mountpoint}" fstabinfo --remount "${mountpoint}"
;;
esac
done done
eend 0 eend 0
} }