From e9a42258240b89a2050e2730bcfb473f36224ed9 Mon Sep 17 00:00:00 2001 From: hackbard Date: Fri, 17 Jul 2015 17:45:58 +0200 Subject: [PATCH] added nellboard post routines (not yet completed!) --- post_routines/nellboard/dnsmasq | 12 ++++++++++++ post_routines/nellboard/interfaces | 11 +++++++++++ post_routines/nellboard/leds | 17 +++++++++++++++++ post_routines/nellboard/nelldev | 10 ++++++++++ 4 files changed, 50 insertions(+) create mode 100644 post_routines/nellboard/dnsmasq create mode 100644 post_routines/nellboard/interfaces create mode 100644 post_routines/nellboard/leds create mode 100644 post_routines/nellboard/nelldev diff --git a/post_routines/nellboard/dnsmasq b/post_routines/nellboard/dnsmasq new file mode 100644 index 0000000..ee96468 --- /dev/null +++ b/post_routines/nellboard/dnsmasq @@ -0,0 +1,12 @@ +#!/bin/bash + +cat > /etc/dnsmasq.conf << EOF +port=0 +no-resolv +no-poll +interface=usb0 +dhcp-range=172.17.17.5,172.17.17.10,12h +dhcp-host=00:03:23:23:23:23,172.17.17.16 +dhcp-option=3 +EOF + diff --git a/post_routines/nellboard/interfaces b/post_routines/nellboard/interfaces new file mode 100644 index 0000000..a705cb6 --- /dev/null +++ b/post_routines/nellboard/interfaces @@ -0,0 +1,11 @@ +#!/bin/bash + +cat > /etc/network/interfaces << EOF +auto lo +iface lo inet loopback + +auto usb0 +iface usb0 inet static + address 172.17.17.17 +EOF + diff --git a/post_routines/nellboard/leds b/post_routines/nellboard/leds new file mode 100644 index 0000000..0cb6223 --- /dev/null +++ b/post_routines/nellboard/leds @@ -0,0 +1,17 @@ +#!/bin/bash + +cat > /lib/systemd/system/gled.service << EOF +[Unit] +Description=Switching on the green LED +After=sshd.service dnsmasq.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/nellcmd gled on yled off + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable gled.service + diff --git a/post_routines/nellboard/nelldev b/post_routines/nellboard/nelldev new file mode 100644 index 0000000..ba8de5e --- /dev/null +++ b/post_routines/nellboard/nelldev @@ -0,0 +1,10 @@ +#!/bin/bash + +# nellcmd +cp -r /files/nelldev / +cd /nelldev/linux/nellcmd +make +ln -s /nelldev/linux/nellcmd/nellcmd /bin + +# web + -- 2.39.2