diff options
author | Matt Wilson <msw@redhat.com> | 2000-02-14 23:18:12 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-02-14 23:18:12 +0000 |
commit | 6e2f78dfcf8b86b28da34e25f7faba82d1e51618 (patch) | |
tree | d46db67568f28ac0a9bbd699d47fcee66fada1f7 | |
parent | 20b9dd22ef215a55030dc7f05d0d040db8f37c2c (diff) | |
download | anaconda-6e2f78dfcf8b86b28da34e25f7faba82d1e51618.tar.gz anaconda-6e2f78dfcf8b86b28da34e25f7faba82d1e51618.tar.xz anaconda-6e2f78dfcf8b86b28da34e25f7faba82d1e51618.zip |
added raidstart and raidstop
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | command-stubs/raidstart-stub | 38 | ||||
-rwxr-xr-x | command-stubs/raidstop-stub | 25 | ||||
-rwxr-xr-x | raidstart-stub | 38 | ||||
-rwxr-xr-x | raidstop-stub | 25 | ||||
-rwxr-xr-x | upd-instroot | 3 |
6 files changed, 130 insertions, 1 deletions
@@ -86,6 +86,8 @@ install: all mkdir -p $(DESTDIR)/usr/bin mkdir -p $(DESTDIR)/$(PYTHONLIBDIR) cp -a anaconda $(DESTDIR)/usr/bin + cp -a raidstart-stub $(DESTDIR)/$(PYTHONLIBDIR) + cp -a raidstop-stub $(DESTDIR)/$(PYTHONLIBDIR) cp -var $(PYFILES) $(DESTDIR)/$(PYTHONLIBDIR) cp -a lang-table $(DESTDIR)/$(PYTHONLIBDIR) ./py-compile --basedir $(DESTDIR)/$(PYHTONLIBDIR) $(PYFILES) diff --git a/command-stubs/raidstart-stub b/command-stubs/raidstart-stub new file mode 100755 index 000000000..77e87c952 --- /dev/null +++ b/command-stubs/raidstart-stub @@ -0,0 +1,38 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('rpmmodule')): + sys.path.append('rpmmodule') + sys.path.append('libfdisk') + sys.path.append('balkan') + sys.path.append('kudzu') + sys.path.append('gnome-map') + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import raid +import isys +from sys import argv + +if len(argv) != 2 or argv[1][:7] != "/dev/md": + print "usage: raidstart /dev/md[minornum]" + sys.exit(1) + +targMinor = int(argv[1][7:]) + +drives = isys.hardDriveDict().keys() +drives.sort (isys.compareDrives) + +raidDevices = raid.scanForRaid(drives) +for (minor, devices) in raidDevices: + if targMinor == minor: + devName = "md%d" % (minor,) + isys.raidstart(devName, devices[0]) + sys.exit(0) + +print "could not find devices associated with raid device md%d" % targMinor +sys.exit(1) diff --git a/command-stubs/raidstop-stub b/command-stubs/raidstop-stub new file mode 100755 index 000000000..7e12d3ac5 --- /dev/null +++ b/command-stubs/raidstop-stub @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('rpmmodule')): + sys.path.append('rpmmodule') + sys.path.append('libfdisk') + sys.path.append('balkan') + sys.path.append('kudzu') + sys.path.append('gnome-map') + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import raid +import isys +from sys import argv + +if len(argv) != 2 or argv[1][:7] != "/dev/md": + print "usage: raidstop /dev/md[minornum]" + sys.exit(1) + +isys.raidstop(argv[1][5:]) diff --git a/raidstart-stub b/raidstart-stub new file mode 100755 index 000000000..77e87c952 --- /dev/null +++ b/raidstart-stub @@ -0,0 +1,38 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('rpmmodule')): + sys.path.append('rpmmodule') + sys.path.append('libfdisk') + sys.path.append('balkan') + sys.path.append('kudzu') + sys.path.append('gnome-map') + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import raid +import isys +from sys import argv + +if len(argv) != 2 or argv[1][:7] != "/dev/md": + print "usage: raidstart /dev/md[minornum]" + sys.exit(1) + +targMinor = int(argv[1][7:]) + +drives = isys.hardDriveDict().keys() +drives.sort (isys.compareDrives) + +raidDevices = raid.scanForRaid(drives) +for (minor, devices) in raidDevices: + if targMinor == minor: + devName = "md%d" % (minor,) + isys.raidstart(devName, devices[0]) + sys.exit(0) + +print "could not find devices associated with raid device md%d" % targMinor +sys.exit(1) diff --git a/raidstop-stub b/raidstop-stub new file mode 100755 index 000000000..7e12d3ac5 --- /dev/null +++ b/raidstop-stub @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import os +import sys + +# for testing +if (os.path.exists('rpmmodule')): + sys.path.append('rpmmodule') + sys.path.append('libfdisk') + sys.path.append('balkan') + sys.path.append('kudzu') + sys.path.append('gnome-map') + sys.path.append('isys') + +sys.path.append('/usr/lib/anaconda') + +import raid +import isys +from sys import argv + +if len(argv) != 2 or argv[1][:7] != "/dev/md": + print "usage: raidstop /dev/md[minornum]" + sys.exit(1) + +isys.raidstop(argv[1][5:]) diff --git a/upd-instroot b/upd-instroot index a0811d1b1..4ff23e5dc 100755 --- a/upd-instroot +++ b/upd-instroot @@ -76,7 +76,6 @@ sbin/mkswap sbin/probe sbin/fdisk sbin/mkraid -sbin/raidstart etc/nsswitch.conf lib/ld-* lib/libc* @@ -363,6 +362,8 @@ make install DESTDIR=$DESTGR > /dev/null for p in $DESTGR $DEST; do rm $p/usr/lib/anaconda/lang-table + ln -s ../lib/anaconda/raidstart-stub $p/usr/bin/raidstart + ln -s ../lib/anaconda/raidstop-stub $p/usr/bin/raidstop find $p -type d | xargs chmod 755 |