Make Alpine start with nomodeset and custom tty prompt

This commit is contained in:
Disassembler 2018-09-01 23:07:42 +02:00
parent c6c50bb3c5
commit 9baf26ce56
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
5 changed files with 12 additions and 16 deletions

View File

@ -18,6 +18,7 @@ cp ${SOURCE_DIR}/boot/extlinux.conf /boot/extlinux.conf
cp ${SOURCE_DIR}/boot/spotter.txt /boot/spotter.txt
cp ${SOURCE_DIR}/etc/inittab /etc/inittab
cp ${SOURCE_DIR}/sbin/extend-disk /sbin/extend-disk
cp ${SOURCE_DIR}/sbin/spotty /sbin/spotty
>/etc/motd
# Enable support for Czech characters
@ -41,7 +42,7 @@ wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh -O /usr/b
sed -i 's|$HOME/.$PROJECT_NAME|/etc/acme.sh.d|' /usr/bin/acme.sh
chmod +x /usr/bin/acme.sh
# Copy Spotter resources
# Copy Spotter AppMgr resources
cp ${SOURCE_DIR}/etc/init.d/spotter-appmgr /etc/init.d/spotter-appmgr
rc-update -u
cp -r ${SOURCE_DIR}/srv/spotter /srv/spotter

View File

@ -6,4 +6,4 @@ DISPLAY spotter.txt
LABEL vm
LINUX vmlinuz-virt
INITRD initramfs-virt
APPEND root=/dev/vg0/root modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4 cryptroot=/dev/sda2 cryptdm=system
APPEND root=/dev/vg0/root modules=sd-mod,usb-storage,ext4 nomodeset quiet rootfstype=ext4 cryptroot=/dev/sda2 cryptdm=system

View File

@ -6,8 +6,7 @@
::wait:/sbin/openrc default >/dev/null 2>&1
# Set up getty
::wait:/usr/bin/spotter-appmgr rebuild-issue >/dev/null 2>&1
tty1::respawn:/sbin/getty -l /sbin/nologin 38400 tty1
tty1::respawn:/sbin/getty -n -l /sbin/spotty 38400 tty1
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

8
basic/sbin/spotty Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
# Rebuild /etc/issue
/usr/bin/spotter-appmgr rebuild-issue
# Remove double-escaping needed for the real /etc/issue
/bin/sed 's|\\\\|\\|g' /etc/issue
# Wait for key press
read a

View File

@ -91,31 +91,20 @@ ISSUE_TEMPLATE = '''
| |
|_|\x1b[0m
\x1b[1;33mUPOZORNĚNÍ:\x1b[0m Neoprávněný přístup k tomuto zařízení je zakázán.
Musíte mít výslovné oprávnění k přístupu nebo konfiguraci tohoto zařízení.
Neoprávněné pokusy a kroky k přístupu nebo používání tohoto systému mohou mít
za následek občanské nebo trestní sankce.
\x1b[1;33mCAUTION:\x1b[0m Unauthozired access to this device is prohibited.
You must have explicit, authorized permission to access or configure this
device. Unauthorized attempts and actions to access or use this system may
result in civil or criminal penalties.
Pro přístup k aplikacím otevřete URL \x1b[1m{url}\x1b[0m ve Vašem
internetovém prohlížeči.
\x1b[0;30m
'''
@ -238,7 +227,6 @@ class AppMgr:
self.port = self.conf['host']['port'] = port
self.save_conf()
self.rebuild_nginx(restart_nginx)
self.rebuild_issue()
self.update_apps_urls()
def rebuild_nginx(self, restart_nginx):