Browse Source

Better dns configuration

Bob Mottram 10 years ago
parent
commit
e420310c1a
1 changed files with 40 additions and 6 deletions
  1. 40
    6
      install-freedombone.sh

+ 40
- 6
install-freedombone.sh View File

@@ -1,6 +1,42 @@
1 1
 #!/bin/bash
2 2
 # Freedombone install script intended for use with Debian Jessie
3 3
 
4
+# cd ~/
5
+# wget http://freedombone.uk.to/debian-jessie-console-armhf-2014-08-13.tar.xz
6
+#
7
+# Verify it.
8
+#
9
+# sha256sum debian-jessie-console-armhf-2014-08-13.tar.xz
10
+# fc225cfb3c2dfad92cccafa97e92c3cd3db9d94f4771af8da364ef59609f43de
11
+#
12
+# Uncompress it.
13
+#
14
+# tar xJf debian-jessie-console-armhf-2014-08-13.tar.xz
15
+# cd debian-jessie-console-armhf-2014-08-13
16
+#
17
+# sudo apt-get install u-boot-tools dosfstools git-core kpartx wget parted
18
+# sudo ./setup_sdcard.sh --mmc /dev/sdX --dtb beaglebone
19
+#
20
+# When finished eject the micrtoSD then reinsert it
21
+#
22
+# sudo cp /media/$USER/BOOT/bbb-uEnv.txt /media/$USER/BOOT/uEnv.txt
23
+# sync
24
+#
25
+# Eject microSD, insert into BBB, attach USB cable between BBB and laptop.
26
+# On Ubuntu wait until you see the "connected" message.
27
+#
28
+# ssh-keygen -f "/home/$USER/.ssh/known_hosts" -R 192.168.7.2
29
+# ssh debian@192.168.7.2 (password "temppwd")
30
+# su (password "root")
31
+# passwd
32
+# adduser $MY_USERNAME
33
+# exit
34
+# exit (again)
35
+# scp install-freedombone.sh $MY_USERNAME@192.168.7.2:/home/$MY_USERNAME
36
+# ssh $MY_USERNAME@192.168.7.2
37
+# su
38
+# ./install-freedombone.sh [DOMAIN_NAME] [MY_USERNAME]
39
+
4 40
 DOMAIN_NAME=$1
5 41
 MY_USERNAME=$2
6 42
 
@@ -225,12 +261,10 @@ function configure_dns {
225 261
   if grep -Fxq "configure_dns" $COMPLETION_FILE; then
226 262
 	  return
227 263
   fi
228
-  if ! grep -Fxq "nameserver 213.73.91.35" /etc/resolv.conf; then
229
-    echo 'nameserver 213.73.91.35' >> /etc/resolv.conf
230
-  fi
231
-  if ! grep -Fxq "nameserver 85.214.20.141" /etc/resolv.conf; then
232
-    echo 'nameserver 85.214.20.141' >> /etc/resolv.conf
233
-  fi
264
+  echo 'domain localdomain' > /etc/resolv.conf
265
+  echo 'search localdomain' >> /etc/resolv.conf
266
+  echo 'nameserver 213.73.91.35' >> /etc/resolv.conf
267
+  echo 'nameserver 85.214.20.141' >> /etc/resolv.conf
234 268
   echo 'configure_dns' >> $COMPLETION_FILE
235 269
 }
236 270