Use restart_daemon() to restart atd service.
Signed-off-by: Peng Haitao <[email protected]>
---
testcases/commands/at/at_allow01 | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/testcases/commands/at/at_allow01 b/testcases/commands/at/at_allow01
index 43b3428..c0e9335 100755
--- a/testcases/commands/at/at_allow01
+++ b/testcases/commands/at/at_allow01
@@ -38,6 +38,10 @@ test_user1_home="/home/${test_user1}"
test_user2_home="/home/${test_user2}"
tmpfile="$TMP/at_allow_test"
+if [ "$(id -ru)" = 0 ]; then
+ . cmdlib.sh
+fi
+
#-----------------------------------------------------------------------
# FUNCTION: do_setup
#-----------------------------------------------------------------------
@@ -80,19 +84,7 @@ 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
+ restart_daemon atd
}
#-----------------------------------------------------------------------
--
1.8.0.1
------------------------------------------------------------------------------
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