aboutsummaryrefslogtreecommitdiff
path: root/utils/mkiso.d/live_script.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mkiso.d/live_script.sh')
-rw-r--r--utils/mkiso.d/live_script.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/utils/mkiso.d/live_script.sh b/utils/mkiso.d/live_script.sh
new file mode 100644
index 00000000..bb470dc1
--- /dev/null
+++ b/utils/mkiso.d/live_script.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+LIVEUSER=live
+PASSWORD=live
+LIVEHOSTNAME=alicelive
+
+adduser -D $LIVEUSER
+for g in users wheel audio video input; do
+ addgroup $LIVEUSER $g
+done
+
+passwd -d $LIVEUSER >/dev/null 2>&1
+passwd -d root >/dev/null 2>&1
+
+echo "root:root" | chpasswd -c SHA512
+echo "$LIVEUSER:$PASSWORD" | chpasswd -c SHA512
+
+for sv in tty1 tty2 tty3 seatd; do
+ [ -d /etc/sv/$sv ] && ln -s /etc/sv/$sv /var/service
+done
+
+echo $LIVEHOSTNAME > /etc/hostname
+
+if [ -f /etc/doas.conf ]; then
+ echo "permit nopass $LIVEUSER" >> /etc/doas.conf
+fi