[OE-core] [PATCH] update-rc.d.bbclass: Fix host/target test in postinst
Martin Jansa
martin.jansa at gmail.com
Sun Oct 27 15:08:12 UTC 2013
On Sun, Oct 27, 2013 at 12:36:57AM +0200, Jacob Kroon wrote:
> When running the postinst script I get a shell warning:
>
> sh: argument expected
>
> and the service is never stopped. This patch fixes the warning
> message and stops the service.
>
> Signed-off-by: Jacob Kroon <jacob.kroon at gmail.com>
> ---
> meta/classes/update-rc.d.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
> index e14659d..835b717 100644
> --- a/meta/classes/update-rc.d.bbclass
> +++ b/meta/classes/update-rc.d.bbclass
> @@ -16,7 +16,7 @@ updatercd_postinst() {
> # test if there is a previous init script there, ie, we are updating the package
> # if so, we stop the service and remove it before we install from the new package
> if type update-rc.d >/dev/null 2>/dev/null; then
> - if [ -z "$D" -a `test -f "${INIT_D_DIR}/${INITSCRIPT_NAME}"` ]; then
> + if [ -z "$D" -a "test -f ${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
I guess you want
+ if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
here
> ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
> fi
> if [ -n "$D" ]; then
> --
> 1.8.3.1
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20131027/4076e030/attachment-0002.sig>
More information about the Openembedded-core
mailing list