correctly handle the absence of ENVIRONMENT=dev

This commit is contained in:
Aiden McClelland
2022-02-17 09:49:37 -07:00
committed by Aiden McClelland
parent 47a5f37bd3
commit 8dd54f0cca
2 changed files with 3 additions and 3 deletions

View File

@@ -66,13 +66,13 @@ EOF
cat /embassy-os/product_key.txt | tr -d '\n' | sha256sum | head -c 32 | sed 's/$/\n/' > /etc/machine-id
passwd -l pi
# introduce start9 username and embassy as default password
usermod -l start9 -d /home/start9 -m pi
groupmod --new-name start9 pi
echo start9:embassy | chpasswd
passwd -l start9
raspi-config nonint enable_overlayfs
# create a copy of the cmdline *without* the quirk string, so that it can be easily amended

View File

@@ -85,7 +85,7 @@ sudo chmod -x /tmp/eos-mnt/etc/update-motd.d/*
sudo chmod +x /tmp/eos-mnt/etc/update-motd.d/00-embassy
if [[ "$ENVIRONMENT" =~ (^|-)dev($|-) ]]; then
cat ./build/initialization.sh | grep -v "passwd -l pi" | sudo tee /tmp/eos-mnt/usr/local/bin/initialization.sh > /dev/null
cat ./build/initialization.sh | grep -v "passwd -l start9" | sudo tee /tmp/eos-mnt/usr/local/bin/initialization.sh > /dev/null
sudo chmod +x /tmp/eos-mnt/usr/local/bin/initialization.sh
else
sudo cp ./build/initialization.sh /tmp/eos-mnt/usr/local/bin