[oe-commits] Johan Hovold : gpsd: fix gpsd init script

git at git.openembedded.org git at git.openembedded.org
Wed Apr 18 17:25:36 UTC 2012


Module: meta-openembedded.git
Branch: master
Commit: d96d51e1eb4c086db781eb89b17d3b4ddbac7d13
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=d96d51e1eb4c086db781eb89b17d3b4ddbac7d13

Author: Johan Hovold <johan.hovold at lundinova.se>
Date:   Wed Apr 18 11:27:01 2012 +0000

gpsd: fix gpsd init script

Replace return with exit where appropriate.

Current init script uses return outside of functions resulting in
warnings such as the following when using bash as interpreter:

/etc/init.d/gpsd: line 98: return: can only `return' from a function or sourced script

Signed-off-by: Johan Hovold <johan.hovold at lundinova.se>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd |   10 +++++-----
 meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb   |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd
index 3687d24..ba73daf 100755
--- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd
+++ b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd
@@ -95,19 +95,19 @@ case "$1" in
   start)
 		echo "Starting $DESC" "$NAME"
 		do_start
-		return $?
+		exit $?
 	;;
   stop)
 	echo "Stopping $DESC" "$NAME"
 	do_stop
-	return $?
+	exit $?
 	;;
   status)
        ;;
   reload|force-reload)
 	echo "Reloading $DESC" "$NAME"
 	do_reload
-	return $?
+	exit $?
 	;;
   restart)
 	#
@@ -119,11 +119,11 @@ case "$1" in
 	case "$?" in
 	  0|1)
 		do_start
-		return $?
+		exit $?
 		;;
 	  *)
 	 	# Failed to stop
-		return 1
+		exit 1
 		;;
 	esac
 	;;
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
index 927107a..7e2a96c 100644
--- a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
+++ b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
 DEPENDS = "dbus-glib ncurses python libusb1"
 PROVIDES = "virtual/gpsd"
 
-PR = "r2"
+PR = "r3"
 
 EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
                 --x-libraries=${STAGING_LIBDIR} \





More information about the Openembedded-commits mailing list