working on rpi borging
This commit is contained in:
21
pisetup/root/boot/rc.local.txt
Normal file
21
pisetup/root/boot/rc.local.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /etc/setup
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# install bash and only bash so that the setup scripts can assume bash
|
||||
apt update
|
||||
apt install -y bash
|
||||
|
||||
if [ ! -e /etc/setup/setup-done ]; then
|
||||
/bin/bash << 'EOF'
|
||||
for FILE in /boot/setup-scripts/*.sh; do
|
||||
echo "running '$FILE'" | logger -s -t setup-scripts
|
||||
/bin/bash $FILE 2>&1 | logger -s -t setup-scripts
|
||||
done
|
||||
EOF
|
||||
echo "system init complete" | logger -s -t setup-scripts
|
||||
touch /etc/setup/setup-done
|
||||
fi
|
||||
|
||||
4
pisetup/root/boot/setup-scripts/01-set-time.sh
Normal file
4
pisetup/root/boot/setup-scripts/01-set-time.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt -y install ntpdate
|
||||
ntpdate time.apple.com
|
||||
36
pisetup/root/boot/setup-scripts/05-packages.sh
Normal file
36
pisetup/root/boot/setup-scripts/05-packages.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
PKGS="
|
||||
apt-transport-https
|
||||
byobu
|
||||
ca-certificates
|
||||
cryptsetup-bin
|
||||
curl
|
||||
dirmngr
|
||||
dnsutils
|
||||
gnupg-agent
|
||||
gnupg2
|
||||
haveged
|
||||
inetutils-ping
|
||||
jq
|
||||
lsof
|
||||
man-db
|
||||
mosh
|
||||
nmap
|
||||
opensc
|
||||
pcscd
|
||||
pinentry-curses
|
||||
pv
|
||||
rsync
|
||||
runit
|
||||
runit-systemd
|
||||
scdaemon
|
||||
screen
|
||||
software-properties-common
|
||||
usbmount
|
||||
vim
|
||||
wget
|
||||
"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt install -y $PKGS
|
||||
@@ -0,0 +1,5 @@
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt -y install command-not-found
|
||||
apt-file update
|
||||
update-command-not-found
|
||||
20
pisetup/root/boot/setup-scripts/20-install-nvm-and-node.sh
Normal file
20
pisetup/root/boot/setup-scripts/20-install-nvm-and-node.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt update
|
||||
apt install -y git
|
||||
|
||||
export HOME=/root
|
||||
git clone https://github.com/creationix/nvm.git /root/.nvm
|
||||
|
||||
cat >> /root/.bashrc <<'EOF'
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
EOF
|
||||
|
||||
source /root/.bashrc
|
||||
|
||||
nvm install 10
|
||||
nvm use 10
|
||||
|
||||
npm install -g npm@latest
|
||||
npm install -g yarn
|
||||
12
pisetup/root/boot/setup-scripts/30-install-signoffline.sh
Normal file
12
pisetup/root/boot/setup-scripts/30-install-signoffline.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
source "$NVM_DIR/nvm.sh"
|
||||
|
||||
nvm use 8
|
||||
|
||||
# @next as of 14 nov 2018
|
||||
VERSION="5cd9d6be4f05831f76a12cc833e1fbd5b6e143cd"
|
||||
|
||||
unzip -d /var/lib/signoffline /boot/signoffline.zip
|
||||
cd /var/lib/signoffline
|
||||
git checkout $VERSION
|
||||
yarn install
|
||||
5
pisetup/root/boot/setup-scripts/99-disable-swap.sh
Normal file
5
pisetup/root/boot/setup-scripts/99-disable-swap.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
/sbin/dphys-swapfile swapoff
|
||||
/sbin/dphys-swapfile uninstall
|
||||
apt purge -y dphys-swapfile
|
||||
swapoff -a
|
||||
rm /var/swap
|
||||
Reference in New Issue
Block a user