diff --git a/build_iso.sh b/build_iso.sh index d7012d1..60cb9ea 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -12,7 +12,8 @@ fi if [[ "$MODE" == "cli" ]]; then sed -i 's/gnome/#gnome/g' ${prof}/packages.x86_64 sed -i 's/mesa/#mesa/g' ${prof}/packages.x86_64 - sed -i 's/systemctl/#systemctl/g' chrooted.sh +else + sed -i 's/DISABLED/ENABLED/g' chrooted.sh fi WORKDIR=$(mktemp -d) @@ -27,5 +28,6 @@ sudo rm -rf $WORKDIR if [[ "$MODE" == "cli" ]]; then sed -i 's/#gnome/gnome/g' ${prof}/packages.x86_64 sed -i 's/#mesa/mesa/g' ${prof}/packages.x86_64 - sed -i 's/#systemctl/systemctl/g' chrooted.sh +else + sed -i 's/ENABLED/DISABLED/g' chrooted.sh fi \ No newline at end of file diff --git a/chrooted.sh b/chrooted.sh index bde6be3..53abf32 100644 --- a/chrooted.sh +++ b/chrooted.sh @@ -1,4 +1,11 @@ #!/bin/bash + +GRAPHICAL="DISABLED" + +echo "New system chroot running as $(whoami)" +printf "We're in the new system." +#read + # This file is run via mkarchiso while chrooted as the new system echo "We're in the new system. :)" echo "Performing minor tweaks" @@ -12,16 +19,24 @@ echo "sudo reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirro chmod +x /usr/bin/mirrorsetup # We don't add crystal until here so that our packages which change # /etc/skel have been installed already -/usr/bin/useradd -m crystal -/usr/bin/usermod -p $(echo "crystal" | openssl passwd -6 -stdin) crystal -/usr/bin/usermod -p $(echo "crystal" | openssl passwd -6 -stdin) root +useradd -m crystal +usermod -p $(echo "crystal" | openssl passwd -6 -stdin) crystal +usermod -p $(echo "crystal" | openssl passwd -6 -stdin) root echo "menu" >> /home/crystal/.bashrc if [[ -d /etc/crystal/bootopts ]]; then chmod +x /etc/crystal/bootopts/* fi -systemctl enable gdm + +if [[ "$GRAPHICAL" == "DISABLED" ]]; then + echo "export XDG_SESSION_TYPE=x11" > /home/crystal/.xinitrc + echo "export GDK_BACKEND=x11" >> /home/crystal/.xinitrc + echo "exec gnome-session" >> /home/crystal/.xinitrc + chown crystal:crystal /home/crystal/.xinitrc + chmod +x /home/crystal/.xinitrc +fi + # i'm tired ok echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen locale-gen echo "LANG=en_US.UTF-8" > /etc/locale.conf -echo "Configured the system user. Exiting chroot." \ No newline at end of file +echo "Configured the system. Exiting chroot." \ No newline at end of file diff --git a/crystal/airootfs/etc/buildstamp b/crystal/airootfs/etc/buildstamp index 3630f80..e9b03b4 100644 --- a/crystal/airootfs/etc/buildstamp +++ b/crystal/airootfs/etc/buildstamp @@ -1 +1 @@ -Built on 05/08/21 @ 19:29:02 EST +Built on 05/08/21 @ 21:09:12 EST diff --git a/crystal/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf b/crystal/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf index 4df51e0..39378dd 100644 --- a/crystal/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf +++ b/crystal/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -1,3 +1,3 @@ [Service] ExecStart= -ExecStart=-/sbin/agetty --autologin carly --noclear %I 38400 linux \ No newline at end of file +ExecStart=-/sbin/agetty --autologin crystal --noclear %I 38400 linux \ No newline at end of file