public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Roy Marples <uberlord@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev]  init.d-scripts don't see stuff from /etc/profile.env
Date: Tue, 30 Aug 2005 22:32:56 +0100	[thread overview]
Message-ID: <1125437576.13588.8.camel@uberpc.ubernet> (raw)
In-Reply-To: <200508251201.43416.pauldv@gentoo.org>

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



  parent reply	other threads:[~2005-08-30 21:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-23 14:33 [gentoo-dev] init.d-scripts don't see stuff from /etc/profile.env Sven Köhler
2005-08-24  7:26 ` Roy Marples
2005-08-24  8:27   ` Georgi Georgiev
2005-08-24 10:04     ` Roy Marples
2005-08-24 11:35       ` Georgi Georgiev
2005-08-24 13:20         ` [gentoo-dev] " Sven Köhler
2005-08-25 10:01       ` [gentoo-dev] " Paul de Vrieze
2005-08-26 11:58         ` [gentoo-dev] " Sven Köhler
2005-08-30 21:32         ` Roy Marples [this message]
2005-08-30 22:06           ` [gentoo-dev] " Roy Marples
2005-08-30 22:36             ` Francesco R
2005-08-30 22:40           ` [gentoo-dev] " Sven Köhler
2005-08-30 23:09           ` [gentoo-dev] " Mike Frysinger
2005-08-31  1:41             ` [gentoo-dev] " Sven Köhler
2005-08-31  1:57               ` Mike Frysinger
2005-08-31  1:56                 ` Sven Köhler
2005-08-31  2:15                 ` Martin Schlemmer
2005-08-31  2:21                   ` Mike Frysinger
2005-08-31  7:25                     ` Martin Schlemmer
2005-08-31 10:11                       ` Paul de Vrieze
2005-09-02 10:41                       ` Martin Schlemmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1125437576.13588.8.camel@uberpc.ubernet \
    --to=uberlord@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox