diff options
author | Florian La Roche <laroche@redhat.com> | 2002-07-16 08:47:14 +0000 |
---|---|---|
committer | Florian La Roche <laroche@redhat.com> | 2002-07-16 08:47:14 +0000 |
commit | 8652237f167a2737c3f5d957f75b00895dfe1cdf (patch) | |
tree | 7284824d3a4055bf9bf5de25843634736dbc93c2 /service | |
parent | 84a9d306650da8d633992ad3147024c656a3d03d (diff) | |
download | initscripts-8652237f167a2737c3f5d957f75b00895dfe1cdf.tar initscripts-8652237f167a2737c3f5d957f75b00895dfe1cdf.tar.gz initscripts-8652237f167a2737c3f5d957f75b00895dfe1cdf.tar.bz2 initscripts-8652237f167a2737c3f5d957f75b00895dfe1cdf.tar.xz initscripts-8652237f167a2737c3f5d957f75b00895dfe1cdf.zip |
* Tue Jul 16 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- /sbin/service: set PATH before calling startup scripts
HOME and TERM are also set during bootup, but they should not make
a difference for well-written daemons.
Diffstat (limited to 'service')
-rwxr-xr-x | service | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,9 @@ #!/bin/sh +# Set up a default search path. +PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" +export PATH + VERSION="`basename $0` ver. 0.91" USAGE="Usage: `basename $0` < option > | --status-all | \ [ service_name [ command | --full-restart ] ]" @@ -32,7 +36,7 @@ while [ $# -gt 0 ]; do ;; *) if [ -x "${SERVICEDIR}/${SERVICE}" ]; then - env -i LANG=$LANG "${SERVICEDIR}/${SERVICE}" status + env -i LANG=$LANG PATH=$PATH "${SERVICEDIR}/${SERVICE}" status fi ;; esac @@ -42,8 +46,8 @@ while [ $# -gt 0 ]; do SERVICE="${1}" cd / if [ -x "${SERVICEDIR}/${SERVICE}" ]; then - env -i LANG=$LANG "${SERVICEDIR}/${SERVICE}" stop - env -i LANG=$LANG "${SERVICEDIR}/${SERVICE}" start + env -i LANG=$LANG PATH=$PATH "${SERVICEDIR}/${SERVICE}" stop + env -i LANG=$LANG PATH=$PATH "${SERVICEDIR}/${SERVICE}" start exit $? fi elif [ -z "${SERVICE}" ]; then @@ -57,7 +61,7 @@ while [ $# -gt 0 ]; do done if [ -x "${SERVICEDIR}/${SERVICE}" ]; then - env -i LANG=$LANG "${SERVICEDIR}/${SERVICE}" ${OPTIONS} + env -i LANG=$LANG PATH=$PATH "${SERVICEDIR}/${SERVICE}" ${OPTIONS} else echo $"${SERVICE}: unrecognized service" >&2 exit 1 |