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)
Mon, Mar 11, 5:16 PM
Unknown Object (File)
Mon, Mar 11, 5:16 PM
Unknown Object (File)
Mon, Mar 11, 5:16 PM
Unknown Object (File)
Mon, Mar 11, 5:16 PM
Unknown Object (File)
Mon, Mar 11, 5:16 PM
Unknown Object (File)
Fri, Mar 8, 2:21 AM
Unknown Object (File)
Feb 12 2024, 9:18 AM
Unknown Object (File)
Feb 3 2024, 11:21 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.