Use restart_daemon() to restart atd service.
Signed-off-by: Peng Haitao <[email protected]>
---
testcases/commands/at/at_allow01 | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/testcases/commands/at/at_allow01 b/testcases/commands/at/at_allow01
index 43b3428..ad4f733 100755
--- a/testcases/commands/at/at_allow01
+++ b/testcases/commands/at/at_allow01
@@ -80,19 +80,8 @@ do_setup()
exit 1
fi
- # running under systemd?
- if command -v systemctl >/dev/null 2>&1; then
- HAVE_SYSTEMCTL=true
- else
- HAVE_SYSTEMCTL=false
- fi
-
- # Restart atd daemon.
- if $HAVE_SYSTEMCTL; then
- systemctl restart atd.service
- else
- /etc/init.d/atd restart
- fi
+ . cmdlib.sh
+ restart_daemon atd
}
#-----------------------------------------------------------------------
--
1.8.0
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list