Commit 8c4fbf96 authored by Andreas Schmidt's avatar Andreas Schmidt

Add a setup.sh script to simplify first-time setup.

parent 8af70749
......@@ -24,6 +24,7 @@ echo 'nameserver 9.9.9.9' >> $DIR/etc/resolv.conf
cp $(which qemu-arm-static) $DIR/usr/bin
cp provision.sh $DIR/root
cp setup.sh $DIR/root
chroot $DIR qemu-arm-static /bin/bash /root/provision.sh
rm $DIR/root/provision.sh
......
if [ $# -lt 1 ]; then
echo 1>&2 "$0: not enough arguments"
exit 2
elif [ $# -gt 1 ]; then
echo 1>&2 "$0: too many arguments"
exit 2
fi
RNA_NAME=$1
apt update && apt upgrade -y && apt autoremove -y
apt install -y \
salt-minion
echo "$RNA_NAME" > /etc/salt/minion_id
echo "master: 10.8.0.1" > /etc/salt/minion.d/master.conf
service salt-minion restart
sed -i -e "s/odroid/$RNA_NAME/g" /etc/hostname
sed -i -e "s/odroid/$RNA_NAME/g" /etc/hosts
salt-call test.ping
echo "Press any key to continue."
read -n 1 -s
salt-call test.ping
salt-call state.highstate
salt-call state.sls tools
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment