From 210b5704a913f86ca92a482a011498c40ec11afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 19 Oct 2016 14:21:14 +0200 Subject: [PATCH] px4fmu_common rcS: fix MAVLINK_F test fixes a 'test: syntax error' message on startup. There were two problems: - the expansion of $MAVLINK_F lead to multiple arguments in the test when the variable contained spaces. Fixed with "" - the x prevents interpretation as a unary expression, if $MAVLINK_F starts with a - character (in that case the expansion would be: if [ -r 1200 ... and nsh interprets - as unary expression) --- ROMFS/px4fmu_common/init.d/rcS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 23312e4f5e..ed19f648a8 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -511,7 +511,7 @@ then fi fi - if [ $MAVLINK_F == "none" ] + if [ "x$MAVLINK_F" == xnone ] then else mavlink start $MAVLINK_F