mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +00:00
correctly handle the absence of ENVIRONMENT=dev
This commit is contained in:
committed by
Aiden McClelland
parent
47a5f37bd3
commit
8dd54f0cca
@@ -66,13 +66,13 @@ EOF
|
|||||||
|
|
||||||
cat /embassy-os/product_key.txt | tr -d '\n' | sha256sum | head -c 32 | sed 's/$/\n/' > /etc/machine-id
|
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
|
# introduce start9 username and embassy as default password
|
||||||
usermod -l start9 -d /home/start9 -m pi
|
usermod -l start9 -d /home/start9 -m pi
|
||||||
groupmod --new-name start9 pi
|
groupmod --new-name start9 pi
|
||||||
echo start9:embassy | chpasswd
|
echo start9:embassy | chpasswd
|
||||||
|
|
||||||
|
passwd -l start9
|
||||||
|
|
||||||
raspi-config nonint enable_overlayfs
|
raspi-config nonint enable_overlayfs
|
||||||
|
|
||||||
# create a copy of the cmdline *without* the quirk string, so that it can be easily amended
|
# create a copy of the cmdline *without* the quirk string, so that it can be easily amended
|
||||||
|
|||||||
@@ -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
|
sudo chmod +x /tmp/eos-mnt/etc/update-motd.d/00-embassy
|
||||||
|
|
||||||
if [[ "$ENVIRONMENT" =~ (^|-)dev($|-) ]]; then
|
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
|
sudo chmod +x /tmp/eos-mnt/usr/local/bin/initialization.sh
|
||||||
else
|
else
|
||||||
sudo cp ./build/initialization.sh /tmp/eos-mnt/usr/local/bin
|
sudo cp ./build/initialization.sh /tmp/eos-mnt/usr/local/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user