Skip to content
Permalink
Browse files

Adapt build scripts for Docker

  • Loading branch information...
Cat5TV committed Aug 19, 2019
1 parent e1ffc39 commit e1d9e999c7242ddc1a81f2092369ee0a4d9bf93e
Showing with 34 additions and 16 deletions.
  1. +1 −1 build/005-networking
  2. +7 −1 build/009-rc_local
  3. +4 −0 build/010-tty
  4. +4 −0 build/011-tty
  5. +4 −0 build/012-tty
  6. +2 −0 build/015-reload-daemon
  7. +4 −0 build/170-cockpit
  8. +4 −0 build/171-cockpit
  9. +4 −2 build/190-mac-address
  10. +0 −12 nems-build.sh
@@ -9,7 +9,7 @@ printf "Ensuring Hostname is Setup Correctly... "

if ! grep -q "127.0.1.1" /etc/hosts; then
echo -e "127.0.1.1\t$hn" >> /etc/hosts
echo "Chance was required. Patched."
echo "Change was required. Patched."
else
echo "No change required."
fi
@@ -1,9 +1,13 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)

if (( $platform != 21 )); then

# enable rc.local service
if [[ ! -e /etc/systemd/system/rc-local.service ]]; then
echo "[Unit]
echo "[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
@@ -22,3 +26,5 @@ fi
chmod +x /etc/rc.local

/bin/systemctl enable rc-local

fi
@@ -1,6 +1,9 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

# Replace the screen with our bootscreen which shows some basic info to the user (like how to connect)

apt install -y dialog
@@ -61,3 +64,4 @@ if ! grep -q "NEMS00001" /etc/rc.local; then
/bin/systemctl start rc-local.service
fi

fi
@@ -1,6 +1,9 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

if [[ ! -e /etc/systemd/system/getty.target.wants ]]; then
echo "This platform does not have TTY"
exit 0
@@ -34,3 +37,4 @@ if ! grep -q "NEMS00000" /etc/rc.local; then
/bin/systemctl start rc-local.service
fi

fi
@@ -1,6 +1,9 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

if [[ ! -e /etc/systemd/system/getty.target.wants ]]; then
echo "This platform does not have TTY"
exit 0
@@ -34,3 +37,4 @@ if ! grep -q "NEMS00002" /etc/rc.local; then
/bin/systemctl start rc-local.service
fi

fi
@@ -3,3 +3,5 @@ echo $0 > /var/www/html/userfiles/nems-build.cur

echo "Reloading Daemon"
/bin/systemctl daemon-reload

echo "Done."
@@ -7,8 +7,12 @@ echo $0 > /var/www/html/userfiles/nems-build.cur

# May not be necessary since Buster now includes it in repos

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

# Install Cockpit
apt update
apt -y install cockpit
apt -y install cockpit-networkmanager

fi
@@ -3,6 +3,8 @@ echo $0 > /var/www/html/userfiles/nems-build.cur

# ** This file also gets called by NEMS daily fixes **

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

## Remove Cockpit theme and replace with symlink to the NEMS theme
platform=$(/usr/local/bin/nems-info platform)
@@ -12,3 +14,5 @@ if [[ -d /usr/share/cockpit/branding/debian/ ]]; then
fi
mkdir -p /usr/share/cockpit/branding/debian
cp -f /root/nems/nems-migrator/data/1.5/cockpit/branding/* /usr/share/cockpit/branding/debian/

fi
@@ -3,6 +3,9 @@ echo $0 > /var/www/html/userfiles/nems-build.cur

# Set Network Manager WiFi MAC address to not change on boot

platform=$(/usr/local/share/nems/nems-scripts/info.sh platform)
if (( $platform != 21 )); then

if [[ -e /etc/NetworkManager/NetworkManager.conf ]]; then # Do this on any board that uses Network Manager

wifi=$(/usr/bin/nmcli r wifi | grep enabled | grep -v not | wc -l)
@@ -55,5 +58,4 @@ done

fi

# Don't exit if systemctl fails to restart network-manager
echo "Done."
fi
@@ -1,8 +1,5 @@
#!/bin/bash

# TO DO
# Add removal of swap

####
# This script is *DESTRUCTIVE*
# This is how I build NEMS distros from scratch
@@ -139,17 +136,8 @@ done
apt -y install -f

# Be up to date
apt -y upgrade
#apt -y dist-upgrade

# Upgrade firmware (Removed; will stick with stable firmware via raspberrypi-bootloader)
# rpi-update

# Upgrade again in case anything changed on the new kernel
# Or if anything was held back for the upgraded packages
apt update
apt -y upgrade
#apt -y dist-upgrade

# Disable firstrun (ARMbian)
if [[ -e /etc/init.d/firstrun ]]; then

0 comments on commit e1d9e99

Please sign in to comment.
You can’t perform that action at this time.