From: Martin Jansa Date: Wed, 8 Apr 2015 12:40:44 +0000 (+0200) Subject: tzdata: fix postinst X-Git-Tag: yocto-4.0~26322 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87429d37e72b1fd2f329d693b4d1b1229a90e0a2;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git tzdata: fix postinst * add quotes around possibly empty tz variable * use exit instead of return, because we're not in function and postinst fails: line 9: return: can only `return' from a function or sourced script" Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-extended/tzdata/tzdata.inc b/meta/recipes-extended/tzdata/tzdata.inc index 37ae92647cd..ee56d36395e 100644 --- a/meta/recipes-extended/tzdata/tzdata.inc +++ b/meta/recipes-extended/tzdata/tzdata.inc @@ -60,8 +60,8 @@ pkg_postinst_${PN} () { tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") fi - if [ -z ${tz} ] ; then - return 0 + if [ -z "${tz}" ] ; then + exit 0 fi if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then