span_types/assignments: no * in device list

If there are no dahdi devices, $devbase/* expans to have a literal '*',
which leads to warnings such as:
/usr/sbin/dahdi_span_types: 1: cd: can't cd to /sys/bus/dahdi_devices/devices/*

Let's just avoid those.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
Tzafrir Cohen 2014-01-02 11:14:38 +02:00
parent 4f259cd569
commit bf960799ea
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ fi
if [ "$#" -gt 0 ]; then
DEVICES="$@"
else
DEVICES=`echo $devbase/*`
DEVICES=`ls -d $devbase/* 2>/dev/null`
fi
# Beware of special characters in attributes

View File

@ -120,7 +120,7 @@ fi
if [ "$#" -gt 0 ]; then
DEVICES="$@"
else
DEVICES=`echo $devbase/*`
DEVICES=`ls -d $devbase/* 2>/dev/null`
fi
# Beware of special characters in attributes