Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135249273
D22271.id64031.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22271.id64031.diff
View Options
Index: etc/Makefile
===================================================================
--- etc/Makefile
+++ etc/Makefile
@@ -57,6 +57,8 @@
${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap
${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt
+ ${INSTALL_SYMLINK} ../var/run/os-release \
+ ${DESTDIR}/etc/os-release
.if ${MK_UNBOUND} != "no"
if [ ! -e ${DESTDIR}/etc/unbound ]; then \
${INSTALL_SYMLINK} -T "package=unbound" \
Index: libexec/rc/rc.d/Makefile
===================================================================
--- libexec/rc/rc.d/Makefile
+++ libexec/rc/rc.d/Makefile
@@ -77,6 +77,7 @@
nsswitch \
ntpdate \
${_opensm} \
+ os-release \
pf \
pflog \
pfsync \
Index: libexec/rc/rc.d/os-release
===================================================================
--- /dev/null
+++ libexec/rc/rc.d/os-release
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: os-release
+# REQUIRE: mountcritremote FILESYSTEMS
+# BEFORE: LOGIN
+
+. /etc/rc.subr
+
+name="osrelease"
+desc="Update /var/run/os-release"
+start_cmd="osrelease_start"
+stop_cmd=":"
+: ${osrelease_file:=/var/run/os-release}
+
+osrelease_start()
+{
+ check_startmsgs && echo -n 'Updating os-release'
+ (
+ VERSION=`freebsd-version -u`
+ VERSION_ID=`echo "$VERSION" | sed "s/^\([0-9\.]*\).*$/\1/"`
+
+ echo "NAME=FreeBSD"
+ echo "VERSION=$VERSION"
+ echo "VERSION_ID=$VERSION_ID"
+ echo "ID=freebsd"
+ echo "ANSI_COLOR=\"0;31\""
+ echo "PRETTY_NAME=\"FreeBSD $VERSION\""
+ echo "CPE_NAME=cpe:/o:freebsd:freebsd:$VERSION_ID"
+ echo "HOME_URL=https://freebsd.org/"
+ echo "BUG_REPORT_URL=https://bugs.freebsd.org"
+ ) > ${osrelease_file}
+ check_startmsgs && echo '.'
+}
+
+load_rc_config $name
+run_rc_command "$1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 8, 11:33 PM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25052514
Default Alt Text
D22271.id64031.diff (1 KB)
Attached To
Mode
D22271: Create /etc/os-release file.
Attached
Detach File
Event Timeline
Log In to Comment