[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mandrake-cooker
Subject:    [Cooker] why does daemon() in /etc/init.d/functions uses a login shell ?
From:       Guillaume Rousse <rousse () ccr ! jussieu ! fr>
Date:       2001-08-31 19:01:33
[Download RAW message or body]

daemon function in /etc/init.d uses a login shell when used with --user flag
$nice initlog $INITLOG_ARGS -c "su - $user -c \"$*\"" && success "%s startup" 
$base || failure "%s startup" $base
using a su - $user make it impossible to pass env var to launched process :-( 
Is there a particular reason for this ? It could be possible to modify user's 
profile, but not with pseudo-users with no shell associated.
One solution could be to use 'su $user -c' directly in service script, but 
then you break service launch unified look.
-- 
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic