diff options
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | command-stubs/pump-stub | 36 | ||||
-rwxr-xr-x | pump-stub | 36 | ||||
-rwxr-xr-x | scripts/upd-instroot | 1 |
4 files changed, 74 insertions, 0 deletions
@@ -70,6 +70,7 @@ install: strip $(DESTDIR)/$(PYTHONLIBDIR)/*.so cp -a raid*stub $(DESTDIR)/$(PYTHONLIBDIR) cp -a losetup-stub $(DESTDIR)/$(PYTHONLIBDIR) + cp -a pump-stub $(DESTDIR)/$(PYTHONLIBDIR) for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done archive: create-archive diff --git a/command-stubs/pump-stub b/command-stubs/pump-stub new file mode 100755 index 000000000..936315358 --- /dev/null +++ b/command-stubs/pump-stub @@ -0,0 +1,36 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('isys')): + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import isys +from sys import argv + +def usage(): + print "usage: pump [-i device]" + sys.exit(1) + +iface = "eth0" + +argv = argv[1:] +while (argv): + if argv[0] == "-i": + if len(argv) < 2: usage() + iface = argv[1] + argv = argv[2:] + else: + usage() + +ns = isys.pumpNetDevice(iface) +if ns: + f = open("/etc/resolv.conf", "w") + f.write("nameserver %s\n" % ns) + f.close() + +sys.exit(0) diff --git a/pump-stub b/pump-stub new file mode 100755 index 000000000..936315358 --- /dev/null +++ b/pump-stub @@ -0,0 +1,36 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('isys')): + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import isys +from sys import argv + +def usage(): + print "usage: pump [-i device]" + sys.exit(1) + +iface = "eth0" + +argv = argv[1:] +while (argv): + if argv[0] == "-i": + if len(argv) < 2: usage() + iface = argv[1] + argv = argv[2:] + else: + usage() + +ns = isys.pumpNetDevice(iface) +if ns: + f = open("/etc/resolv.conf", "w") + f.write("nameserver %s\n" % ns) + f.close() + +sys.exit(0) diff --git a/scripts/upd-instroot b/scripts/upd-instroot index dbbd1ca06..e2cce6db3 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -532,6 +532,7 @@ for p in $DEST $DESTGR; do ln -s ../lib/anaconda/raidstart-stub $p/usr/bin/raidstart ln -s ../lib/anaconda/raidstop-stub $p/usr/bin/raidstop ln -s ../lib/anaconda/losetup-stub $p/usr/bin/losetup + ln -s ../lib/anaconda/pump-stub $p/usr/bin/pump mv $p/usr/sbin/anaconda $p/usr/bin/anaconda mv $p/usr/lib/anaconda-runtime/lib* $p/usr/lib |