Bug 256772 - sysutils/firstboot-freebsd-update - [patch] - use --not-running-from-cron
Summary: sysutils/firstboot-freebsd-update - [patch] - use --not-running-from-cron
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Colin Percival
Depends on:
Reported: 2021-06-22 11:54 UTC by Mike Bristow
Modified: 2021-06-24 20:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cperciva)

patch to use --not-running-from-cron (713 bytes, patch)
2021-06-22 11:54 UTC, Mike Bristow
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Bristow 2021-06-22 11:54:31 UTC
Created attachment 225991 [details]
patch to use --not-running-from-cron

Use the --not-running-from-cron flag to freebsd-update.

This means that in the case that the case of rc scripts running without a terminal, the script still doe the right thing.

rc scripts running without a terminal is a different bug, probably, but it is probably better to be robust in the face of them.  Especially as t4g.nano instances are an example of h/w with that bug running when running 13.0-RELEASE.

This will, however, break freebsd-update for FreeBSD 10.1 and earlier; the --not-running-from-cron flag is present in 10.2 and 11.0 and later.
Comment 1 Colin Percival freebsd_committer 2021-06-24 20:44:16 UTC
Thanks, fixed!  We only needed the flag on 'freebsd-update fetch' -- there is no interactivity check for install since it doesn't hammer the mirrors.