* [LTP] [PATCH] at_deny01: fix a bug of /etc/init.d/atd is nonexistent
@ 2012-04-05 1:02 Peng Haitao
2012-04-05 1:07 ` Garrett Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Peng Haitao @ 2012-04-05 1:02 UTC (permalink / raw)
To: yanegomi, gaowanlong; +Cc: ltp-list
/etc/init.d/atd is nonexistent in fedora16, so should use systemctl.
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
testcases/commands/at/at_allow01 | 13 ++++++++++++-
testcases/commands/at/at_deny01 | 13 ++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/testcases/commands/at/at_allow01 b/testcases/commands/at/at_allow01
index b08a2d9..5ada6a6 100755
--- a/testcases/commands/at/at_allow01
+++ b/testcases/commands/at/at_allow01
@@ -80,8 +80,19 @@ 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.
- /etc/init.d/atd restart
+ if $HAVE_SYSTEMCTL; then
+ systemctl restart atd.service
+ else
+ /etc/init.d/atd restart
+ fi
}
#-----------------------------------------------------------------------
diff --git a/testcases/commands/at/at_deny01 b/testcases/commands/at/at_deny01
index 9f9f433..b43ea34 100755
--- a/testcases/commands/at/at_deny01
+++ b/testcases/commands/at/at_deny01
@@ -86,8 +86,19 @@ 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.
- /etc/init.d/atd restart
+ if $HAVE_SYSTEMCTL; then
+ systemctl restart atd.service
+ else
+ /etc/init.d/atd restart
+ fi
}
#-----------------------------------------------------------------------
--
1.7.10.rc3
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] at_deny01: fix a bug of /etc/init.d/atd is nonexistent
2012-04-05 1:02 [LTP] [PATCH] at_deny01: fix a bug of /etc/init.d/atd is nonexistent Peng Haitao
@ 2012-04-05 1:07 ` Garrett Cooper
2012-04-05 1:14 ` Wanlong Gao
0 siblings, 1 reply; 3+ messages in thread
From: Garrett Cooper @ 2012-04-05 1:07 UTC (permalink / raw)
To: Peng Haitao; +Cc: ltp-list
On Wed, Apr 4, 2012 at 6:02 PM, Peng Haitao <penght@cn.fujitsu.com> wrote:
> /etc/init.d/atd is nonexistent in fedora16, so should use systemctl.
>
> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Reviewed-by: Garrett Cooper <yanegomi@gmail.com>
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] at_deny01: fix a bug of /etc/init.d/atd is nonexistent
2012-04-05 1:07 ` Garrett Cooper
@ 2012-04-05 1:14 ` Wanlong Gao
0 siblings, 0 replies; 3+ messages in thread
From: Wanlong Gao @ 2012-04-05 1:14 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list
On 04/05/2012 09:07 AM, Garrett Cooper wrote:
> On Wed, Apr 4, 2012 at 6:02 PM, Peng Haitao <penght@cn.fujitsu.com> wrote:
>> /etc/init.d/atd is nonexistent in fedora16, so should use systemctl.
>>
>> Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
>
> Reviewed-by: Garrett Cooper <yanegomi@gmail.com>
>
pushed, thanks,
Wanlong Gao
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-05 1:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 1:02 [LTP] [PATCH] at_deny01: fix a bug of /etc/init.d/atd is nonexistent Peng Haitao
2012-04-05 1:07 ` Garrett Cooper
2012-04-05 1:14 ` Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox