pmaports/postmarketos-mkinitfs/10-usb-unlock.sh
Pablo Castellano ba528b24b8 Two trivial changes (typo + info message) (#179)
Thanks, Pablo Castellano!

* Fixed typo

* Guide user about what are the next steps after flashing kernel and password

* Increased postmarketos-mkinitfs' pkgver and rewording

Changes requested:
https://github.com/postmarketOS/pmbootstrap/pull/179
2017-07-19 18:05:34 +00:00

29 lines
582 B
Bash

#!/bin/sh
. ./init_functions.sh
TELNET_PORT=23
start_usb_unlock() {
# Only run if we have an encrypted partition
cryptsetup isLuks "$(find_root_partition)" || return
# Set up networking
setup_usb_network
start_udhcpd
# Telnet splash
show_splash /splash1.ppm.gz
# Start the telnet daemon
{
echo '#!/bin/sh'
echo '. /init_functions.sh'
echo 'unlock_root_partition'
echo 'echo_connect_ssh_message'
echo 'killall cryptsetup telnetd'
} >/telnet_connect.sh
chmod +x /telnet_connect.sh
telnetd -b "${IP}:${TELNET_PORT}" -l /telnet_connect.sh
}
start_usb_unlock