mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interface: fix special device name chars used in shell variables
This commit is contained in:
parent
ad097da1be
commit
13389c823e
@ -152,6 +152,7 @@ elif [ "${DO_COMMAND}" = "-l" ]; then
|
||||
FILE=${MATCH##*/}
|
||||
IF=${FILE%_*}
|
||||
IF=${IF%%:*}
|
||||
IF=$(echo ${IF} | sed -e 's/[.:]/__/g')
|
||||
MD=${FILE##*_}
|
||||
|
||||
# suffix :slaac matched before plain interface
|
||||
@ -180,10 +181,11 @@ if [ -z "${IF}" ]; then
|
||||
FOUND=${FOUND#/tmp/}
|
||||
FOUND=${FOUND%_*}
|
||||
FOUND=${FOUND%:*}
|
||||
if [ -z "$(eval echo \${${FOUND}_found})" ]; then
|
||||
RESULTS="${RESULTS} ${FOUND}_found"
|
||||
IF=$(echo ${FOUND} | sed -e 's/[.:]/__/g')
|
||||
if [ -z "$(eval echo \${${IF}_found})" ]; then
|
||||
RESULTS="${RESULTS} ${IF}_found"
|
||||
fi
|
||||
eval export ${FOUND}_found='${FOUND}'
|
||||
eval export ${IF}_found='${FOUND}'
|
||||
done
|
||||
|
||||
# only list possible interfaces for user to choose from
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user