commit 41d39b6a70db38aadbf3fe00a113f078547f1d25
parent 63b52c3765411fb6bbe2f919f8ccd4cff6f1b9fa
Author: parazyd <parazyd@dyne.org>
Date: Sat, 21 Nov 2020 21:09:49 +0100
rc.conf tweaks.
Diffstat:
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
@@ -130,12 +130,13 @@ you to input a sudo password. Try inputting it and pressing `Enter` to
continue. Otherwise, you may want to set up a `NOPASSWD` entry in
sudoers, or something similar to prolong the timeout.
-This will probably take a little bit. When this is issued, the build
-system will start downloading the necessary source code and binaries. It
-will be compiling the Linux kernel, and setting up and configuring an
-Alpine Linux chroot. Once done, the chroot will be packed and compressed
-into a cpio archive which can then be extracted on a microSD card we can
-use with our Raspberry Pi Zero.
+This process can take 20 minutes of crunching, depending on your
+hardware. When this is issued, the build system will start downloading
+the necessary source code and binaries. It will be compiling the Linux
+kernel, and setting up and configuring an Alpine Linux chroot. Once
+done, the chroot will be packed and compressed into a cpio archive which
+can then be extracted on a microSD card we can use with our Raspberry Pi
+Zero.
Hardware
diff --git a/install.sh.in b/install.sh.in
@@ -4,6 +4,9 @@
# See LICENSE file for copyright and license details.
set -e
+# Clean up some static files from the chroot tarball
+rm -f /etc/shadow /etc/alpine-release /etc/issue /etc/os-release
+
cat <<EOF > /etc/apk/repositories
https://nl.alpinelinux.org/alpine/edge/main
https://nl.alpinelinux.org/alpine/edge/community
@@ -25,10 +28,18 @@ adduser -D -s /bin/ash uwu
echo "@USERCREDENTIALS@" | chpasswd
echo "@ROOTCREDENTIALS@" | chpasswd
-sed -e 's/#rc_parallel="NO"/rc_parallel="YES"/' -i /etc/rc.conf
+sed -e 's/^#rc_parallel=.*/rc_parallel="YES"/' \
+ -e 's/^#unicode=.*/unicode="NO"/' \
+ -e 's/^rc_tty_number=.*/rc_tty_number=1/' \
+ -i /etc/rc.conf
-cat <<EOF >> /etc/inittab
+cat <<EOF > /etc/inittab
+# /etc/inittab
+::sysinit:/sbin/openrc sysinit
+::sysinit:/sbin/openrc boot
+::wait:/sbin/openrc default
ttyGS0::respawn:/sbin/getty -L ttyGS0 115200 vt100
+::shutdown:/sbin/openrc shutdown
EOF
echo "ttyGS0" >> /etc/securetty
@@ -38,7 +49,5 @@ for i in $boot_initscripts; do
rc-update add $i boot
done
-#default_initscripts="electrum-daemon"
-#for i in $default_initscripts; do
-# rc-update add $i default
-#done
+# Final cleanup
+rm -f /etc/shadow- /etc/group- /etc/passwd-