[Buildroot] swapoff, but no swapon in initab
Carlos Santos
casantos at datacom.com.br
Tue Jun 12 11:52:25 UTC 2018
> From: "Peter Korsgaard" <peter at korsgaard.com>
> To: "Arnout Vandecappelle" <arnout at mind.be>
> Cc: "DATACOM" <casantos at datacom.com.br>, "buildroot" <buildroot at buildroot.org>
> Sent: Tuesday, June 12, 2018 6:06:13 AM
> Subject: Re: swapoff, but no swapon in initab
>>>>>> "Arnout" == Arnout Vandecappelle <arnout at mind.be> writes:
>
> Hi,
>
> >> "All devices marked as ``swap'' in /etc/fstab are made available,
> >> except for those with the ``noauto'' option. Devices that are
> >> already being used as swap are silently skipped."
>
> > So bottom line: it would make sense to add a swapon -a to the default inittabs
> > (both busybox and sysv).
>
> Don't we then end up with an ugly error message / somewhat needlessly bloat
> everyones busybox config for the (very common) situation where swap is
> not used and disabled in the kernel?
A "swapon -a" does nothing if a swap entry is not found in /etc/fstab,
so there is no error message. Conversely, a "swapoff -a" does nothing
if a mounted swap is not found but I did not test if it issues some
error message due to a failing system call when swap is disabled in
the kernel. I will run some tests and submit an additional patch, if
necessary.
--
Carlos Santos (Casantos) - DATACOM, P&D
“Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.” — Epitaph of a volunteer
More information about the buildroot
mailing list