SVN: rc-scripts/trunk/service

arekm arekm at pld-linux.org
Sun Mar 4 21:36:37 CET 2012


Author: arekm
Date: Sun Mar  4 21:36:36 2012
New Revision: 12484

Modified:
   rc-scripts/trunk/service
Log:
systemd takes preference if it is booted/active.

Modified: rc-scripts/trunk/service
==============================================================================
--- rc-scripts/trunk/service	(original)
+++ rc-scripts/trunk/service	Sun Mar  4 21:36:36 2012
@@ -124,11 +124,11 @@
 	esac
 done
 
-if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
-	exec env -i USE_UPSTART=$USE_UPSTART LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS}
-elif [ -x /bin/systemd_booted ] && systemd_booted; then
+if [ -x /bin/systemd_booted ] && /bin/systemd_booted && /bin/systemctl status ${SERVICE}.service > /dev/null 2>&1; then
 	echo >&2 "Redirecting to /bin/systemctl ${OPTIONS} ${SERVICE}.service"
-	exec /bin/systemctl ${OPTIONS} ${SERVICE}.service
+	exec /bin/systemctl ${ACTION} ${SERVICE}.service ${OPTIONS}
+elif [ -x "${SERVICEDIR}/${SERVICE}" ]; then
+	exec env -i USE_UPSTART=$USE_UPSTART LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS}
 else
 	echo "${SERVICE}: unrecognized service" >&2
 	exit 1


More information about the pld-cvs-commit mailing list