Date: Fri, 6 Nov 2015 10:29:46 -0500 From: Thomas Cort <linuxgeek@gmail.com> To: freebsd-questions@freebsd.org Subject: programmatically editing /etc/login.conf Message-ID: <CACn-oZgRdmROb84_4Ww7ummBrn8GEQ413V14vCQES-aHa%2B7aUQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I'd like to have a script be able to add/modify/remove environment variables that are set systemwide for all users (interactive and non-interactive logins). Manually editing /etc/login.conf and running cap_mkdb works for setting the environment variables, but how can I automate the editing? Are there any tools where I can say "add FOO=bar to setenv for default"? Due to the file format, it seems like a tough job for sed/awk. Or is there an alternative way of setting system wide environment variables? Thanks, Thomas
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACn-oZgRdmROb84_4Ww7ummBrn8GEQ413V14vCQES-aHa%2B7aUQ>