Page MenuHomeFreeBSD

timeout: Move from /usr/bin to /bin
ClosedPublic

Authored by 0mp on Feb 1 2023, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 11, 1:47 PM
Unknown Object (File)
Tue, Feb 4, 6:36 AM
Unknown Object (File)
Sun, Jan 26, 6:18 PM
Unknown Object (File)
Sun, Jan 26, 6:02 PM
Unknown Object (File)
Sun, Jan 26, 5:52 PM
Unknown Object (File)
Sat, Jan 25, 2:58 PM
Unknown Object (File)
Sat, Jan 25, 2:28 PM
Unknown Object (File)
Sat, Jan 25, 2:20 PM
Subscribers

Details

Summary
timeout(1) is used by /etc/rc.d/zfskeys. Unfortunately, having
timeout(1) installed in /usr/bin causes problems when /usr is an
encrypted ZFS partition.

Implementing timeout(1) in sh(1) is not trivial. A more elegant solution
is to move timeout(1) to /bin so that it is available to early services
in the boot process.

PR:		265221
Reported by:	Ivan <r4@sovserv.ru>
MFC after:	1 week
Sponsored by:	Modirum MDPay
Sponsored by:	Klara Inc.
Test Plan

buildworld, installworld

# time timeout 1s sleep 5
        1.05 real         0.00 user         0.00 sys
# which timeout
/bin/timeout
# which -a timeout
/bin/timeout
/usr/bin/timeout
# cd /usr/tests/bin/timeout && kyua test

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

0mp requested review of this revision.Feb 1 2023, 6:26 PM
This revision is now accepted and ready to land.Feb 1 2023, 8:52 PM
This revision now requires review to proceed.Feb 1 2023, 9:58 PM

Mark old test paths as obsolete.

Hey @imp, I updated the patch because I discovered some problems during installworld. I'm sorry about that.

allanjude added a subscriber: allanjude.

Reviewed by: allanjude

This revision is now accepted and ready to land.Feb 2 2023, 5:10 PM

I think this looks good.

This revision was automatically updated to reflect the committed changes.