Hi,
The code that tries to find the netmask fails on (at least) Debian 9. The line for non-FreeBSD for this is on line 744 of setup.sh:
	
	
	
		
The output from ifconfig for an interface "eth0" looks like this on Debian 9:
	
	
	
		
Suggested replacement for line 744 which should capture the correct netmask on at least Debian 8 and 9, as well as CentOS 6 and 7, which is all I have available for testing at the moment:
	
	
	
		
It seems that running
	
	
	
		
does not use this same script, so there might be more locations where this change should be made.
				
			The code that tries to find the netmask fails on (at least) Debian 9. The line for non-FreeBSD for this is on line 744 of setup.sh:
		Code:
	
	NM=`/sbin/ifconfig $ETH_DEV | grep 'Mask:' | cut -d: -f4`;
	The output from ifconfig for an interface "eth0" looks like this on Debian 9:
		Code:
	
	# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 1.2.3.4  netmask 255.255.255.0  broadcast 1.2.3.255
        inet6 fe80::216:3eff:fe49:6573  prefixlen 64  scopeid 0x20<link>
        ether 00:16:3e:49:65:73  txqueuelen 1000  (Ethernet)
        RX packets 13403845  bytes 1908847857 (1.7 GiB)
        RX errors 0  dropped 438  overruns 0  frame 0
        TX packets 747033  bytes 93890407 (89.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
	Suggested replacement for line 744 which should capture the correct netmask on at least Debian 8 and 9, as well as CentOS 6 and 7, which is all I have available for testing at the moment:
		Code:
	
	NM=$(/sbin/ifconfig ${ETH_DEV} | grep -oP "(netmask |Mask:)\K[^\s]+(?=.*)")
	It seems that running
		Code:
	
	cd /usr/local/directadmin
./directadmin i
	
			
				Last edited: