HomeFreeBSD

Remove dependency on files in /usr/bin

Description

Remove dependency on files in /usr/bin

In order to reduce the pre-requisites of this file, implement the
pattern matching and creation of a temporary test directory without
use of grep respectively mktemp.

The new version makes it possible to provide a writable /tmp in any
case and independently of other local or remote file systems (except /
and /dev) being mounted.

The use of "dd if=/dev/random" has the same dependency on /dev/random
being operational as the previous version that used "mktemp". If this
is found to be an issue on platforms that do not have gathered
sufficient entropy at the time when this scriot is run, I suggest to
replace the "dd" command with "ps lauxww" to get a somewhat random
test directory name.

Approved by: rgrimes, glebius, cy
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D28209

Details

Provenance
seAuthored on Jan 19 2021, 11:46 AM
Differential Revision
D28209: Remove dependency of rc.d/tmp on grep
Parents
rGc987d6a67766: linux: map EBUSY returned by ptrace into ESRCH
Branches
Unknown
Tags
Unknown