15.0 - rc.conf ignores a setting

0 views
Skip to first unread message

infoomatic

unread,
Dec 6, 2025, 6:54:10 PM (12 days ago) Dec 6
to freebsd-...@freebsd.org
Hi,

I have a pkgbase 15.0 which ignores the new setting
precious_machine="YES" in rc.conf. It does not happen on non-pkgbase
15.0 systems. What could be the problem?

Regards,

Robert

Steve Rikli

unread,
Dec 6, 2025, 7:49:40 PM (12 days ago) Dec 6
to infoomatic, freebsd-...@freebsd.org
On Sun, Dec 07, 2025 at 12:53:44AM +0100, infoomatic wrote:
> I have a pkgbase 15.0 which ignores the new setting precious_machine="YES"
> in rc.conf. It does not happen on non-pkgbase 15.0 systems. What could be
> the problem?

What command and flags are you using to try shutdown the system?

Does the behavior change if you manually create the /var/run/noshutdown
file?

E.g. when I 'touch /var/run/noshutdown' on a 15.0 test VM it properly
prevents shutdown with the message "Shutdown cannot be done,
/var/run/noshutdown is present".

I'm guessing your system's shutdown binary doesn't have the noshutdown
function somehow -- is your system from an upgrade or a fresh install?

A quick way to check the binary itself:

$ strings /sbin/shutdown | grep noshutdown
Shutdown cannot be done, /var/run/noshutdown is present
/var/run/noshutdown

If you don't see that sort of output, I think that shows why you have
the problem, but not necessarily how it got that way.

Cheers,
sr.

infoomatic

unread,
Dec 7, 2025, 4:02:18 PM (11 days ago) Dec 7
to ques...@freebsd.org
I have verified that manually touching that file works. However, at boot
time it seems like /var/run/noshutdown is not being created.

I have FreeBSD-set-kernels and FreeBSD-set-minimal-jail installed.

However, I installed FreeBSD-set-base, which installed the packages in
the list below [1]. Now it works, any ideas what package could have been
missing?

Thanks and regards,

Robert


