From owner-freebsd-questions@FreeBSD.ORG Fri Dec 24 03:17:39 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 137CB1065735 for ; Fri, 24 Dec 2010 03:17:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 697A98FC0C for ; Fri, 24 Dec 2010 03:17:38 +0000 (UTC) Received: from r55.edvax.de (port-92-195-37-207.dynamic.qsc.de [92.195.37.207]) by mx02.qsc.de (Postfix) with ESMTP id C76FB1E58F; Fri, 24 Dec 2010 04:17:36 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id oBO3HZZ3005212; Fri, 24 Dec 2010 04:17:35 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Fri, 24 Dec 2010 04:17:35 +0100 From: Polytropon To: Victor Sudakov 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> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: rc.d and environment variables X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2010 03:17:39 -0000 On Fri, 24 Dec 2010 09:07:35 +0600, Victor Sudakov 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, ...