From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EADlH-0008PI-Fw for garchives@archives.gentoo.org; Tue, 30 Aug 2005 21:35:19 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7ULWSFr017792; Tue, 30 Aug 2005 21:32:28 GMT Received: from anchor-post-33.mail.demon.net (anchor-post-33.mail.demon.net [194.217.242.91]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7ULUlYF026739 for ; Tue, 30 Aug 2005 21:30:47 GMT Received: from rsm.demon.co.uk ([80.177.111.50] helo=mail.ubernet) by anchor-post-33.mail.demon.net with esmtp (Exim 4.42) id 1EADiz-000MOC-Ad for gentoo-dev@lists.gentoo.org; Tue, 30 Aug 2005 21:32:57 +0000 Received: from uberpc.ubernet (uberpc.ubernet [192.168.2.10]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.ubernet (Postfix) with ESMTP id 122452B4022 for ; Tue, 30 Aug 2005 22:32:57 +0100 (BST) Subject: Re: [gentoo-dev] init.d-scripts don't see stuff from /etc/profile.env From: Roy Marples To: gentoo-dev@lists.gentoo.org In-Reply-To: <200508251201.43416.pauldv@gentoo.org> References: <20050824082743.GA104763@lion.gg3.net> <1124877882.22517.2.camel@uberlaptop.ubernet> <200508251201.43416.pauldv@gentoo.org> Content-Type: text/plain Date: Tue, 30 Aug 2005 22:32:56 +0100 Message-Id: <1125437576.13588.8.camel@uberpc.ubernet> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-Archives-Salt: ff7446b0-914f-4334-a4d3-c556cbe5afd3 X-Archives-Hash: c7bf768e1d4a6751a6b56b84970a8f56 On Thu, 2005-08-25 at 12:01 +0200, Paul de Vrieze wrote: > On Wednesday 24 August 2005 12:04, Roy Marples wrote: > > > > Um, that's kinda like behaviour by design unless anyone can tell me > > otherwise. > > > > /etc/env.d/* just set shell variables, so if you change one then you > > need to > > > > env-update > > source /etc/profile > > /etc/init.d/thisdaemon restart > > > > To refresh the daemon that needs the vars > > Perhaps the init script loader should be changed such that the environment > variables from the shell calling the script are ignored, and an > environment equal to that when being called by init is used. > > Paul > I've been looking into this and the only easy solution I can find is to move /sbin/runscript.sh to say /lib/rcscripts/sh, change it to source /etc/profile and then create a new /sbin/runscript.sh like so #!/bin/sh /bin/env -i \ CONSOLETYPE="${CONSOLETYPE}" \ IN_BACKGROUND="${IN_BACKGROUND}" \ IN_HOTPLUG="${IN_HOTPLUG}" \ /lib/rcscripts/sh/runscript.sh $* Right away we can see that we actually do need some to keep some env vars and the list would be constantly updated. There's also nothing to stop the user from setting them and then running a script which kind of defeats the purpose here anyway. Personally I'm against this.I'd like to know what Azarah and Vapier think of this though. Others too! Thanks Roy -- gentoo-dev@gentoo.org mailing list