summaryrefslogtreecommitdiffstats
path: root/src/service/util/serviceutil.sh
diff options
context:
space:
mode:
authorVitezslav Crhonek <vcrhonek@redhat.com>2012-11-22 09:42:13 +0100
committerVitezslav Crhonek <vcrhonek@redhat.com>2012-11-22 09:42:13 +0100
commitedf21faa3a4d80f6e0a2404c1fe3168a213fdd3c (patch)
tree646d0d41f8ce4d94acd55f24e18e8719d07b0bba /src/service/util/serviceutil.sh
parentdba1707afb860047e9a1250ce876dbddedcb70ff (diff)
downloadopenlmi-providers-edf21faa3a4d80f6e0a2404c1fe3168a213fdd3c.tar.gz
openlmi-providers-edf21faa3a4d80f6e0a2404c1fe3168a213fdd3c.tar.xz
openlmi-providers-edf21faa3a4d80f6e0a2404c1fe3168a213fdd3c.zip
Service:
- Use popen instead evil tmpnam in service enumeration functions. - Pass service name to systemctl after a "--" argument list terminator.
Diffstat (limited to 'src/service/util/serviceutil.sh')
-rwxr-xr-xsrc/service/util/serviceutil.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service/util/serviceutil.sh b/src/service/util/serviceutil.sh
index a7a518c..5c26651 100755
--- a/src/service/util/serviceutil.sh
+++ b/src/service/util/serviceutil.sh
@@ -32,10 +32,10 @@ if [ -f $SYSTEMD_SDIR/$SUNIT_NAME ];
then
case "$1" in
start|stop|reload|restart|try-restart|condrestart|reload-or-restart|reload-or-try-restart|enable|disable|is-enabled)
- systemctl $1 $SUNIT_NAME
+ systemctl -- $1 $SUNIT_NAME
;;
status)
- output=`systemctl status $SUNIT_NAME`
+ output=`systemctl -- status $SUNIT_NAME`
if echo "$output" | grep Active: | grep inactive > /dev/null 2>&1; then
echo "stopped"
elif echo "$output" | grep Active: | grep failed > /dev/null 2>&1; then