differences between service command and running command directly

m.roth at 5-cent.us m.roth at 5-cent.us
Tue Oct 4 17:19:35 UTC 2011


ESGLinux wrote:
> GOTCHA!!!!
>
> I always have read that running services using service command is safer
> than using the script directly
>
> the key is that service runs the script with env -i (with an empty
> enviroment) so if there is any wrong variable you are protected.
>
> My problem is that in /etc/profile.d/ I have defined a wrong variable and
> when I run /etc/init.d/httpd status the scripts runs with the corrupt
> enviroment.
<snip>
Good catch!

      mark




More information about the redhat-list mailing list