|
@@ -133,7 +133,12 @@ if [ ! -d ~/freedombone/$DEBIAN_FILE_NAME ]; then
|
133
|
133
|
exit 4
|
134
|
134
|
fi
|
135
|
135
|
cd $DEBIAN_FILE_NAME
|
136
|
|
-sudo ./setup_sdcard.sh --mmc $MICROSD_DRIVE --dtb beaglebone
|
|
136
|
+
|
|
137
|
+SUDO=
|
|
138
|
+if [ -f /usr/bin/sudo ]; then
|
|
139
|
+ SUDO='sudo'
|
|
140
|
+fi
|
|
141
|
+$SUDO ./setup_sdcard.sh --mmc $MICROSD_DRIVE --dtb beaglebone
|
137
|
142
|
|
138
|
143
|
echo ''
|
139
|
144
|
echo ''
|
|
@@ -149,17 +154,17 @@ if [ ! -b ${MICROSD_DRIVE}1 ]; then
|
149
|
154
|
fi
|
150
|
155
|
fi
|
151
|
156
|
|
152
|
|
-sudo cp $MICROSD_MOUNT_POINT/BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/BOOT/uEnv.txt
|
|
157
|
+$SUDO cp $MICROSD_MOUNT_POINT/BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/BOOT/uEnv.txt
|
153
|
158
|
|
154
|
|
-sudo sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
155
|
|
-sudo sed -i '/iface eth0 inet static/a\ dns-nameservers 213.73.91.35 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
156
|
|
-sudo sed -i "/iface eth0 inet static/a\ gateway $ROUTER_IP_ADDRESS" $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
157
|
|
-sudo sed -i '/iface eth0 inet static/a\ netmask 255.255.255.0' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
158
|
|
-sudo sed -i "/iface eth0 inet static/a\ address $BBB_FIXED_IP_ADDRESS" $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
159
|
|
-sudo sed -i '/iface usb0 inet static/,/ gateway 192.168.7.1/ s/^/#/' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
159
|
+$SUDO sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
160
|
+$SUDO sed -i '/iface eth0 inet static/a\ dns-nameservers 213.73.91.35 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
161
|
+$SUDO sed -i "/iface eth0 inet static/a\ gateway $ROUTER_IP_ADDRESS" $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
162
|
+$SUDO sed -i '/iface eth0 inet static/a\ netmask 255.255.255.0' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
163
|
+$SUDO sed -i "/iface eth0 inet static/a\ address $BBB_FIXED_IP_ADDRESS" $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
|
164
|
+$SUDO sed -i '/iface usb0 inet static/,/ gateway 192.168.7.1/ s/^/#/' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces
|
160
|
165
|
|
161
|
|
-sudo sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
162
|
|
-sudo sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
|
166
|
+$SUDO sed -i 's/nameserver.*/nameserver 213.73.91.35/g' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
|
167
|
+$SUDO sed -i '/nameserver 213.73.91.35/a\nameserver 85.214.20.141' $MICROSD_MOUNT_POINT/rootfs/etc/resolv.conf
|
163
|
168
|
|
164
|
169
|
# change the motd to show further install instructions
|
165
|
170
|
echo 'Become the root user by typing:' > $MICROSD_MOUNT_POINT/rootfs/etc/motd
|