How to rerun /etc/rc.conf

I've edited rc.conf.
How to rerun /etc/rc.conf in order for the new services to be started.
[Offcourse I can service X onestart but that's not the idea, it's to test for syntactical errors in rc.conf ]
 
rc.conf isn't run, it's sourced, several times, by scripts in /etc/rc.d (and /usr/local/etc/rc.d/). If you want to start a service just start it.
I can service X onestart
service <servicename> onestart is for starting services that haven't been enabled in rc.conf.


it's to test for syntactical errors in rc.conf
There's nothing "standard" that could test it. But it's just a shell script with variables. So running sh -x /etc/rc.conf shouldn't produce errors.
 
I'm not sure about this: sysrc -c.

Related:
 
It seems with mariadb, mysql_server_enable="YES" does not start. I've added "service mysql-server onestart" to rc.conf, and that works.
The second sentence seems like the wrong thing to do.
I would double check the exact syntax/form of the variable. You should be able to look in the actual script file to find out what it's looking for. The script "mysql-server" most likely exists in /usr/local/etc/rc.d not in /etc/rc.d. Look for the line that starts with "rcvar"
 
Note mysql-server has minus in the name in /usr/local/etc/rc.d and underscore in rc.conf. Maybe thats why mariadb does not get started.
 
Back
Top