aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc/rc.conf
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2023-02-15 20:09:51 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2023-03-09 09:31:55 +0000
commitecad3f5c4d922f93ceba455f8bff1c54e1ed4174 (patch)
treee6a8165e6e5f587e0e9f6511d7d2f82e0752edff /libexec/rc/rc.conf
parent862aab6281a5e6b5dad89761ac17ca2a0e83ab32 (diff)
downloadsrc-ecad3f5c4d922f93ceba455f8bff1c54e1ed4174.tar.gz
src-ecad3f5c4d922f93ceba455f8bff1c54e1ed4174.zip
rc.d: Generate machine-id from hostid_save
rc.d/hostid_save saves a UUID generated by rc.d/hostid in /etc/hostid. Store the same UUID, without hyphens, in /etc/machine-id. The hypĥens are removed with a shell function because hostid_save runs before file systems are mounted so other tools may not be available yet. This eliminates some duplication between hostid and machine-id and for virtual machines machine-id now contains the UUID configured in the hypervisor like it does on Linux. Reviewed by: delphij Discussed with: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38811
Diffstat (limited to 'libexec/rc/rc.conf')
-rw-r--r--libexec/rc/rc.conf4
1 files changed, 1 insertions, 3 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 8a5f69dbef12..932fd2ace778 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -138,6 +138,7 @@ hostname="" # Set this!
hostid_enable="YES" # Set host UUID.
hostid_file="/etc/hostid" # File with hostuuid.
hostid_uuidgen_flags="-r" # Flags to uuidgen.
+machine_id_file="/etc/machine-id" # File with machine-id.
nisdomainname="NO" # Set to NIS domain if using NIS (or NO).
dhclient_program="/sbin/dhclient" # Path to dhcp client program.
dhclient_flags="" # Extra flags to pass to dhcp client.
@@ -696,9 +697,6 @@ harvest_mask="511" # 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.
-machine_id_enable="YES" # Create /var/db/machine-id on boot if missing (or NO).
-machine_id_file="/var/db/machine-id" # File to update for machine-id.
-machine_id_perms="444" # Default permissions for machine-id file.
dmesg_enable="YES" # Save dmesg(8) to /var/run/dmesg.boot
watchdogd_enable="NO" # Start the software watchdog daemon
watchdogd_flags="" # Flags to watchdogd (if enabled)