We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d24893a commit 7f56954Copy full SHA for 7f56954
ROMFS/px4fmu_common/init.d-posix/rcS
@@ -295,10 +295,15 @@ then
295
# for multi intances setup, add namespace prefix
296
uxrce_dds_ns="-n px4_$px4_instance"
297
fi
298
-if [ -n "$PX4_UXRCE_DDS_NS" ]
299
-then
300
- # Override namespace if environment variable is defined
301
- uxrce_dds_ns="-n $PX4_UXRCE_DDS_NS"
+if [ "${PX4_UXRCE_DDS_NS+x}" ]; then
+ # Override, as variable is set (empty or not)
+ if [ -n "$PX4_UXRCE_DDS_NS" ]; then
+ # Override namespace if environment variable is non-empty
302
+ uxrce_dds_ns="-n $PX4_UXRCE_DDS_NS"
303
+ else
304
+ # Clear namespace if variable is empty
305
+ uxrce_dds_ns=""
306
+ fi
307
308
if [ -n "$ROS_DOMAIN_ID" ]
309
then
0 commit comments