[oe] [meta-oe][PATCH 1/2] meta-networking: Migrate dnsmasq into meta-networking

Koen Kooi koen at dominion.thruhere.net
Mon Sep 3 06:09:42 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 03-09-12 02:50, Joe MacDonald schreef:
> Signed-off-by: Joe MacDonald <joe.macdonald at windriver.com> --- 
> .../recipes-daemons/dnsmasq/dnsmasq-dbus_2.55.bb   |  13 + 
> .../recipes-daemons/dnsmasq/dnsmasq.inc            |  29 ++ 
> .../recipes-daemons/dnsmasq/dnsmasq_2.55.bb        |   4 + 
> .../recipes-daemons/dnsmasq/files/dnsmasq.conf     | 293
> +++++++++++++++++++++ meta-networking/recipes-daemons/dnsmasq/files/init
> |  52 ++++ .../dnsmasq/dnsmasq-dbus_2.55.bb                   |  13 - 
> meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc   |  29 -- 
> .../recipes-connectivity/dnsmasq/dnsmasq_2.55.bb   |   4 - 
> .../dnsmasq/files/dnsmasq.conf                     | 293
> --------------------- meta-oe/recipes-connectivity/dnsmasq/files/init
> |  52 ---- 10 files changed, 391 insertions(+), 391 deletions(-) create
> mode 100644 meta-networking/recipes-daemons/dnsmasq/dnsmasq-dbus_2.55.bb 
> create mode 100644 meta-networking/recipes-daemons/dnsmasq/dnsmasq.inc 
> create mode 100644
> meta-networking/recipes-daemons/dnsmasq/dnsmasq_2.55.bb create mode
> 100755 meta-networking/recipes-daemons/dnsmasq/files/dnsmasq.conf create
> mode 100644 meta-networking/recipes-daemons/dnsmasq/files/init delete
> mode 100644 meta-oe/recipes-connectivity/dnsmasq/dnsmasq-dbus_2.55.bb 
> delete mode 100644 meta-oe/recipes-connectivity/dnsmasq/dnsmasq.inc 
> delete mode 100644 meta-oe/recipes-connectivity/dnsmasq/dnsmasq_2.55.bb 
> delete mode 100755
> meta-oe/recipes-connectivity/dnsmasq/files/dnsmasq.conf delete mode
> 100644 meta-oe/recipes-connectivity/dnsmasq/files/init
> 

> diff --git a/meta-networking/recipes-daemons/dnsmasq/files/init
> b/meta-networking/recipes-daemons/dnsmasq/files/init new file mode
> 100644 index 0000000..d1aa9e5 --- /dev/null +++
> b/meta-networking/recipes-daemons/dnsmasq/files/init @@ -0,0 +1,52 @@ 
> +#!/bin/sh +DAEMON=/usr/bin/dnsmasq +NAME=dnsmasq +DESC="DNS forwarder
> and DHCP server" +ARGS="-7 /etc/dnsmasq.d" + +test -f $DAEMON || exit 0 
> + +set -e + +case "$1" in +    start) +        echo -n "starting $DESC:
> $NAME... " +	test -d /var/lib/misc/ || mkdir /var/lib/misc/ +
> start-stop-daemon -S -x $DAEMON -- $ARGS +	echo "done." +	;; +    stop) +
> echo -n "stopping $DESC: $NAME... " +	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 +	$0 start +	echo "done." +	;; +    reload) 
> +    	echo -n "reloading $DESC: $NAME... " +    	killall -HUP $(basename
> ${DAEMON}) +	echo "done." +	;; +    *) +	echo "Usage: $0
> {start|stop|status|restart|reload}" +	exit 1 +	;; +esac + +exit 0

Can this be made LSB compliant? Or better, does dnsmasq ship with its own
initscript we can use?
Another nit, the initscript and conffile hardcode /etc and /var, while the
recipe allows changing them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQREmmMkyGM64RGpERApmoAJ9jBM4+/H1EiY4yHPmWUUq3Q8p7hQCgnlx4
i+OCPKb2ao1egXP88MOKCVA=
=AhXV
-----END PGP SIGNATURE-----





More information about the Openembedded-devel mailing list