summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-08 01:21:57 +0000
committerErik Troan <ewt@redhat.com>1999-09-08 01:21:57 +0000
commit439ca96218257524676f84b22fcfa4b65f95b6d4 (patch)
tree4f5abdbb9f885d76189966bf97d9c1686750964a
parent9932bdbafde50da2e9a21e3ff7c6a95c5356abbf (diff)
downloadanaconda-439ca96218257524676f84b22fcfa4b65f95b6d4.tar.gz
anaconda-439ca96218257524676f84b22fcfa4b65f95b6d4.tar.xz
anaconda-439ca96218257524676f84b22fcfa4b65f95b6d4.zip
use argument parsing code from popt
-rwxr-xr-xanaconda12
-rw-r--r--kickstart.py14
2 files changed, 16 insertions, 10 deletions
diff --git a/anaconda b/anaconda
index 5e3d95a01..ab1f1727e 100755
--- a/anaconda
+++ b/anaconda
@@ -1,21 +1,28 @@
#!/usr/bin/python
-import sys, getopt, os
+import sys, os
import gettext
import traceback
import string
+if (os.path.exists('isys')):
+ sys.path.append('isys')
+
+import isys
+
setverPath = None
gettext.bindtextdomain("anaconda", "/usr/share/locale")
gettext.textdomain("anaconda")
_ = gettext.gettext
-(args, extra) = getopt.getopt(sys.argv[1:], 'GTtdr:fm:',
+(args, extra) = isys.getOpt(sys.argv[1:], 'GTtdr:fm:',
[ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'expert'])
+print "got args", args
+
# remove the arguments - gnome_init doesn't understand them
for arg in sys.argv[1:]:
sys.argv.remove (arg)
@@ -74,7 +81,6 @@ if (not test and not localInstall and os.getpid() > 50):
if (os.path.exists('rpmmodule')):
sys.path.append('rpmmodule')
- sys.path.append('isys')
sys.path.append('libfdisk')
sys.path.append('balkan')
sys.path.append('kudzu')
diff --git a/kickstart.py b/kickstart.py
index f33a2f873..9cf50ffe9 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -2,13 +2,12 @@ import isys
from installclass import InstallClass
from installclass import FSEDIT_CLEAR_LINUX
from installclass import FSEDIT_CLEAR_ALL
-import getopt
import sys
class Kickstart(InstallClass):
def doRootPw(self, args):
- (args, extra) = getopt.getopt(args, '', [ 'iscrypted=' ])
+ (args, extra) = isys.getopt(args, '', [ 'iscrypted=' ])
isCrypted = 0
for n in args:
@@ -20,7 +19,7 @@ class Kickstart(InstallClass):
self.addToSkipList("accounts")
def doAuthconfig(self, args):
- (args, extra) = getopt.getopt(args, '',
+ (args, extra) = isys.getopt(args, '',
[ 'enablenis', 'nisdomain=', 'nisserver=', 'useshadow',
'enablemd5' ])
@@ -51,7 +50,7 @@ class Kickstart(InstallClass):
self.addToSkipList("authentication")
def doLilo (self, args):
- (args, extra) = getopt.getopt(args, '',
+ (args, extra) = isys.getopt(args, '',
[ 'append=', 'location=', 'linear' ])
appendLine = None
@@ -77,7 +76,7 @@ class Kickstart(InstallClass):
self.addToSkipList("lilo")
def doTimezone(self, args):
- (args, extra) = getopt.getopt(args, '',
+ (args, extra) = isys.getopt(args, '',
[ 'utc' ])
isUtc = 0
@@ -98,7 +97,7 @@ class Kickstart(InstallClass):
self.installType = "upgrade"
def doNetwork(self, args):
- (args, extra) = getopt.getopt(args, '',
+ (args, extra) = isys.getopt(args, '',
[ 'bootproto', 'ip', 'netmask', 'gateway', 'nameserver' ])
bootProto = "dhcp"
ip = None
@@ -167,7 +166,7 @@ class Kickstart(InstallClass):
grow = 0
maxSize = 0
- (args, extra) = getopt.getopt(args, '', [ 'size=', 'maxsize=',
+ (args, extra) = isys.getopt(args, '', [ 'size=', 'maxsize=',
'grow' ])
for n in args:
@@ -182,6 +181,7 @@ class Kickstart(InstallClass):
self.partitions.append((extra[0], size, maxSize, grow))
self.addToSkipList("partition")
+ self.addToSkipList("format")
def __init__(self, file):
InstallClass.__init__(self)