Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jerônimo Lopes" <lopesjeronimo@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] ofono: add init script
Date: Mon, 28 Apr 2014 12:34:52 -0300	[thread overview]
Message-ID: <1398699292-19411-3-git-send-email-lopesjeronimo@gmail.com> (raw)
In-Reply-To: <1398699292-19411-1-git-send-email-lopesjeronimo@gmail.com>

Signed-off-by: Jer?nimo Lopes <lopesjeronimo@gmail.com>
---
 package/ofono/S46ofono | 22 ++++++++++++++++++++++
 package/ofono/ofono.mk |  4 ++++
 2 files changed, 26 insertions(+)
 create mode 100755 package/ofono/S46ofono

diff --git a/package/ofono/S46ofono b/package/ofono/S46ofono
new file mode 100755
index 0000000..34d2b6a
--- /dev/null
+++ b/package/ofono/S46ofono
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+case "$1" in
+	start)
+		echo -n "Starting ofono ... "
+		start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n
+		echo "done."
+		;;
+	stop)
+		echo -n "Stopping ofono ..."
+		start-stop-daemon -K -q -p /var/run/ofonod.pid
+		echo "done."
+		;;
+	restart)
+		$0 stop
+		sleep 1
+		$0 start
+		;;
+	*)
+		echo "usage: $0 {start|stop|restart}"
+		;;
+esac
diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk
index 3f31447..07b354d 100644
--- a/package/ofono/ofono.mk
+++ b/package/ofono/ofono.mk
@@ -22,6 +22,10 @@ OFONO_CONF_OPT = --disable-test
 # make sure that it is defined.
 OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
+define OFONO_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/ofono/S46ofono $(TARGET_DIR)/etc/init.d/S46ofono
+endef
+
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 	OFONO_CONF_OPT += --enable-udev
 	OFONO_DEPENDENCIES += udev
-- 
1.9.1

  parent reply	other threads:[~2014-04-28 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 15:34 [Buildroot] [PATCH 1/3] connman: bump to version 1.23 Jerônimo Lopes
2014-04-28 15:34 ` [Buildroot] [PATCH 2/3] ofono: bump to version 1.14 Jerônimo Lopes
2014-04-28 15:34 ` Jerônimo Lopes [this message]
2014-04-28 19:49 ` [Buildroot] [PATCH 1/3] connman: bump to version 1.23 Peter Korsgaard

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=1398699292-19411-3-git-send-email-lopesjeronimo@gmail.com \
    --to=lopesjeronimo@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