Page MenuHomeFreeBSD

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

Authored by 0mp on Feb 1 2023, 6:26 PM.
Tags
None
Referenced Files
F118832447: D38344.diff
Mon, Jun 2, 9:47 AM
Unknown Object (File)
Fri, May 23, 2:11 PM
Unknown Object (File)
Sat, May 10, 6:50 AM
Unknown Object (File)
Apr 30 2025, 9:55 PM
Unknown Object (File)
Apr 24 2025, 1:50 AM
Unknown Object (File)
Apr 22 2025, 11:47 AM
Unknown Object (File)
Apr 17 2025, 7:25 AM
Unknown Object (File)
Apr 14 2025, 5:57 AM
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.