summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorNVSRahul <nvsrahul@hotmail.com>2026-01-12 07:12:20 +0530
committerWarner Losh <imp@FreeBSD.org>2026-01-12 12:43:36 -0700
commitced7f29dece3d27785c5037b8aa36e5d48d34b3d (patch)
tree4ae231144908d8814ee96c2aaa4aacd24adbe920 /libexec
parentbabc4d8f70de9dcca3262ca94a777fa3bb6116ff (diff)
rc: Add os-release URL rc.conf variables
Add rc.conf defaults for the os-release URL settings introduced in the os-release rc.d script. This makes it easier for downstream integrators and appliances to override the URLs via rc.conf instead of patching the script. The following variables are added to libexec/rc/rc.conf: - osrelease_home_url - osrelease_documentation_url - osrelease_support_url - osrelease_bug_report_url These correspond to HOME_URL, DOCUMENTATION_URL, SUPPORT_URL, and BUG_REPORT_URL in the generated os-release file. Signed-off-by: NVSRahul <nvsrahul@hotmail.com> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1961
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rc/rc.conf4
-rwxr-xr-xlibexec/rc/rc.d/os-release15
2 files changed, 12 insertions, 7 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index e8f146807f33..2ecaf642d574 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -705,6 +705,10 @@ harvest_mask="4607" # Entropy device harvests all but the very invasive sources.
osrelease_enable="YES" # Update /var/run/os-release on boot (or NO).
osrelease_file="/var/run/os-release" # File to update for os-release.
osrelease_perms="444" # Default permission for os-release file.
+osrelease_home_url="https://FreeBSD.org" # HOME_URL in /var/run/os-release.
+osrelease_documentation_url="https://docs.FreeBSD.org" # DOCUMENTATION_URL in /var/run/os-release.
+osrelease_support_url="https://www.FreeBSD.org/support" # SUPPORT_URL in /var/run/os-release.
+osrelease_bug_report_url="https://bugs.FreeBSD.org" # BUG_REPORT_URL in /var/run/os-release.
dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot
dmesg_umask="022" # Default umask for /var/run/dmesg.boot file.
watchdogd_enable="NO" # Start the software watchdog daemon
diff --git a/libexec/rc/rc.d/os-release b/libexec/rc/rc.d/os-release
index adaa8547913c..43af666614ac 100755
--- a/libexec/rc/rc.d/os-release
+++ b/libexec/rc/rc.d/os-release
@@ -8,17 +8,20 @@
. /etc/rc.subr
+name="osrelease"
+desc="os-release update"
+rcvar="osrelease_enable"
+start_cmd="osrelease_start"
+stop_cmd=":"
+
+load_rc_config $name
+
: ${osrelease_file:=/var/run/os-release}
: ${osrelease_perms:=444}
: ${osrelease_home_url:="https://www.FreeBSD.org"}
: ${osrelease_documentation_url:="https://docs.FreeBSD.org"}
: ${osrelease_support_url:="https://www.FreeBSD.org/support"}
: ${osrelease_bug_report_url:="https://bugs.FreeBSD.org"}
-name="osrelease"
-desc="Update ${osrelease_file}"
-rcvar="osrelease_enable"
-start_cmd="osrelease_start"
-stop_cmd=":"
osrelease_start()
{
@@ -46,8 +49,6 @@ __EOF__
startmsg 'done.'
}
-load_rc_config $name
-
# doesn't make sense to run in a svcj: config setting
osrelease_svcj="NO"