[Buildroot] [PATCH 3/4] busybox: add an inittab entry to activate swap

Peter Korsgaard peter at korsgaard.com
Tue Jun 12 12:58:59 UTC 2018


>>>>> "Carlos" == Carlos Santos <casantos at datacom.com.br> writes:

 > There is a call to swapoff in the shutdown sequence, so call "swapon -a"
 > on startup. As stated in the swapon man page,

 >    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 even if the system has some init script to start/stop swap (e.g. from
 > a rootfs ovelay) calling swapon/swapoff would be harmless.

I guess an explicit swapon <device> after swapon -a (with an entry for
<device> in /etc/fstab) will fail with an error message, but OK - That
is easy to fix if that happens.

Committed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list