Date: Fri, 24 Dec 2010 04:17:35 +0100 From: Polytropon <freebsd@edvax.de> To: Victor Sudakov <vas@mpeks.tomsk.su> Cc: freebsd-questions@freebsd.org Subject: Re: rc.d and environment variables Message-ID: <20101224041735.d885da93.freebsd@edvax.de> In-Reply-To: <20101224030735.GA16472@admin.sibptus.tomsk.ru> References: <20101223172752.GA8539@admin.sibptus.tomsk.ru> <20101223201249.ea7648aa.freebsd@edvax.de> <20101224030735.GA16472@admin.sibptus.tomsk.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 24 Dec 2010 09:07:35 +0600, Victor Sudakov <vas@mpeks.tomsk.su> wrote: > I have tried putting "setenv KRB5_KTNAME /home/svn/svn.keytab" in > ~svn/.cshrc, it does not help. Evidently the svn user's login shell is > not called when "/usr/local/etc/rc.d/svnserve start" is called. I did already assume something like that. This mechanism relies on some kind of login that causes the shell to be run (usually an interactive shell), which isn't the case here. > Excuse me? What does /etc/rc.local have to do with the rc.subr > framework? Nothing. The /etc/rc.local script is executed along with the system startup. It is considered obsolete (I think), but it should work, and therefore be able to set a system-wide environment variable. This script is not in any relation with the rc.subr framework. > Of course I can abandon the standard /usr/local/etc/rc.d/svnserve > script and write my own one, or start svnserve from /etc/rc.local > (which I will do if I don't find a more graceful way), but it is not > what the question was about. Yes, I fully understand: You need to set an environmental variable that will be picked up later on by the svnserve program (in some way, not neccessarily by accessing a file). That's why I think KRB5_KTNAME=/home/svn/svn.keytab; export KRB5_KTNAME in /etc/rc.local should create the $KRB5_KTNAME environment variable at system startup. Anyway, did you find a way to use some _flags= setting for /etc/rc.conf to be used by svnserve? This would be the method most other programs handle things like configuration flags that are not set by an own config file. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101224041735.d885da93.freebsd>