don't use return when being sourced
commit47a84875b594522b6a6441cc1837f98b92742305
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 24 Mar 2009 20:46:23 +0000 (24 21:46 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 24 Mar 2009 20:46:23 +0000 (24 21:46 +0100)
treec25bfbc50248c177d34a92accc1351fb9a77af56
parentc32d1dd4fcafad3f9c570adeda580a90d564a3af
don't use return when being sourced

Fabien Thomas reports that a Bourne (not Again) sh on FreeBSD just
ignores the return and continues executing with the rest of the script.

So just wrap everything that was skipped by the return using other
shells in a big if instead.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: http://bugs.debian.org/516188
tg.sh