History log of /src/libexec/rc/rc.d/hostid (Results 1 – 25 of 29)
Revision Date Author Comments
# bf847ea3 25-Nov-2024 Franco Fichtner <franco@opnsense.org>

rc: ignore InsydeH2O UEFI BIOS UUID placeholder for hostid

This caused MAC addresses (e.g. bridge0) to clash on systems
running this particular BIOS.

Reviewed by: imp
Pull Request: https://github.c

rc: ignore InsydeH2O UEFI BIOS UUID placeholder for hostid

This caused MAC addresses (e.g. bridge0) to clash on systems
running this particular BIOS.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1544

show more ...


# f99f0ee1 22-May-2024 Alexander Leidinger <netchild@FreeBSD.org>

rc.d: add a service jails config to all base system services

This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
servic

rc.d: add a service jails config to all base system services

This gives more permissions to services (e.g. network access to
services which require this) when they are started as an automatic
service jail.

The sshd patch is important for the sshd-related functionality as
described in the man-page in the service jails part.

The location of the added env vars is supposed to allow overriding them
in rc.conf, and to hard-disable the use of svcj for some parts where it
doesn't make sense or will not work.

Only a subset of all of the services are fully tested (I'm running this
since more than a year with various services started as service jails).
The untested parts should be most of the time ok, in some edge-cases
more permissions are needed inside the service jail.
Differential Revision: https://reviews.freebsd.org/D40371

show more ...


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 862aab62 09-Mar-2023 Tijl Coosemans <tijl@FreeBSD.org>

hostid: Generate random UUID by default

This way MAC addresses are no longer exposed.

Discussed with: bapt
MFC after: 3 days


# cc495d3b 12-Aug-2022 Colin Percival <cperciva@FreeBSD.org>

rc.d/hostid: Skip warning on systems w/o smbios

The first time a FreeBSD system boots, it obtains a hostuuid and hostid
from the smbios.system.uuid kernel environment variable. If this value
is fou

rc.d/hostid: Skip warning on systems w/o smbios

The first time a FreeBSD system boots, it obtains a hostuuid and hostid
from the smbios.system.uuid kernel environment variable. If this value
is found to be invalid, a warning is printed and the boot pauses for
two seconds to give the user a chance to read it.

If the FreeBSD kernel is launched directly in a virtual machine rather
than via the FreeBSD boot loader, the smbios.system.uuid environment
variable might not be set; in this case, there's no need to alert the
user and delay the boot process since the lack of a "hardware" uuid is
entirely expected.

Distinguish between the cases of "invalid UUID" and "no UUID", warning
and delaying the boot only in the former case. In both cases we still
generate a random UUID in software.

Reviewed by: delphij
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D36185

show more ...


# 11bd40d0 30-May-2022 наб <nabijaczleweli@nabijaczleweli.xyz>

rc.d/hostid: remove useless cat

We've already read it and validated it ‒ re-reading is wasteful

PR: 264376


# 325ebf37 13-Mar-2022 Jose Luis Duran <jlduran@gmail.com>

Introduce startmsg and use it in rc scripts

startmsg is a new rc.subr(8) function function to be used instead of
echo(1) when for boot messages. It replaces the often forgotten

check_startmsgs

Introduce startmsg and use it in rc scripts

startmsg is a new rc.subr(8) function function to be used instead of
echo(1) when for boot messages. It replaces the often forgotten

check_startmsgs && echo ...

with

startmsg ...

No functional change intended.

I adjusted the commit message and did some final clean-ups of the patch
before committing.

PR: 255207
Reported by: Jose Luis Duran <jlduran@gmail.com>
Reviewed by: imp, 0mp
Approved by: imp (src)
Differential Revision: https://reviews.freebsd.org/D34514

show more ...


# 0696600c 17-Oct-2018 Bjoern A. Zeeb <bz@FreeBSD.org>

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update bec

Move the rc framework out of sbin/init into libexec/rc.

The reasons for this are forward looking to pkgbase:
* /sbin/init is a special binary; try not to replace it with
every package update because an rc script was touched.
(a follow-up commit will make init its own package)
* having rc in its own place will allow more easy replacement
of the rc framework with alternatives, such as openrc.

Discussed with: brd (during BSDCam), kmoore
Requested by: cem, bz
PR: 231522
Approved by: re (gjb)

show more ...


# 1135e97b 28-Jul-2018 Brad Davis <brd@FreeBSD.org>

Move rc startup scripts from etc/ to sbin/init/

This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by: will (mentor)
Differential Revision:

Move rc startup scripts from etc/ to sbin/init/

This keeps most startup scripts as CONFS per discussion on src-committers from
back during BSDCan.

Approved by: will (mentor)
Differential Revision: https://reviews.freebsd.org/D16466

show more ...


# b6f7731d 10-May-2018 Xin LI <delphij@FreeBSD.org>

Remove "All rights reserved" from my files.

See r333391 for the rationale.

MFC after: 1 week


# 6c1a5e83 23-Apr-2016 Lars Engels <lme@FreeBSD.org>

- Add descriptions to most of the rc scripts. Those are mostly taken from their
daemon's manpage and probably improved.
- Consistently use "filesystem" not "file system".

Approved by: bapt, brueff

- Add descriptions to most of the rc scripts. Those are mostly taken from their
daemon's manpage and probably improved.
- Consistently use "filesystem" not "file system".

Approved by: bapt, brueffer
Differential Revision: D452

show more ...


# 1d79f302 11-May-2015 Xin LI <delphij@FreeBSD.org>

Revert r282672.

tr is in /usr and not available at the time hostid is run (must be run
before FILESYSTEMS).

Reported by: def


# 2547b459 08-May-2015 Xin LI <delphij@FreeBSD.org>

Always convert uuid to lower case.

MFC after: 2 weeks


# 3f6cf39f 27-Apr-2015 Xin LI <delphij@FreeBSD.org>

Generate new UUID if system UUID is known bad or malformed and add a two
seconds sleep if we found the system UUID be invalid.

Obtained from: FreeNAS
MFC after: 2 weeks


# 86fdaae5 30-Mar-2011 Ed Maste <emaste@FreeBSD.org>

Replace ${SYSCTL_W} with ${SYSCTL} in rc.d scripts, as they are identical.
This is a further clean up after r202988.

SYSCTL_W is still initialized in rc.subr as some ports may still use it.


# 2822c33f 19-May-2010 Doug Barton <dougb@FreeBSD.org>

This change does the following for the scripts that run up through
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor

This change does the following for the scripts that run up through
FILESYSTEMS (the default early_late_divider):
1. Move sysctl to run first
2. Move as many BEFOREs to REQUIREs as possible.
3. Minor effect, move hostid_save from right before mdconfig to right
after.

A lot of the early scripts make use of sysctl one way or another so
running this first makes a lot of sense given that system-critical
values are often placed in sysctl.conf.

My original purpose for working on this was that while doing some
debugging on other stuff I noticed that the order of execution was
different in the first pass through the early scripts and the second.
In practice that doesn't matter because the scripts are not executed the
second time. However this _can_ result in problems if the difference in
the rcorder moves a script from the late section to the early section in
the second pass (which would mean the script would not get executed).
So, I wanted to make the order of execution of the scripts in the early
section more deterministic.

In the course of debugging the ordering problems I noticed that moving
the BEFOREs to REQUIREs prevented the changes in order from the first
pass to the second pass without having to make any substantial changes.
(Of course it's no secret that I think BEFORE should be avoided as much
as possible, but this is a good example of why.)

Reviewed by: silence on freebsd-rc@
MFC after: 8.1-RELEASE

show more ...


# 70d4ef1e 10-Oct-2009 Doug Barton <dougb@FreeBSD.org>

In regards to the "Starting foo:" type messages at boot time, create and
employ a more generic solution, and use it in the individual rc.d scripts
that also have an $rc_quiet test:

1. Add check_star

In regards to the "Starting foo:" type messages at boot time, create and
employ a more generic solution, and use it in the individual rc.d scripts
that also have an $rc_quiet test:

