aboutsummaryrefslogtreecommitdiff
path: root/utils/mkiso.d/live_script.sh
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-05-27 01:17:32 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-05-27 01:17:32 +0800
commit7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1 (patch)
treedfbe0b3fa3d1afb769505c84f9dafde3fcef79cd /utils/mkiso.d/live_script.sh
parentaede0625fa3a20b2e5bab2165034a98c06822ab3 (diff)
downloadalicelinux-7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1.tar.gz
alicelinux-7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1.zip
early util scripts added
Diffstat (limited to 'utils/mkiso.d/live_script.sh')
-rw-r--r--utils/mkiso.d/live_script.sh58
1 files changed, 58 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..61c42eec
--- /dev/null
+++ b/utils/mkiso.d/live_script.sh
@@ -0,0 +1,58 @@
+#!/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
+
+cat <<'EOF' > /etc/skel/.profile
+if [ -z "$XDG_RUNTIME_DIR" ]; then
+ XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir"
+ mkdir -pm 0700 "$XDG_RUNTIME_DIR"
+ export XDG_RUNTIME_DIR
+fi
+EOF
+
+cat <<'EOF' > /etc/issue
+Alice Linux \r (\l)
+
+Project page : https://codeberg.org/emmett1/alicelinux
+
+user login : live
+user password: live
+
+root login : root
+root password: root
+
+run 'sway' after login to start gui
+
+Some default sway keybindsym reminder:
+
+ Super + Enter : foot terminal
+ Super + d : menu launcher
+ Super + Shift + q : quit program
+ Super + Shift + e : exit sway
+
+run 'doas poweroff' to poweroff live system
+
+EOF