--- tests/common/init.sh.orig 2016-02-26 20:51:11 UTC +++ tests/common/init.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/sh # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -349,7 +349,8 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOU 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) ;; ?*) ;;