Add boot message, disable autolaunch, change PS1

Add a message printed on boot that gives basic information and
instructions to login as root and run clr-installer to install onto this
sytem.

Also change $PS1 on the installer image after logged in to
indicate we're booted into a live image.

Remove clr-installer.service from the Makefile and remove all the
toggling on or off from the yaml files.

Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
This commit is contained in:
Brian J Lovin
2019-04-26 17:48:23 -07:00
committed by Mark Horn
parent efc7335fbc
commit c136712772
8 changed files with 26 additions and 23 deletions
-2
View File
@@ -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
-16
View File
@@ -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
+14
View File
@@ -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
-1
View File
@@ -40,5 +40,4 @@ pre-install: [
]
post-install: [
{cmd: "scripts/developer-image-post.sh ${chrootDir}"},
{cmd: "systemctl enable clr-installer", chroot: true}
]
+6
View File
@@ -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
-1
View File
@@ -45,5 +45,4 @@ kernel-arguments: {
post-install: [
{cmd: "scripts/installer-post.sh ${chrootDir}"},
{cmd: "systemctl enable clr-installer", chroot: true}
]
-3
View File
@@ -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/
+6
View File
@@ -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