Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2019 14:35:34 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        hackers@freebsd.org
Subject:   Setting up encrypted swap: "swapon" vs. "swapctl -a"
Message-ID:  <20191211223534.GU27431@albert.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--kSOhxpxUsM1s2qz/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I find that swapon(8) allows a -E flag:

| The swapon utility adds the specified swap devices to the system...
| The -E option causes each of following devices to receive a BIO_DELETE
| command....

While "swapctl -a" is (otherwise) similar to "swapon,":

| swapctl -E -a /dev/nda11p5.eli
| usage: swapctl [-AghklmsU] [-a file ... | -d file ...]
| swapctl -a /dev/nda11p5.eli
| swapctl: adding /dev/nda11p5.eli as swap device
| swapoff /dev/nda11p5.eli
| swapon -E /dev/nda11p5.eli

That said, I also note:

| The swapctl utility exists primarily for those familiar with other
| BSDs and may be used to add, remove, or list swap devices....

Should "swapctl -a" also accept & make use of -E?

Peace,
david
--=20
David H. Wolfskill				david@catwhisker.org
Some might think an oath of office is as meaningful as a marriage vow.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

--kSOhxpxUsM1s2qz/
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAl3xbzZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy
OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2
PcmO+ggApvDQ1AwQiqCY+wy4LmsMloYmFp5JOpb2g7icXFxw/K8vLOjuBo578bV3
vc/aF2CDVXrAEPQjej0/yCPoxPtmztPULnT/72g5bXaYaEvfJGo2xxBCA0Xkz7ZY
khlcUBPiJNqa+eKJWtHN7iIo5yiZUhBoCJ72xcijWlM89g/fClcgFUqaYU80I4YH
Eflw6gjaWsuMS6qkJx/wtqCQOC7xds/7cX8b/Gs/JePqb38NAjSMI8R1a9ADKZXp
6qKpvICa6KDGF4EmXShwTthVYftkJ94Bg66qXFt+yf9vRyHhw5/RUAWchqbpb4fv
qZvRtztfYv9WK53G+/LDa+mjaCxnjQ==
=vEOv
-----END PGP SIGNATURE-----

--kSOhxpxUsM1s2qz/--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191211223534.GU27431>