[Bug 267846] rc.conf: var_run_enable="YES" without any effect on tmpfs:/var/run

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 19 Nov 2022 07:35:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267846

--- Comment #1 from Graham Perrin <grahamperrin@freebsd.org> ---
<https://github.com/freebsd/freebsd-src/commit/27b9777c28b4e9474bdc500c28d04feec48fbb84#diff-dab5ea80ff9507a517463fe9fc7751aa68fb7cd1709bc225b66e1c37f1f8c8feR19-R22> 
under # Set defaults: 

> : ${var_run_autosave:="YES"}


----


<https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5&manpath=FreeBSD+14.0-current>
does describe the boolean option: 

    var_run_autosave

– without stating a default. There's the description of behaviour when set to
"NO", so readers _might_ assume that _without_ setting the boolean, it is
effectively YES. 


----


Here, _without_ using tmpfs: 


root@mowa219-gjp4-8570p-freebsd:~ # mount | grep run
root@mowa219-gjp4-8570p-freebsd:~ # sysrc var_run_autosave
var_run_autosave: NO
root@mowa219-gjp4-8570p-freebsd:~ # sysrc var_run_enable
var_run_enable: NO
root@mowa219-gjp4-8570p-freebsd:~ # sysrc var_run_enable="YES"
var_run_enable: NO -> YES
root@mowa219-gjp4-8570p-freebsd:~ # sysrc var_run_autosave
var_run_autosave: NO
root@mowa219-gjp4-8570p-freebsd:~ # grep var_run /etc/rc.conf
var_run_enable="YES"
root@mowa219-gjp4-8570p-freebsd:~ # sysrc var_run_enable="NO"
var_run_enable: YES -> NO
root@mowa219-gjp4-8570p-freebsd:~ # date ; uname -aKU
Sat Nov 19 07:22:08 GMT 2022
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #25
main-n259004-2c10be9e06d4: Thu Nov  3 00:14:52 GMT 2022    
grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
amd64 1400073 1400073
root@mowa219-gjp4-8570p-freebsd:~ #

-- 
You are receiving this mail because:
You are the assignee for the bug.