rc.conf

Status
Not open for further replies.

shewless

Dabbler
Joined
Oct 10, 2011
Messages
24
Hello,

I need to add a line to rc.conf on FreeNAS 8.0.1.

Is there a way to do this from the web interface?

If I do it from the command line, will my changes be "persistent" (if I backup my FreeNAS config will it incorporate these changes)?

Thank you,
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
You'll have to add the line through the command line to /etc/rc.conf. To make it survive reboots, you'll have to add it to /conf/base/etc/rc.conf as well. There is no way to make it persistent across upgrades; the change will not be saved in the FreeNAS config that you can backup.
 

shewless

Dabbler
Joined
Oct 10, 2011
Messages
24
You'll have to add the line through the command line to /etc/rc.conf. To make it survive reboots, you'll have to add it to /conf/base/etc/rc.conf as well. There is no way to make it persistent across upgrades; the change will not be saved in the FreeNAS config that you can backup.

Ah thanks! Is there anyway to make it saved in the FreeNAS config? Do I have to hack some database entry?? :D
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Probably not. I think the rc.conf gets copied from /conf/base/etc to /etc (which is a RAM disk) during boot without any modifications from the database. Files that are modified during boot generally have a corresponding /etc/rc.d/ix-yyyyy script where yyyyy is the service or config file that the script is responsble for creating.
 

shewless

Dabbler
Joined
Oct 10, 2011
Messages
24
I tried looking for a spot to squeeze this in the database but I could not find a spot. I ended up doing "mount -ur /" and then editing /conf/base/etc.

Thanks for the help.
 

memel.parduin

Dabbler
Joined
Feb 13, 2012
Messages
42

shewless

Dabbler
Joined
Oct 10, 2011
Messages
24
Okay. I've updated to FreeNAS 8.2-RELEASE-p1.

I see you can add tunables and sysctls... Is there a spot to add rc.conf values? That would be handy.

I tried my trick of "mount -uw /" and made my changes there.. but it's annoying to have to keep doing that every upgrade.

Since I created my zfs volume ages ago before I used FreeNAS I don't have swap space on each drive.. so I need to use a swapfile. I need to add "swapfile="/mnt/tank/swap0
 
Status
Not open for further replies.
Top