[1]
FreeBSD-acpi: 15.0 [FreeBSD-base]
FreeBSD-apm: 15.0 [FreeBSD-base]
FreeBSD-atf-dev: 15.0 [FreeBSD-base]
FreeBSD-audit-dev: 15.0 [FreeBSD-base]
FreeBSD-autofs: 15.0 [FreeBSD-base]
FreeBSD-bhyve: 15.0 [FreeBSD-base]
FreeBSD-blocklist-dev: 15.0 [FreeBSD-base]
FreeBSD-bluetooth: 15.0 [FreeBSD-base]
FreeBSD-bluetooth-dev: 15.0 [FreeBSD-base]
FreeBSD-bluetooth-lib: 15.0 [FreeBSD-base]
FreeBSD-bootloader-dev: 15.0 [FreeBSD-base]
FreeBSD-bsnmp-dev: 15.0 [FreeBSD-base]
FreeBSD-bzip2-dev: 15.0 [FreeBSD-base]
FreeBSD-clang: 15.0 [FreeBSD-base]
FreeBSD-clang-dev: 15.0 [FreeBSD-base]
FreeBSD-clibs-dev: 15.0 [FreeBSD-base]
FreeBSD-clibs-lib32: 15.0 [FreeBSD-base]
FreeBSD-ctf-dev: 15.0 [FreeBSD-base]
FreeBSD-ctl: 15.0 [FreeBSD-base]
FreeBSD-cxgbe-tools: 15.0 [FreeBSD-base]
FreeBSD-devmatch-dev: 15.0 [FreeBSD-base]
FreeBSD-dtrace: 15.0 [FreeBSD-base]
FreeBSD-dtrace-dev: 15.0 [FreeBSD-base]
FreeBSD-efi-tools-dev: 15.0 [FreeBSD-base]
FreeBSD-examples: 15.0 [FreeBSD-base]
FreeBSD-fetch-dev: 15.0 [FreeBSD-base]
FreeBSD-firmware-iwm: 15.0 [FreeBSD-base]
FreeBSD-flua-dev: 15.0 [FreeBSD-base]
FreeBSD-ftp: 15.0 [FreeBSD-base]
FreeBSD-games: 15.0 [FreeBSD-base]
FreeBSD-ggate: 15.0 [FreeBSD-base]
FreeBSD-gssd: 15.0 [FreeBSD-base]
FreeBSD-hast: 15.0 [FreeBSD-base]
FreeBSD-hostapd: 15.0 [FreeBSD-base]
FreeBSD-hyperv-tools: 15.0 [FreeBSD-base]
FreeBSD-ipf: 15.0 [FreeBSD-base]
FreeBSD-iscsi: 15.0 [FreeBSD-base]
FreeBSD-kerberos-dev: 15.0 [FreeBSD-base]
FreeBSD-lib9p-dev: 15.0 [FreeBSD-base]
FreeBSD-libarchive-dev: 15.0 [FreeBSD-base]
FreeBSD-libbegemot-dev: 15.0 [FreeBSD-base]
FreeBSD-libblocksruntime-dev: 15.0 [FreeBSD-base]
FreeBSD-libbsdstat-dev: 15.0 [FreeBSD-base]
FreeBSD-libcasper-dev: 15.0 [FreeBSD-base]
FreeBSD-libcompat-dev: 15.0 [FreeBSD-base]
FreeBSD-libcompiler_rt-dev: 15.0 [FreeBSD-base]
FreeBSD-libcuse-dev: 15.0 [FreeBSD-base]
FreeBSD-libdwarf-dev: 15.0 [FreeBSD-base]
FreeBSD-libevent1-dev: 15.0 [FreeBSD-base]
FreeBSD-libexecinfo-dev: 15.0 [FreeBSD-base]
FreeBSD-libipt-dev: 15.0 [FreeBSD-base]
FreeBSD-libldns-dev: 15.0 [FreeBSD-base]
FreeBSD-libmagic-dev: 15.0 [FreeBSD-base]
FreeBSD-libmilter-dev: 15.0 [FreeBSD-base]
FreeBSD-libpathconv-dev: 15.0 [FreeBSD-base]
FreeBSD-librpcsec_gss-dev: 15.0 [FreeBSD-base]
FreeBSD-librss-dev: 15.0 [FreeBSD-base]
FreeBSD-libsqlite3-dev: 15.0 [FreeBSD-base]
FreeBSD-libthread_db-dev: 15.0 [FreeBSD-base]
FreeBSD-libucl-dev: 15.0 [FreeBSD-base]
FreeBSD-libvgl-dev: 15.0 [FreeBSD-base]
FreeBSD-libvmmapi: 15.0 [FreeBSD-base]
FreeBSD-libvmmapi-dev: 15.0 [FreeBSD-base]
FreeBSD-libyaml-dev: 15.0 [FreeBSD-base]
FreeBSD-lldb-dev: 15.0 [FreeBSD-base]
FreeBSD-local-unbound: 15.0 [FreeBSD-base]
FreeBSD-local-unbound-dev: 15.0 [FreeBSD-base]
FreeBSD-lp: 15.0 [FreeBSD-base]
FreeBSD-mlx-tools: 15.0 [FreeBSD-base]
FreeBSD-natd-dev: 15.0 [FreeBSD-base]
FreeBSD-ncurses-dev: 15.0 [FreeBSD-base]
FreeBSD-netmap-dev: 15.0 [FreeBSD-base]
FreeBSD-nfs: 15.0 [FreeBSD-base]
FreeBSD-nuageinit: 15.0 [FreeBSD-base]
FreeBSD-nvme-tools: 15.0 [FreeBSD-base]
FreeBSD-openssl-dev: 15.0 [FreeBSD-base]
FreeBSD-pf: 15.0 [FreeBSD-base]
FreeBSD-pf-dev: 15.0 [FreeBSD-base]
FreeBSD-pmc-dev: 15.0 [FreeBSD-base]
FreeBSD-ppp: 15.0 [FreeBSD-base]
FreeBSD-rcmds: 15.0 [FreeBSD-base]
FreeBSD-rdma: 15.0 [FreeBSD-base]
FreeBSD-rescue: 15.0 [FreeBSD-base]
FreeBSD-rip: 15.0 [FreeBSD-base]
FreeBSD-runtime-dev: 15.0 [FreeBSD-base]
FreeBSD-sendmail: 15.0 [FreeBSD-base]
FreeBSD-set-base: 15.0 [FreeBSD-base]
FreeBSD-set-devel: 15.0 [FreeBSD-base]
FreeBSD-set-minimal: 15.0 [FreeBSD-base]
FreeBSD-set-optional: 15.0 [FreeBSD-base]
FreeBSD-smbutils: 15.0 [FreeBSD-base]
FreeBSD-smbutils-dev: 15.0 [FreeBSD-base]
FreeBSD-sound: 15.0 [FreeBSD-base]
FreeBSD-sound-dev: 15.0 [FreeBSD-base]
FreeBSD-ssh-dev: 15.0 [FreeBSD-base]
FreeBSD-tcpd-dev: 15.0 [FreeBSD-base]
FreeBSD-telnet: 15.0 [FreeBSD-base]
FreeBSD-toolchain-dev: 15.0 [FreeBSD-base]
FreeBSD-ufs-dev: 15.0 [FreeBSD-base]
FreeBSD-utilities-dev: 15.0 [FreeBSD-base]
FreeBSD-wpa: 15.0 [FreeBSD-base]
FreeBSD-xz-dev: 15.0 [FreeBSD-base]
FreeBSD-yp: 15.0 [FreeBSD-base]
FreeBSD-zfs: 15.0 [FreeBSD-base]
FreeBSD-zfs-dev: 15.0 [FreeBSD-base]
FreeBSD-zlib-dev: 15.0 [FreeBSD-base]

Dag-Erling Smørgrav

unread,
Dec 7, 2025, 4:50:59 PM (11 days ago) Dec 7
to infoomatic, ques...@freebsd.org
infoomatic <infoo...@gmx.at> writes:
> I have verified that manually touching that file works. However, at
> boot time it seems like /var/run/noshutdown is not being created.
>
> I have FreeBSD-set-kernels and FreeBSD-set-minimal-jail installed.
>
> However, I installed FreeBSD-set-base, which installed the packages in
> the list below [1]. Now it works, any ideas what package could have
> been missing?

FreeBSD-rc is missing. It is required by FreeBSD-set-minimal which is
required by FreeBSD-set-base, so it should be there, but it is not in
your list. I'm not sure how you managed to boot without it, but never
mind that. Please try `pkg check -ad`.

DES
--
Dag-Erling Smørgrav - d...@FreeBSD.org

infoomatic

unread,
Dec 7, 2025, 6:57:48 PM (11 days ago) Dec 7
to Dag-Erling Smørgrav, ques...@freebsd.org
On 07.12.25 22:50, Dag-Erling Smørgrav wrote:
> FreeBSD-rc is missing. It is required by FreeBSD-set-minimal which is
> required by FreeBSD-set-base, so it should be there, but it is not in
> your list. I'm not sure how you managed to boot without it, but never
> mind that. Please try `pkg check -ad`.

Thanks for the response. 'pkg check -ad' prints 'Checking all packages:
100%'

I uninstalled FreeBSD-set-base plus the sets that were pulled in and did
autoremove the packages. Now I have FreeBSD-set-kernels,
FreeBSD-set-minimal, FreeBSD-set-minimal-jail and also the package
FreeBSD-rc is installed. However, the setting is ignored again at
startup - /var/run/noshutdown is not being created.

Regards,
Robert


Dag-Erling Smørgrav

unread,
Dec 7, 2025, 7:08:08 PM (11 days ago) Dec 7
to infoomatic, ques...@freebsd.org, k...@freebsd.org
infoomatic <infoo...@gmx.at> writes:
> I uninstalled FreeBSD-set-base plus the sets that were pulled in and
> did autoremove the packages. Now I have FreeBSD-set-kernels,
> FreeBSD-set-minimal, FreeBSD-set-minimal-jail and also the package
> FreeBSD-rc is installed.

I didn't ask you to do any of this. Just confirming that you already
had FreeBSD-rc (despite it being missing fromt the list that you posted
earlier) would have sufficed.

> However, the setting is ignored again at startup - /var/run/noshutdown
> is not being created.

I took a closer look at the script that creates it. Turns out, it can't
possibly work as written. I wonder if it was ever tested?

% rcorder /etc/rc.d/* |& grep -A1 noshutdown
/etc/rc.d/noshutdown
/etc/rc.d/cleanvar

Take a wild guess what the cleanvar script does...

Dag-Erling Smørgrav

unread,
Dec 7, 2025, 9:09:54 PM (11 days ago) Dec 7
to Konstantin Belousov, infoomatic, ques...@freebsd.org
Konstantin Belousov <kost...@gmail.com> writes:
> I think that noshutdown is run twice, once before early_late_divider, and
> once after. cleanvar does the same, but it protects against deleting
> the files in /var/run on the second run.

We don't run rc scripts twice. We call run_init_scripts twice, but it
keeps track of which scripts it's already run and doesn't run them again
the second time.

Graham Perrin

unread,
Dec 15, 2025, 2:53:23 AM (4 days ago) Dec 15
to FreeBSD questions
On 07/12/2025 21:01, infoomatic wrote:

… I have FreeBSD-set-kernels and FreeBSD-set-minimal-jail installed. …


On 07/12/2025 23:57, infoomatic wrote:

… I uninstalled FreeBSD-set-base plus the sets that were pulled in and did autoremove …


Now, please: 

pkg iinfo FreeBSD-console-tools


Is the FreeBSD-console-tools package still installed?

Reply all
Reply to author
Forward
0 new messages