summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2009-11-06 15:05:55 -0500
committerPeter Jones <pjones@redhat.com>2009-11-09 13:15:20 -0500
commit78899f07647a5ca7bc40c86434160ed53433e777 (patch)
tree7f1bfb3395afd7baebb87b92b0f8f1052c9cfa2d
parent6ef3465dd658dfa6c4981b341caa1e1e13f768df (diff)
downloadanaconda-78899f07647a5ca7bc40c86434160ed53433e777.tar.gz
anaconda-78899f07647a5ca7bc40c86434160ed53433e777.tar.xz
anaconda-78899f07647a5ca7bc40c86434160ed53433e777.zip
Allow remote(ish) debugging.
This changes SIGUSR2 to start a debugger that you can telnet to on port 8080. At the moment you need to do "C-] mode char\n" in your telnet client to get it into character mode instead of line mode.
-rwxr-xr-xanaconda10
-rwxr-xr-xscripts/upd-instroot6
2 files changed, 14 insertions, 2 deletions
diff --git a/anaconda b/anaconda
index 2f0ca53d6..ed9b6ae67 100755
--- a/anaconda
+++ b/anaconda
@@ -443,6 +443,10 @@ def startSsh():
os.execv("/sbin/sshd", args)
sys.exit(1)
+def startDebugger(signum, frame):
+ import epdb
+ epdb.serve(skip=1)
+
class Anaconda:
def __init__(self):
self.intf = None
@@ -631,6 +635,12 @@ if __name__ == "__main__":
setupEnvironment()
+ pidfile = open("/var/run/anaconda.pid", "w")
+ pidfile.write("%s\n" % (os.getpid(),))
+ del pidfile
+ # add our own additional signal handlers
+ signal.signal(signal.SIGHUP, startDebugger)
+
# we need to do this really early so we make sure its done before rpm
# is imported
iutil.writeRpmPlatform()
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index c1127874a..a479f5a12 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -185,12 +185,12 @@ PACKAGES="GConf2 NetworkManager ORBit2 acl anaconda
openldap openssh openssh-server
pam pango parted pciutils pcre psmisc
pygtk2-libglade pykickstart pyparted python python-bugzilla python-decorator
- python-libs python-nss python-pyblock python-sqlite
+ python-libs python-nss python-pyblock python-sqlite python-epdb
python-urlgrabber python-volume_key pyxf86config readline redhat-artwork
reiserfs-utils rpm rpm-libs rpm-python sed selinux-policy-targeted
setup slang smc-meera-fonts specspo sqlite synaptics system-config-date
system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release taipeifonts tcp_wrappers
- sysvinit-tools
+ sysvinit-tools telnet
tzdata udev un-core-dotum-fonts urw-fonts util-linux-ng tigervnc-server
tigervnc-server-module vlgothic-fonts vim-minimal
wget wpa_supplicant xkeyboard-config xfsprogs xorg-x11-xauth
@@ -530,6 +530,7 @@ usr/bin/syslinux
usr/bin/tac
usr/bin/tail
usr/bin/tee
+usr/bin/telnet
usr/bin/tilo
usr/bin/top
usr/bin/wc
@@ -552,6 +553,7 @@ usr/lib/anaconda/storage/formats
usr/lib/kernel-wrapper
usr/lib/locale
usr/lib/python?.?
+usr/lib/python?.?/site-packages/epdb/*.py
usr/lib/rpm/macros
usr/lib/rpm/rpmpopt
usr/lib/rpm/rpmrc