Page MenuHomeFreeBSD

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

Authored by 0mp on Feb 1 2023, 6:26 PM.
Tags
None
Referenced Files
F151849550: D38344.id116218.diff
Sat, Apr 11, 2:18 AM
Unknown Object (File)
Tue, Apr 7, 9:46 AM
Unknown Object (File)
Sun, Apr 5, 12:32 AM
Unknown Object (File)
Wed, Apr 1, 5:40 AM
Unknown Object (File)
Wed, Apr 1, 4:58 AM
Unknown Object (File)
Mar 3 2026, 3:11 PM
Unknown Object (File)
Mar 2 2026, 12:49 PM
Unknown Object (File)
Feb 8 2026, 2:00 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 Passed
Unit
No Test Coverage
Build Status
Buildable 49434
Build 46324: arc lint + arc unit

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.