summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-01-11 16:50:07 +0000
committerErik Troan <ewt@redhat.com>2000-01-11 16:50:07 +0000
commit0a899eb9bee2b1780d7b6bcead1a968b2d97efd4 (patch)
tree77aeaf85ab98cd7429b393b11e53e2377704c190 /kickstart.py
parent584a2684c826777076df4bce16279f0a105fdc16 (diff)
downloadanaconda-0a899eb9bee2b1780d7b6bcead1a968b2d97efd4.tar.gz
anaconda-0a899eb9bee2b1780d7b6bcead1a968b2d97efd4.tar.xz
anaconda-0a899eb9bee2b1780d7b6bcead1a968b2d97efd4.zip
merged in lilocheck from 6.1.1.1
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/kickstart.py b/kickstart.py
index 091a97c5f..213ca87bb 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -1,4 +1,5 @@
import isys
+import os
from installclass import InstallClass
from installclass import FSEDIT_CLEAR_LINUX
from installclass import FSEDIT_CLEAR_ALL
@@ -16,6 +17,9 @@ class Kickstart(InstallClass):
if (str == '--iscrypted'):
isCrypted = 1
+ if len(extra[0]) != 1:
+ raise ValueError, "a single argument is expected to rootPw"
+
InstallClass.doRootPw(self, extra[0], isCrypted = isCrypted)
self.addToSkipList("accounts")
@@ -76,6 +80,18 @@ class Kickstart(InstallClass):
self.setLiloInformation(location, linear, appendLine)
self.addToSkipList("lilo")
+ def doLiloCheck (self, args):
+ drives = isys.hardDriveList ().keys()
+ drives.sort(isys.compareDrives)
+ device = drives[0]
+ isys.makeDevInode(device, '/tmp/' + device)
+ fd = os.open('/tmp/' + device, os.O_RDONLY)
+ os.unlink('/tmp/' + device)
+ block = os.read(fd, 512)
+ os.close(fd)
+ if block[6:10] == "LILO":
+ sys.exit(0)
+
def doTimezone(self, args):
(args, extra) = isys.getopt(args, '',
[ 'utc' ])
@@ -91,11 +107,15 @@ class Kickstart(InstallClass):
self.addToSkipList("timezone")
+
def doXconfig(self, args):
(args, extra) = isys.getopt(args, '',
[ 'server=', 'card=', 'monitor=', 'hsync=', 'vsync=',
'startxonboot', 'noprobe' ])
+ if extra:
+ raise ValueError, "unexpected arguments to xconfig command"
+
server = None
card = None
monitor = None
@@ -233,11 +253,13 @@ class Kickstart(InstallClass):
"cdrom" : None ,
"clearpart" : self.doClearPart ,
"device" : None ,
+ "driverdisk" : None ,
"harddrive" : None ,
"install" : self.doInstall ,
"keyboard" : self.doKeyboard ,
"lang" : self.doLang ,
"lilo" : self.doLilo ,
+ "lilocheck" : self.doLiloCheck ,
"mouse" : self.doMouse ,
"network" : self.doNetwork ,
"nfs" : None ,
@@ -341,6 +363,9 @@ class Kickstart(InstallClass):
elif str == '--ondisk':
device = arg
+ if len(extra) != 1:
+ raise ValueError, "partition command requires one anonymous argument"
+
if onPart:
self.addToFstab(extra[0], onPart)
else: