From 665a052c8c6bad96935ae22a231526d73485f640 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 11 Jun 2012 14:37:39 -0600 Subject: [PATCH] Working, tested p2 console --- packages/00admin/00admin.mk | 1 - packages/p2/bin/p2console | 14 +++++++------- packages/p2client/service/eth0/run | 8 +++++++- packages/p2client/service/p2client/p2connect | 13 +++++++++++-- packages/p2client/service/p2client/run | 8 ++++---- packages/tanks/service/tanksd/category.key | 1 - 6 files changed, 29 insertions(+), 16 deletions(-) mode change 100644 => 100755 packages/p2client/service/eth0/run delete mode 100644 packages/tanks/service/tanksd/category.key diff --git a/packages/00admin/00admin.mk b/packages/00admin/00admin.mk index 0e2b83c..e47065a 100644 --- a/packages/00admin/00admin.mk +++ b/packages/00admin/00admin.mk @@ -8,7 +8,6 @@ endif 00admin-build: $(00ADMIN_BUILDDIR)/build $(00ADMIN_BUILDDIR)/build: $(MAKE) -C packages/00admin/src - touch $< 00admin-install: $(00ADMIN_BUILDDIR)/build $(call COPYTREE, packages/00admin/service, $(00ADMIN_PKGDIR)/service) diff --git a/packages/p2/bin/p2console b/packages/p2/bin/p2console index f4d5a8d..a1f736b 100755 --- a/packages/p2/bin/p2console +++ b/packages/p2/bin/p2console @@ -38,7 +38,7 @@ newteam () { printf '%s' "$name" > $BASE/$hash/.name cat < " + printf "p2> " read -r answer case "$answer" in \?|help) cat < $fn - echo "You get $points more points in the $cat category." + echo "You get $points more points in the $cat category." # run puzzles.cgi # update scoreboard fi diff --git a/packages/p2client/service/eth0/run b/packages/p2client/service/eth0/run old mode 100644 new mode 100755 index 563485f..4047474 --- a/packages/p2client/service/eth0/run +++ b/packages/p2client/service/eth0/run @@ -2,4 +2,10 @@ exec 2>&1 -exec udhcpc -f eth0 +if grep 'debug' /proc/cmdline; then + ip link set dev eth0 up + ip addr add dev eth0 10.0.0.110/24 + exec sleep 8d +else + exec udhcpc -f eth0 +fi diff --git a/packages/p2client/service/p2client/p2connect b/packages/p2client/service/p2client/p2connect index 7ccae18..f4d823a 100755 --- a/packages/p2client/service/p2client/p2connect +++ b/packages/p2client/service/p2client/p2connect @@ -3,5 +3,14 @@ # Try hard to look like a serial connection reset -echo 'RS232/0:1200-N81' -exec nc 10.0.0.2 56352 2>/dev/null + +# Print some bullshit to confuse people +printf 'RS232/0:1200-N81 ' + +# Simulate a green-phosphor CRT +printf '\033]P0111122\033]P788ff00\033]Pfff8800' + +# More bullshit +printf '[68]\n' + +exec nc 10.0.0.2 5555 2>/dev/null diff --git a/packages/p2client/service/p2client/run b/packages/p2client/service/p2client/run index 1f3b00f..3ab519d 100755 --- a/packages/p2client/service/p2client/run +++ b/packages/p2client/service/p2client/run @@ -8,14 +8,14 @@ if ! sv s tty1 | grep down; then exit fi +# Don't let C-A-F2 switch away +deallocvt + # Disable magic sysrq key echo 0 > /proc/sys/kernel/sysrq # Make this like a VT52; including disabling ctrl-alt-del -loadkmap /opt/p2client/dumbterm.kmap - -# Simulate a green-phosphor CRT -printf '\033]P0111122\033]P788ff00\033]Pfff8800' +loadkmap < /opt/p2client/dumbterm.kmap # Run the console! exec getty -n -l ./p2connect 38400 tty1 diff --git a/packages/tanks/service/tanksd/category.key b/packages/tanks/service/tanksd/category.key deleted file mode 100644 index 15df993..0000000 --- a/packages/tanks/service/tanksd/category.key +++ /dev/null @@ -1 +0,0 @@ -U'0½mòq§šp \ No newline at end of file