Refactored scripts

This commit is contained in:
B.J. Dweck 2020-11-02 11:51:20 +02:00
parent 1d35e2beba
commit cce80e6fde
2 changed files with 13 additions and 21 deletions

View File

@ -2,29 +2,29 @@
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
apt-get -y purge\ apt-get -y purge \
cloud-init cloud-guest-utils\ cloud-init cloud-guest-utils \
cloud-initramfs-copymods cloud-initramfs-dyn-netconf\ cloud-initramfs-copymods cloud-initramfs-dyn-netconf \
open-iscsi open-iscsi
rm -rf /etc/cloud/ /var/lib/cloud/ rm -rf /etc/cloud/ /var/lib/cloud/
apt-get update apt-get update
apt-get -y\ apt-get -y \
-o Dpkg::Options::="--force-confdef"\ -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold"\ -o Dpkg::Options::="--force-confold" \
upgrade upgrade
apt-get -y install\ apt-get -y install \
vim\ vim \
gparted\ gparted \
libc6:armhf libstdc++6:armhf\ libc6:armhf libstdc++6:armhf \
lxterminal\ lxterminal \
usbmount usbmount
# Workaround for usbmount bug on Bionic # Workaround for usbmount bug on Bionic
mkdir -p /etc/systemd/system/systemd-udevd.service.d mkdir -p /etc/systemd/system/systemd-udevd.service.d
echo "[Service]\nMountFlags=shared\n" >\ echo "[Service]\nMountFlags=shared\n" > \
/etc/systemd/system/systemd-udevd.service.d/override.conf /etc/systemd/system/systemd-udevd.service.d/override.conf
systemctl daemon-reload systemctl daemon-reload
service systemd-udevd --full-restart service systemd-udevd --full-restart

View File

@ -41,19 +41,11 @@ apt:
packages: ['torch-agent'] packages: ['torch-agent']
runcmd: runcmd:
# Disable optional PAM features for faster SSH login
# - 'mv /etc/pam.d/sshd /etc/pam.d/sshd.bak'
# - 'sed "s/^session[ \t]\+optional/#\0/" /etc/pam.d/sshd.bak > /etc/pam.d/sshd'
# Back up the SSH default config and activate the new config
# - 'mv /etc/ssh/sshd_config /etc/ssh/sshd_config.bak'
# - 'mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config'
# - 'service ssh reload'
# Multi-arch support on aarch64 # Multi-arch support on aarch64
- 'dpkg --add-architecture armhf' - 'dpkg --add-architecture armhf'
# Run optional script for additoinal package setup # Run setup scripts
- '/boot/firmware/cloud-init/initial-setup.sh' - '/boot/firmware/cloud-init/initial-setup.sh'
- '/boot/firmware/cloud-init/configure-torch.sh' - '/boot/firmware/cloud-init/configure-torch.sh'
- 'reboot now' - 'reboot now'