From 7006650cc9d174fa2b6e709f9fb4f4f84e06e2c1 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Mon, 27 May 2024 01:17:32 +0800 Subject: early util scripts added --- utils/mkiso.d/live_script.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 utils/mkiso.d/live_script.sh (limited to 'utils/mkiso.d/live_script.sh') 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 -- cgit v1.2.3