summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-03-02 15:59:13 -0500
committerAndrew Cady <d@cryptonomic.net>2021-03-02 15:59:13 -0500
commit5b387f9340394c076af72890a8cd24d287f8af73 (patch)
tree01a66b877c5d0ec84396f8caa336bf9bce4a7432
parent56948a7d5f31ed83bc9aa3ed5b977e93da4327c1 (diff)
initrd: improve console logging
-rw-r--r--initramfs-tools/scripts/samizdat18
1 files changed, 14 insertions, 4 deletions
diff --git a/initramfs-tools/scripts/samizdat b/initramfs-tools/scripts/samizdat
index 71d7f17..d72ef8c 100644
--- a/initramfs-tools/scripts/samizdat
+++ b/initramfs-tools/scripts/samizdat
@@ -47,6 +47,12 @@ write_resolv_dot_conf()
47 fi 47 fi
48} 48}
49 49
50get_os_name()
51{
52 [ -r /root/etc/os-release ] && . /root/etc/os-release
53 echo -n ${PRETTY_NAME:-Debian GNU/Linux}
54}
55
50mountroot() 56mountroot()
51{ 57{
52 openvt -c 13 sh 58 openvt -c 13 sh
@@ -66,14 +72,18 @@ mountroot()
66 samizdat_install_udev_rules 72 samizdat_install_udev_rules
67 bootwait samizdat-gpg 73 bootwait samizdat-gpg
68 bootwait root-mounted 74 bootwait root-mounted
75 osname=$(get_os_name)
69 write_resolv_dot_conf 76 write_resolv_dot_conf
70 chvt 1 77 chvt 1
71 clear >/dev/tty1
72 cat >/dev/tty1 <<EOF 78 cat >/dev/tty1 <<EOF
79 Success!
80
81Samizdat has mounted the rootfs.
82
83Control now goes to ${osname}.
73 84
74Success: Samizdat mounted the rootfs. 85A login prompt should appear shortly.
75Debian initramfs tools will now boot the rootfs. 86Press alt-f9 for rescue terminal.
76This should only take a minute. Press alt-f9 for rescue terminal.
77EOF 87EOF
78} 88}
79 89