|
4 | 4 | #
|
5 | 5 | # Maintainer: Daniil Baturin <daniil at baturin dot org>
|
6 | 6 | #
|
7 |
| -# Copyright (C) 2013 SO3Group |
| 7 | +# Copyright (C) 2013, 2017 Daniil Baturin and contributors |
8 | 8 | #
|
9 | 9 | # This program is free software; you can redistribute it and/or modify
|
10 | 10 | # it under the terms of the GNU General Public License version 2 as
|
|
25 | 25 | # Value is chosen rather arbitrary
|
26 | 26 | sleep 10
|
27 | 27 | echo
|
28 |
| -echo "Loading EMRK 0.9a" |
| 28 | +echo "Loading EMRK 0.9d" |
29 | 29 |
|
30 | 30 | echo "Mounting filesystems"
|
31 | 31 | mount -a
|
|
167 | 167 | echo "This tool is distributed under the terms of"
|
168 | 168 | echo "GNU General Public License and other licenses"
|
169 | 169 | echo
|
170 |
| -echo "Brought to you by SO3 Group" |
171 |
| -echo |
172 | 170 | echo "WARNING: This tool is not developed, officially"
|
173 | 171 | echo "supported or endorsed by Ubiquiti Networks!"
|
174 | 172 | echo
|
@@ -209,7 +207,7 @@ if [ $? == 0 ]; then
|
209 | 207 | DHCP_OK=1
|
210 | 208 | NET_OK=1
|
211 | 209 | else
|
212 |
| - echo "DHCP configuration attemp failes!" |
| 210 | + echo "DHCP configuration attemp failed!" |
213 | 211 | fi
|
214 | 212 | fi
|
215 | 213 |
|
@@ -247,8 +245,9 @@ if [ $DHCP_OK != 1 ]; then
|
247 | 245 | # Set DNS server
|
248 | 246 | while true; do
|
249 | 247 | read -p "Enter DNS server address: " DNS
|
250 |
| - # XXX: this regex sucks |
251 |
| - echo $DNS | grep -E "[1-2][0-9]{,2}\.(0|[0-9]{1,3})\.(0|[0-9]{1,3})\.([0-9]{1,3})" > /dev/null |
| 248 | + # XXX: overly permissive regex to protect just against |
| 249 | + # obvious typos |
| 250 | + echo $DNS | grep -E "[0-9.]+" > /dev/null |
252 | 251 | if [ $? == 0 ]; then
|
253 | 252 | echo "nameserver $DNS" > /etc/resolv.conf
|
254 | 253 | break
|
|
0 commit comments