|
| 1 | + |
| 2 | +echo "### Add ssh to start up." |
| 3 | +insserv ssh |
| 4 | +update-rc.d ssh enable |
| 5 | +echo "" |
| 6 | + |
| 7 | +echo "### Install avahi daemon (enables mDNS/DNS-SD so you can connect to coder.local)." |
| 8 | +apt-get -y install avahi-daemon |
| 9 | +echo "" |
| 10 | + |
| 11 | +echo "### Install dhcpd daemon (will be used to give addresses when in ad-hoc hotspot mode)." |
| 12 | +apt-get -y install isc-dhcp-server |
| 13 | +echo "" |
| 14 | + |
| 15 | +echo "### Update dhcpd init.d script so it doesn't run by default." |
| 16 | +cp ../../../raspbian-addons/etc/init.d/isc-dhcp-server /etc/init.d/isc-dhcp-server |
| 17 | +insserv -r isc-dhcp-server |
| 18 | +echo "" |
| 19 | + |
| 20 | +echo "### Set up wpaconfig group." |
| 21 | +addgroup --system wpaconfig |
| 22 | +adduser coder wpaconfig |
| 23 | +echo "" |
| 24 | + |
| 25 | +echo "### Updating headless boot scripts." |
| 26 | +cp -rv ../../../raspbian-addons/boot/coder_settings/ /boot/ |
| 27 | + |
| 28 | +cp -v ../../../raspbian-addons/etc/iptables.up.rules /etc/ |
| 29 | +cp -v ../../../raspbian-addons/etc/network/if-pre-up.d/* /etc/network/if-pre-up.d/ |
| 30 | +cp -v ../../../raspbian-addons/etc/network/interfaces* /etc/network/ |
| 31 | + |
| 32 | +cp -v ../../../raspbian-addons/etc/default/* /etc/default/ |
| 33 | +cp -v ../../../raspbian-addons/etc/dhcp/dhcpd.conf /etc/dhcp/ |
| 34 | +cp -v ../../../raspbian-addons/etc/modprobe.d/* /etc/modprobe.d/ |
| 35 | + |
| 36 | +cp -v ../../../raspbian-addons/etc/wpa_supplicant/wpa_supplicant* /etc/wpa_supplicant/ |
| 37 | +chown -v root:wpaconfig /etc/wpa_supplicant/wpa_supplicant* |
| 38 | +chmod -v 660 /etc/wpa_supplicant/wpa_supplicant* |
| 39 | + |
| 40 | +cp -v ../../../raspbian-addons/etc/init.d/coder-daemon /etc/init.d/ |
| 41 | +cp -v ../../../raspbian-addons/etc/init.d/generate-ssh-hostkeys /etc/init.d/ |
| 42 | +cp -v ../../../raspbian-addons/etc/init.d/pull-coder-reset /etc/init.d/ |
| 43 | +cp -v ../../../raspbian-addons/etc/init.d/pull-hostname /etc/init.d/ |
| 44 | +cp -v ../../../raspbian-addons/etc/init.d/pull-net-interfaces /etc/init.d/ |
| 45 | +cp -v ../../../raspbian-addons/etc/init.d/pull-wpa-supplicant /etc/init.d/ |
| 46 | + |
| 47 | +echo "### Add init scripts to start up routine." |
| 48 | +echo "Coder" |
| 49 | +insserv coder-daemon |
| 50 | +update-rc.d coder-daemon enable |
| 51 | + |
| 52 | +echo "Auto ssh key regen" |
| 53 | +insserv generate-ssh-hostkeys |
| 54 | +update-rc.d generate-ssh-hostkeys enable |
| 55 | + |
| 56 | +echo "Coder quick reset capability" |
| 57 | +insserv pull-coder-reset |
| 58 | +update-rc.d pull-coder-reset enable |
| 59 | + |
| 60 | +echo "SD host configuration capability" |
| 61 | +insserv pull-hostname |
| 62 | +update-rc.d pull-hostname enable |
| 63 | + |
| 64 | +echo "SD network interface configuration capability" |
| 65 | +insserv pull-net-interfaces |
| 66 | +update-rc.d pull-net-interfaces enable |
| 67 | + |
| 68 | +echo "SD wireless configuration capability" |
| 69 | +insserv pull-wpa-supplicant |
| 70 | +update-rc.d pull-wpa-supplicant enable |
| 71 | +echo "" |
0 commit comments