Browse Source

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>
master
Tzafrir Cohen 8 years ago
parent
commit
bf960799ea
  1. 2
      dahdi_span_assignments
  2. 2
      dahdi_span_types

2
dahdi_span_assignments

@ -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

2
dahdi_span_types

@ -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

Loading…
Cancel
Save