An *UGLY* hack:
daemon --user "-l $HLUSER" hlds_ld $mod &
Too terrible, I can't even accept it myself :D
A better way IMHO can be modifying /etc/rc.d/init.d/functions, adding an
option to daemon() to specify if "su -l" or "su" should be used.
Abel Cheung
On Wed, 7 Mar 2001, Guillaume Rousse wrote:
> I'm trying to configure a custom launch script /etc/init.d/hlds_ld for
> hlds_ld service.
>
> If i use this command:
> for mod in $MODLIST; do
> daemon --user $HLUSER hlds_ld $mod &
> done
> RETVAL=$?
> i have a service launch message [passed]...
>
> Investigating a bit, i found that using
> su $HLUSER hlds_ld $mod &
> the su commands tried to read my current login shell .bashrc, and fails due
> to paranoid restrictions (I'm logged as my own user, then using su for
> lanching service, which has to fork to service user).
>
> Using rather
> su -l $HLUSER hlds_ld $mod &
> solves the problem, but then i loose service launch message [OK]
>
> So, how can i use the solves this while keeping the standard display ?
>