[oe-commits] Roman I Khimov : dnsmasq: add status check to init file
git version control
git at git.openembedded.org
Fri Mar 19 21:09:24 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 6476a15dfce24c23af3a08cb6e07ce962c167b19
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=6476a15dfce24c23af3a08cb6e07ce962c167b19
Author: Roman I Khimov <khimov at altell.ru>
Date: Fri Mar 19 16:37:02 2010 +0300
dnsmasq: add status check to init file
Signed-off-by: Roman I Khimov <khimov at altell.ru>
---
recipes/dnsmasq/dnsmasq.inc | 2 ++
recipes/dnsmasq/files/init | 14 +++++++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/recipes/dnsmasq/dnsmasq.inc b/recipes/dnsmasq/dnsmasq.inc
index fb47847..9f6e3e9 100644
--- a/recipes/dnsmasq/dnsmasq.inc
+++ b/recipes/dnsmasq/dnsmasq.inc
@@ -3,6 +3,8 @@ HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html"
SECTION = "console/network"
LICENSE = "GPL"
+PR = "r1"
+
#at least versions 2.15 and prior are moved to the archive folder on the server
SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(bb.data.getVar('PV',d,1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \
file://init \
diff --git a/recipes/dnsmasq/files/init b/recipes/dnsmasq/files/init
index d05a5aa..6f1fd32 100644
--- a/recipes/dnsmasq/files/init
+++ b/recipes/dnsmasq/files/init
@@ -20,6 +20,18 @@ case "$1" in
start-stop-daemon -K -x $DAEMON
echo "done."
;;
+ status)
+ echo -n "dnsmasq "
+ start-stop-daemon -q -K -t -x $DAEMON
+ RET=$?
+ if [ "$RET" == "0" ]; then
+ PID=`cat /var/run/dnsmasq.pid`
+ echo "($PID) is running"
+ else
+ echo "is not running"
+ exit $RET
+ fi
+ ;;
restart)
echo "restarting $DESC: $NAME... "
$0 stop
@@ -32,7 +44,7 @@ case "$1" in
echo "done."
;;
*)
- echo "Usage: $0 {start|stop|restart|reload}"
+ echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
;;
esac
More information about the Openembedded-commits
mailing list