main/postmarketos-mkinitfs-hook-debug-shell: fix launching telnet (MR 4350)
With the recent changes in commit 80fff9242, there's no longer an $IP
variable we can use. Use the same code as in init_functions.sh to get
the potentially customized IP address to use for telnet.
This commit is contained in:
@@ -40,7 +40,9 @@ echo "Start the telnet daemon"
|
|||||||
echo "sh"
|
echo "sh"
|
||||||
} >/telnet_connect.sh
|
} >/telnet_connect.sh
|
||||||
chmod +x /telnet_connect.sh
|
chmod +x /telnet_connect.sh
|
||||||
telnetd -b "${IP}:${TELNET_PORT}" -l /telnet_connect.sh
|
|
||||||
|
host_ip="${unudhcpd_host_ip:-172.16.42.1}"
|
||||||
|
telnetd -b "${host_ip}:${TELNET_PORT}" -l /telnet_connect.sh
|
||||||
|
|
||||||
# mount pstore, if possible
|
# mount pstore, if possible
|
||||||
if [ -d /sys/fs/pstore ]; then
|
if [ -d /sys/fs/pstore ]; then
|
||||||
@@ -52,7 +54,7 @@ mount -t debugfs none /sys/kernel/debug || true
|
|||||||
ln -s /sys/kernel/debug /d
|
ln -s /sys/kernel/debug /d
|
||||||
|
|
||||||
echo "---"
|
echo "---"
|
||||||
echo "WARNING: debug-shell is active on ${IP}:${TELNET_PORT}."
|
echo "WARNING: debug-shell is active on ${host_ip}:${TELNET_PORT}."
|
||||||
echo "This is a security hole! Only use it for debugging, and"
|
echo "This is a security hole! Only use it for debugging, and"
|
||||||
echo "uninstall the debug-shell hook afterwards!"
|
echo "uninstall the debug-shell hook afterwards!"
|
||||||
echo "---"
|
echo "---"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
pkgname=postmarketos-mkinitfs-hook-debug-shell
|
pkgname=postmarketos-mkinitfs-hook-debug-shell
|
||||||
pkgver=0.4.5
|
pkgver=0.4.6
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="Root shell in the initramfs (security hole, for debugging only)"
|
pkgdesc="Root shell in the initramfs (security hole, for debugging only)"
|
||||||
url="https://postmarketos.org"
|
url="https://postmarketos.org"
|
||||||
@@ -17,6 +17,6 @@ package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
90829cc17d62932730720d6a4d205c9e0093303f6d09865a4d4e83e08677cf4005cf38b02cde546082d60cf97264ddf60b4d76893d0f87e3bda4729bc04a171a 20-debug-shell.sh
|
0afe6aebeef653f7d61d37f69814df3ddb690a14f2c9326f02eabfcfb46aa168c45bd89e31145a6857f3641a89671d9e19d491065b5900300281af7208ca0efc 20-debug-shell.sh
|
||||||
845d2eb6ab72c5c1472d65305241ca21dbc26784684e9ae99a180a255f8f7f62123b363d73c642df1f9687106340078311a68a76c123f16829b941bff9151735 20-debug-shell.files
|
845d2eb6ab72c5c1472d65305241ca21dbc26784684e9ae99a180a255f8f7f62123b363d73c642df1f9687106340078311a68a76c123f16829b941bff9151735 20-debug-shell.files
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user