aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-02-17 14:54:37 -0500
committerBill Nottingham <notting@redhat.com>2011-02-17 14:54:37 -0500
commit616421e94e9f91924b0f9cf7de1ae8cde578b70f (patch)
treea8a5880a18e1e537bbec7d360c8afe5435676bfd /service
parent8faaa3060b652002b56f616e16d550a4a9e77a6f (diff)
downloadinitscripts-616421e94e9f91924b0f9cf7de1ae8cde578b70f.tar
initscripts-616421e94e9f91924b0f9cf7de1ae8cde578b70f.tar.gz
initscripts-616421e94e9f91924b0f9cf7de1ae8cde578b70f.tar.bz2
initscripts-616421e94e9f91924b0f9cf7de1ae8cde578b70f.tar.xz
initscripts-616421e94e9f91924b0f9cf7de1ae8cde578b70f.zip
Accept --ignore-dependencies, --skip-redirect in /sbin/service.
Diffstat (limited to 'service')
-rwxr-xr-xservice10
1 files changed, 9 insertions, 1 deletions
diff --git a/service b/service
index 276d72ab..1a426356 100755
--- a/service
+++ b/service
@@ -26,6 +26,14 @@ while [ $# -gt 0 ]; do
echo "${VERSION}" >&2
exit 0
;;
+ --ignore-dependencies)
+ export SYSTEMCTL_IGNORE_DEPENDENCIES=1
+ shift
+ ;;
+ --skip-redirect)
+ export SYSTEMCTL_SKIP_REDIRECT=1
+ shift
+ ;;
*)
if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then
cd ${SERVICEDIR}
@@ -60,7 +68,7 @@ while [ $# -gt 0 ]; do
done
if [ -f "${SERVICEDIR}/${SERVICE}" ]; then
- env -i PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
+ env -i PATH="$PATH" TERM="$TERM" SYSTEMCTL_IGNORE_DEPENDENCIES=${SYSTEMCTL_IGNORE_DEPENDENCIES} SYSTEMCTL_SKIP_REDIRECT=${SYSTEMCTL_SKIP_REDIRECT} "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
elif [ -f "${SYSTEMDSERVICEDIR}/${SERVICE}.service" ]; then
echo $"Redirecting to /bin/systemctl ${OPTIONS} ${SERVICE}.service" >/dev/stderr
exec /bin/systemctl ${OPTIONS} ${SERVICE}.service