diff --git a/Makefile b/Makefile index b001bba..d435d41 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,6 @@ install-common: @install -D -m 644 $(top_srcdir)/etc/clr-installer.yaml $(CONFIG_DIR)/clr-installer.yaml @install -D -m 644 $(top_srcdir)/etc/bundles.json $(CONFIG_DIR)/bundles.json @install -D -m 644 $(top_srcdir)/etc/kernels.json $(CONFIG_DIR)/kernels.json - @install -D -m 644 $(top_srcdir)/etc/systemd/clr-installer.service $(SYSTEMD_DIR)/clr-installer.service @install -D -m 644 $(top_srcdir)/etc/chpasswd $(CONFIG_DIR)/chpasswd install-tui: build-tui install-common @@ -120,7 +119,6 @@ uninstall: @rm -f $(CONFIG_DIR)/bundles.json @rm -f $(CONFIG_DIR)/kernels.json @rm -f $(DESKTOP_DIR)/clr-installer.desktop - @rm -f $(SYSTEMD_DIR)/clr-installer.service @rm -f $(CONFIG_DIR)/chpasswd @rm -f $(DESTDIR)/var/lib/clr-installer/clr-installer.yaml diff --git a/etc/systemd/clr-installer.service b/etc/systemd/clr-installer.service deleted file mode 100644 index 0ca3c8e..0000000 --- a/etc/systemd/clr-installer.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=clear linux installer -After=getty.target -Conflicts=getty@tty1.service - -[Service] -Type=oneshot -ExecStart=/usr/bin/clr-installer -ExecStartPost=/usr/bin/reboot -StandardInput=tty -StandardOutput=tty -StandardError=tty -TTYPath=/dev/tty1 - -[Install] -WantedBy=multi-user.target diff --git a/scripts/add-login-issue.sh b/scripts/add-login-issue.sh new file mode 100755 index 0000000..028804c --- /dev/null +++ b/scripts/add-login-issue.sh @@ -0,0 +1,14 @@ +#!/bin/bash +echo "Creating custom issue file for $1" + +echo "Welcome to the Clear Linux* OS live image! + + * Documentation: https://clearlinux.org/documentation + * Community Support: https://clearlinux.org/community + +To install Clear Linux* OS onto this sytem please login as root, +enter a new temporary password, and run: +clr-installer +" >> $1/etc/issue + +exit 0 diff --git a/scripts/developer-image.yaml b/scripts/developer-image.yaml index 728a6a3..90c51ca 100644 --- a/scripts/developer-image.yaml +++ b/scripts/developer-image.yaml @@ -40,5 +40,4 @@ pre-install: [ ] post-install: [ {cmd: "scripts/developer-image-post.sh ${chrootDir}"}, - {cmd: "systemctl enable clr-installer", chroot: true} ] diff --git a/scripts/installer-post.sh b/scripts/installer-post.sh index 5bfea13..24b22ef 100755 --- a/scripts/installer-post.sh +++ b/scripts/installer-post.sh @@ -8,4 +8,10 @@ scripts/local-telemetry-post.sh ${CHROOTPATH} # Delay booting to give user a change to change boot params scripts/wait-to-boot-post.sh ${CHROOTPATH} +# Add issue (pre-login message) to inform user of how to run the installer +scripts/add-login-issue.sh ${CHROOTPATH} + +# Add changes to PS1 to indicate live image +scripts/ps1-override.sh ${CHROOTPATH} + exit 0 diff --git a/scripts/installer.yaml b/scripts/installer.yaml index 629c4c2..ccc645e 100644 --- a/scripts/installer.yaml +++ b/scripts/installer.yaml @@ -45,5 +45,4 @@ kernel-arguments: { post-install: [ {cmd: "scripts/installer-post.sh ${chrootDir}"}, - {cmd: "systemctl enable clr-installer", chroot: true} ] diff --git a/scripts/live-desktop-post-install.sh b/scripts/live-desktop-post-install.sh index 7dd4891..961dbd4 100755 --- a/scripts/live-desktop-post-install.sh +++ b/scripts/live-desktop-post-install.sh @@ -28,9 +28,6 @@ chroot $CHROOTPATH usermod -a -G wheelnopw clrlinux chroot $CHROOTPATH usermod -u 1001 clrlinux chroot $CHROOTPATH passwd -d clrlinux -# Disable the clr-installer system service on boot -echo "Disabling clr-installer on boot for $1" -chroot $CHROOTPATH systemctl disable clr-installer chroot $CHROOTPATH systemd-machine-id-setup mkdir -p $GDM_DIR/ diff --git a/scripts/ps1-override.sh b/scripts/ps1-override.sh new file mode 100755 index 0000000..81fa7d3 --- /dev/null +++ b/scripts/ps1-override.sh @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Setting custom PS1 terminal prompt $1" + +echo "PS1='\[\e[38;5;39m\]\u\[\e[0m\]@\[\e[38;5;208m\]clr-live \[\e[38;5;39m\]\w \[\e[38;5;39m\]# \[\e[0;0m\]'" >> $1/etc/profile + +exit 0