|
@@ -36,6 +36,10 @@ ROUTER_IP_ADDRESS="192.168.1.254"
|
36
|
36
|
# The fixed IP address of the Beaglebone Black on your local network
|
37
|
37
|
BBB_FIXED_IP_ADDRESS="192.168.1.55"
|
38
|
38
|
|
|
39
|
+# DNS
|
|
40
|
+NAMESERVER1='213.73.91.35'
|
|
41
|
+NAMESERVER2='85.214.20.141'
|
|
42
|
+
|
39
|
43
|
MICROSD_MOUNT_POINT="/media/$USER"
|
40
|
44
|
|
41
|
45
|
DEBIAN_FILE_NAME="debian-jessie-console-armhf-2014-08-13"
|
|
@@ -108,6 +112,16 @@ case $key in
|
108
|
112
|
shift
|
109
|
113
|
MICROSD_MOUNT_POINT="$1"
|
110
|
114
|
;;
|
|
115
|
+ # nameserver 1
|
|
116
|
+ --ns1)
|
|
117
|
+ shift
|
|
118
|
+ NAMESERVER1="$1"
|
|
119
|
+ ;;
|
|
120
|
+ # nameserver 2
|
|
121
|
+ --ns2)
|
|
122
|
+ shift
|
|
123
|
+ NAMESERVER2="$1"
|
|
124
|
+ ;;
|
111
|
125
|
*)
|
112
|
126
|
# unknown option
|
113
|
127
|
;;
|
|
@@ -206,8 +220,8 @@ $SUDO sed -i '/iface eth0 inet static/a\ netmask 255.255.255.0' $MICROSD_MOUN
|
206
|
220
|
$SUDO sed -i "/iface eth0 inet static/a\ address $BBB_FIXED_IP_ADDRESS" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
207
|
221
|
$SUDO sed -i '/iface usb0 inet static/,/ gateway 192.168.7.1/ s/^/#/' $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces
|
208
|
222
|
|
209
|
|
-$SUDO sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
210
|
|
-$SUDO sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
|
223
|
+$SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
|
224
|
+$SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
211
|
225
|
|
212
|
226
|
# change the motd to show further install instructions
|
213
|
227
|
echo 'Become the root user by typing:' > $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|