* [LTP] [PATCH v2 1/2] at_allow01: Use lib to restart atd service
@ 2012-12-07 3:24 Peng Haitao
2012-12-07 3:24 ` [LTP] [PATCH v2 2/2] at_deny01: " Peng Haitao
2012-12-07 7:51 ` [LTP] [PATCH v2 1/2] at_allow01: " Wanlong Gao
0 siblings, 2 replies; 4+ messages in thread
From: Peng Haitao @ 2012-12-07 3:24 UTC (permalink / raw)
To: ltp-list
Use restart_daemon() to restart atd service.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH v2 2/2] at_deny01: Use lib to restart atd service
2012-12-07 3:24 [LTP] [PATCH v2 1/2] at_allow01: Use lib to restart atd service Peng Haitao
@ 2012-12-07 3:24 ` Peng Haitao
2012-12-07 7:51 ` Wanlong Gao
2012-12-07 7:51 ` [LTP] [PATCH v2 1/2] at_allow01: " Wanlong Gao
1 sibling, 1 reply; 4+ messages in thread
From: Peng Haitao @ 2012-12-07 3:24 UTC (permalink / raw)
To: ltp-list
Use restart_daemon() to restart atd service.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
testcases/commands/at/at_deny01 | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/testcases/commands/at/at_deny01 b/testcases/commands/at/at_deny01
index fe3dce0..73dbe0d 100755
--- a/testcases/commands/at/at_deny01
+++ b/testcases/commands/at/at_deny01
@@ -38,6 +38,10 @@ test_user1_home="/home/${test_user1}"
test_user2_home="/home/${test_user2}"
tmpfile="$TMP/at_deny_test"
+if [ "$(id -ru)" = 0 ]; then
+ . cmdlib.sh
+fi
+
#-----------------------------------------------------------------------
# FUNCTION: do_setup
#-----------------------------------------------------------------------
@@ -86,19 +90,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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v2 1/2] at_allow01: Use lib to restart atd service
2012-12-07 3:24 [LTP] [PATCH v2 1/2] at_allow01: Use lib to restart atd service Peng Haitao
2012-12-07 3:24 ` [LTP] [PATCH v2 2/2] at_deny01: " Peng Haitao
@ 2012-12-07 7:51 ` Wanlong Gao
1 sibling, 0 replies; 4+ messages in thread
From: Wanlong Gao @ 2012-12-07 7:51 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On 12/07/2012 11:24 AM, Peng Haitao wrote:
> Use restart_daemon() to restart atd service.
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v2 2/2] at_deny01: Use lib to restart atd service
2012-12-07 3:24 ` [LTP] [PATCH v2 2/2] at_deny01: " Peng Haitao
@ 2012-12-07 7:51 ` Wanlong Gao
0 siblings, 0 replies; 4+ messages in thread
From: Wanlong Gao @ 2012-12-07 7:51 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On 12/07/2012 11:24 AM, Peng Haitao wrote:
> Use restart_daemon() to restart atd service.
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-07 7:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 3:24 [LTP] [PATCH v2 1/2] at_allow01: Use lib to restart atd service Peng Haitao
2012-12-07 3:24 ` [LTP] [PATCH v2 2/2] at_deny01: " Peng Haitao
2012-12-07 7:51 ` Wanlong Gao
2012-12-07 7:51 ` [LTP] [PATCH v2 1/2] at_allow01: " Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox