Systems 'ifconfig' changed.
This commit is contained in:
		| @@ -31,23 +31,23 @@ _PHP_VERSION=7.1.2 | |||||||
|  |  | ||||||
| ## - Determin IP-Adresses | ## - Determin IP-Adresses | ||||||
| ## - | ## - | ||||||
|  | if ifconfig | grep -i -q -E "inet [address|Adresse]:" ; then | ||||||
|    __ipv4="`ifconfig | grep -e \"^\s*inet Adresse\" | grep -v \"127.0.0.1\" | awk '{print$2}' | cut -d\":\" -f2 | sort`" |    __ipv4="`ifconfig | grep -e \"^\s*inet Adresse\" | grep -v \"127.0.0.1\" | awk '{print$2}' | cut -d\":\" -f2 | sort`" | ||||||
|  |    __ipv6="`ifconfig | grep -e \"^\s*inet6-Adresse\" | awk '{print$2}' | grep -v -e \"^::1/\" | grep -v -e \"^fe80\" | cut -d\"/\" -f1 | sort`" | ||||||
|  | else | ||||||
|  |    __ipv4="`ifconfig | grep -e \"^\s*inet \" | grep -v \"127.0.0.1\" | awk '{print$2}' |  sort`" | ||||||
|  |    __ipv6="`ifconfig | grep -e \"^\s*inet6 \" | awk '{print$2}' | grep -v \"^::1\" | grep -v -e \"^fe80\" |  sort`" | ||||||
|  | fi | ||||||
| for _ip in $__ipv4 ; do | for _ip in $__ipv4 ; do | ||||||
|    _ipv4="$_ipv4 $_ip" |    _ipv4="$_ipv4 $_ip" | ||||||
| done | done | ||||||
| ## - Trim leading whitespaces |  | ||||||
| ## - |  | ||||||
| shopt -s extglob |  | ||||||
| _ipv4="${_ipv4##*( )}" |  | ||||||
| shopt -u extglob |  | ||||||
|  |  | ||||||
| __ipv6="`ifconfig | grep -e \"^\s*inet6-Adresse\" | awk '{print$2}' | grep -v -e \"^::1/\" | grep -v -e \"^fe80\" | cut -d\"/\" -f1 | sort`" |  | ||||||
| for _ip in $__ipv6 ; do | for _ip in $__ipv6 ; do | ||||||
|    _ipv6="$_ipv6 $_ip" |    _ipv6="$_ipv6 $_ip" | ||||||
| done | done | ||||||
| ## - Trim leading whitespaces | ## - Trim leading whitespaces | ||||||
| ## - | ## - | ||||||
| shopt -s extglob | shopt -s extglob | ||||||
|  | _ipv4="${_ipv4##*( )}" | ||||||
| _ipv6="${_ipv6##*( )}" | _ipv6="${_ipv6##*( )}" | ||||||
| shopt -u extglob | shopt -u extglob | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user