diff --git a/man/freedombone-prep.1.gz b/man/freedombone-prep.1.gz index d1aaf800..16befa0c 100644 Binary files a/man/freedombone-prep.1.gz and b/man/freedombone-prep.1.gz differ diff --git a/src/freedombone-prep b/src/freedombone-prep index 3661a6ce..19885d29 100755 --- a/src/freedombone-prep +++ b/src/freedombone-prep @@ -36,6 +36,10 @@ ROUTER_IP_ADDRESS="192.168.1.254" # The fixed IP address of the Beaglebone Black on your local network BBB_FIXED_IP_ADDRESS="192.168.1.55" +# DNS +NAMESERVER1='213.73.91.35' +NAMESERVER2='85.214.20.141' + MICROSD_MOUNT_POINT="/media/$USER" DEBIAN_FILE_NAME="debian-jessie-console-armhf-2014-08-13" @@ -108,6 +112,16 @@ case $key in shift MICROSD_MOUNT_POINT="$1" ;; + # nameserver 1 + --ns1) + shift + NAMESERVER1="$1" + ;; + # nameserver 2 + --ns2) + shift + NAMESERVER2="$1" + ;; *) # unknown option ;; @@ -206,8 +220,8 @@ $SUDO sed -i '/iface eth0 inet static/a\ netmask 255.255.255.0' $MICROSD_MOUN $SUDO sed -i "/iface eth0 inet static/a\ address $BBB_FIXED_IP_ADDRESS" $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces $SUDO sed -i '/iface usb0 inet static/,/ gateway 192.168.7.1/ s/^/#/' $MICROSD_MOUNT_POINT/$ROOTFS/etc/network/interfaces -$SUDO sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf -$SUDO sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf +$SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf +$SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf # change the motd to show further install instructions echo 'Become the root user by typing:' > $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd