From: Richard Genoud <richard.genoud@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] busybox: S01logging: implement restart
Date: Tue, 20 Jan 2015 12:38:35 +0100 [thread overview]
Message-ID: <1421753915-4313-1-git-send-email-richard.genoud@gmail.com> (raw)
restart wasn't doing anything, and the expected behaviour is stop/start.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
package/busybox/S01logging | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/package/busybox/S01logging b/package/busybox/S01logging
index b7af2a7d5dbc..29093707888e 100644
--- a/package/busybox/S01logging
+++ b/package/busybox/S01logging
@@ -3,20 +3,30 @@
# Start logging
#
-case "$1" in
- start)
+start() {
echo -n "Starting logging: "
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
echo "OK"
- ;;
- stop)
+}
+
+stop() {
echo -n "Stopping logging: "
start-stop-daemon -K -q -p /var/run/syslogd.pid
start-stop-daemon -K -q -p /var/run/klogd.pid
echo "OK"
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart|reload)
+ stop
+ start
;;
*)
echo "Usage: $0 {start|stop|restart}"
--
2.0.0
next reply other threads:[~2015-01-20 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 11:38 Richard Genoud [this message]
2015-02-01 9:08 ` [Buildroot] [PATCH] busybox: S01logging: implement restart Luca Ceresoli
2015-02-01 22:19 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421753915-4313-1-git-send-email-richard.genoud@gmail.com \
--to=richard.genoud@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox