rc.conf runs as part of every normal rc script.I've remembered something about the existence of a firstboot_sentinel which I never fully understood but it is referenced inrc.conf().
In the expanation it mentions early_late_divider which I'm trying to figure out. I want to be able to run something after rc.conf is processed.
rc.conf runs as part of every normal rc script.
Every rc(8) script ends up sourcing /etc/rc.conf.Interesting that you mention this since I just added 'echo "hello" ' into my rc.conf and couldn't understand why hello popped so many times.
It's just a file; /firstboot. Useful if you create images (for VMs for example), the existence of this file can trigger scripts that should be run the first time you boot that image. For example; sysutils/firstboot-freebsd-update to automatically run freebsd-update(8), or expanding the root filesystem with /etc/rc.d/growfs.I've remembered something about the existence of a firstboot_sentinel which I never fully understood but it is referenced inrc.conf().
What I do is auto-login to a shell on the alt-F1 console and have the shell execute things if we are ttyv0 and we just booted according to the uptime command. I think there really should be an autoexec.bat style startup script that just runs things after booting for a dedicated machine. This is way too complicated.I've remembered something about the existence of a firstboot_sentinel which I never fully understood but it is referenced inrc.conf().
In the expanation it mentions early_late_divider which I'm trying to figure out. I want to be able to run something after rc.conf is processed.
Not 100% sure it's somehow implemented or not, but kinda "autoexec.bat" in DOS and "startup.cmd" on OS/2 for FreeBSD should better directly been run by /sbin/init BEFORE IT INVOKES any child processes including /bin/sh for rc scripts only once per kernel is loaded and started up (means, cold start or reboot).I think there really should be an autoexec.bat
Loader.conf is before the kernel. /etc/rc is closer but it launches the configured programs in the rc.d multitasking/background construct that has no direct CLI I/O. Maybe between rc and login, still with all single-user permissions like root.Not 100% sure it's somehow implemented or not, but kinda "autoexec.bat" in DOS and "startup.cmd" on OS/2 for FreeBSD should better directly been run by /sbin/init BEFORE IT INVOKES any child processes including /bin/sh for rc scripts only once per kernel is loaded and started up (means, cold start or reboot).
Part of it can be done via /boot/loader.conf, but it cannot set environment variables for assured-to-be-system-wide. On the other hand, it can set tunables, kenvs, hints and loading (not so large and fundamental for booting) kmods.
There is rc.localWhat I do is auto-login to a shell on the alt-F1 console and have the shell execute things if we are ttyv0 and we just booted according to the uptime command. I think there really should be an autoexec.bat style startup script that just runs things after booting for a dedicated machine. This is way too complicated.
The rc part for programs in /usr/local?There is rc.local