git » mk-builders.git » main » tree

[main] / builder-initial.sh

#!/bin/bash
/sbin/ldconfig -r .
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen
export LANG="en_US.UTF-8"
systemd-machine-id-setup
systemctl preset-all
mkdir -p /home/builder
chown builder:builder /home/builder
gpasswd -a builder wheel
passwd -d builder
passwd -d root
make-ca -r
# ARMv8 to v7 hack (VM)
if [ "$(uname -m)" = "armv8l" ]; then
	mv /usr/bin/uname /usr/bin/uname.real
	cat > /usr/bin/uname << "EOF"
#!/bin/sh
/usr/bin/uname.real "$@" | sed 's/armv8l/armv7l/'
EOF
	chmod +x /usr/bin/uname
fi