1. Add check_startmsgs() to rc.subr.
2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute
variations of [ -z "$rc_quiet" ] with check_startmsgs
3. In savecore add a trailing '.' to the end of the message to make it
more consistent with other scripts.
4. In newsyslog remove a : before the terminal '.' since we do not expect
there to be anything printed out in between to make it more consistent.
5. In the following scripts change "quotes" to 'quotes' where no variables
exist in the message: savecore pf newsyslog
6. In the following scripts substitute if/then/fi for the simpler (and
more consistent) check_startmsgs &&: faith stf
7. In the following scripts separate the "Starting foo:" from the terminal
'.' to make them more consistent: moused hostname pf
8. In nfsclient move the message to its own line to avoid a style bug
9. In pf rc_quiet does not apply to the _stop method, so remove the
test there.
10. In motd add 'quotes' around the terminal '.' for consistency

show more ...


# d5d7e76d 29-Jul-2009 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Currently there is a problem with fscking UFS file systems created on
top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The
latter makes ZVOLs to appear in /dev/. In such case rc.d/fs

Currently there is a problem with fscking UFS file systems created on
top of ZVOLs. The problem is that rc.d/fsck runs before rc.d/zfs. The
latter makes ZVOLs to appear in /dev/. In such case rc.d/fsck cannot
find devfs entry and aborts. We cannot simply move rc.d/zfs before
rc.d/fsck, because we first want kern.hostid to be configured (by
rc.d/hostid). If we won't wait (hostid will be 0) we can reuse disks
which are in use by different systems (eg. in SAN/NAS environment).
We also cannot move rc.d/hostid before rc.d/fsck, because rc.d/hostid on
first system start stores generated kern.hostuuid in /etc/hostid file,
so it needs root file system to be mounted read-write.

The fix is to split rc.d/hostid so that rc.d/hostid (which will now run
before rc.d/fsck) only generates hostid and sets up sysctls, but doesn't
touch root file system and rc.d/hostid_save (which is run after
rc.d/root) and only creates /etc/hostid file.

With that in place, we can move ZVOL initialization to dedicated
rc.d/zvol script which runs before rc.d/fsck.

PR: conf/120194
Reported by: James Snow <snow@teardrop.org>
Reviewed by: brooks
Approved by: re (kib)
MFC after: 2 weeks

show more ...


# 2b985169 16-Jul-2008 Doug Barton <dougb@FreeBSD.org>

As previously discussed, add the svn:executable property to all scripts


# 94789e5c 23-Jun-2008 Mike Makonnen <mtm@FreeBSD.org>

Move a lot of diagnostic output behind $rc_quiet in scripts that
implement their own start command.


# 68abe9bd 06-May-2008 Mike Makonnen <mtm@FreeBSD.org>

Specify the full path to the md5(1) binary so the script will
still work even if it's not in the shell's path.

PR: conf/122215
MFC after: 1 week


# e5791835 24-Jan-2008 Ruslan Ermilov <ru@FreeBSD.org>

Shorter equivalent of the command.


# 0d5b72b3 22-May-2007 Ralf S. Engelschall <rse@FreeBSD.org>

backout filter of Nil UUID as the boot loader code already filters out Nil UUIDs (see src/sys/boot/i386/libi386/smbios.c:smbios_setuuid for details)


# dff50af9 22-May-2007 Ralf S. Engelschall <rse@FreeBSD.org>

Remove the ugly csh(1) based UUID lower-case translation hack from
/etc/rc.d/hostid now that we switched the origin of the UUID (variable
smbios.system.uuid as provided by the i386 BIOS code) to alre

Remove the ugly csh(1) based UUID lower-case translation hack from
/etc/rc.d/hostid now that we switched the origin of the UUID (variable
smbios.system.uuid as provided by the i386 BIOS code) to already provide
a standard conforming lower-case UUID text representation.

show more ...


# e3e421ba 21-May-2007 Ralf S. Engelschall <rse@FreeBSD.org>

Cleanup style by consistently using braces around variable expansion and
apply an addition from Andrew Thompson <thompsa> for filtering out the
special "Nil" UUID (all zeros) which would be a useless

Cleanup style by consistently using braces around variable expansion and
apply an addition from Andrew Thompson <thompsa> for filtering out the
special "Nil" UUID (all zeros) which would be a useless host UUID.

show more ...


12