aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-aliases
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-aliases')
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases
index 8b2dc732..4c03941e 100755
--- a/sysconfig/network-scripts/ifup-aliases
+++ b/sysconfig/network-scripts/ifup-aliases
@@ -167,7 +167,8 @@ function new_interface ()
IPGLOP="${ipa%%.*}_${ipb%%.*}_${ipc%%.*}_${ipc#*.}";
DEVNUM=${DEVICE#*:}
- if (LC_ALL=C; [[ ! "$DEVNUM" =~ '^[0-9A-Za-z_]*$' ]]); then
+ MATCH='^[0-9A-Za-z_]*$'
+ if (LC_ALL=C; [[ ! "$DEVNUM" =~ $MATCH ]]); then
echo $"error in $FILE: invalid alias number" >&2
return 1
fi