From bf960799ea0bda868efbd82641efd9842e1c8499 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 2 Jan 2014 11:14:38 +0200 Subject: [PATCH] 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 --- dahdi_span_assignments | 2 +- dahdi_span_types | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dahdi_span_assignments b/dahdi_span_assignments index 19c70d3..bcafe89 100755 --- a/dahdi_span_assignments +++ b/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 diff --git a/dahdi_span_types b/dahdi_span_types index 48a0854..b12fc6f 100755 --- a/dahdi_span_types +++ b/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