Checking of IP addresses

This commit is contained in:
Bob Mottram 2016-10-19 12:02:57 +01:00
parent e7363daa76
commit e32a151485
1 changed files with 1 additions and 1 deletions

View File

@ -1336,7 +1336,7 @@ Enter a static local IP address for this system.\n\nIt will typically be 192.168
esac
if ! grep -q 'iface eth0 inet static' /etc/network/interfaces; then
if [ "$NEW_STATIC_GATEWAY" && "$NEW_STATIC_IP" ]; then
if [[ "$NEW_STATIC_GATEWAY" == *"."* && "$NEW_STATIC_IP" == *"."* ]]; then
echo '# This file describes the network interfaces available on your system' > /etc/network/interfaces
echo '# and how to activate them. For more information, see interfaces(5).' >> /etc/network/interfaces
echo '' >> /etc/network/interfaces