blob: a5b9a3f4e38f4151b47935e262b9770471961243 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- tests/common/init.sh.orig 2018-08-31 12:55:53 UTC
+++ tests/common/init.sh
@@ -366,7 +366,8 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRU
if [ -z "${DOMSUF}" ]; then
DOMSUF=`echo $HOST | sed -e "s/^[^.]*\.//"`
fi
- HOST=`echo $HOST | sed -e "s/\..*//"`
+ DOMSUF=${HOST#*.} # remove Smallest Prefix matching ``*.''
+ HOST=${HOST%%.*} # remove Largest Suffix ``.*''. See sh(1)
;;
?*)
;;
|