diff options
author | Erik Troan <ewt@redhat.com> | 1999-04-25 22:02:17 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-04-25 22:02:17 +0000 |
commit | 2ac2d7aa20b1b78f4a97a5a28ca186c0782af331 (patch) | |
tree | a3c1935653b5b300b311912625f4c851f4dd76ee /anaconda | |
parent | 347d4bd29728504afec46153edc0da36f5e5f722 (diff) | |
download | anaconda-2ac2d7aa20b1b78f4a97a5a28ca186c0782af331.tar.gz anaconda-2ac2d7aa20b1b78f4a97a5a28ca186c0782af331.tar.xz anaconda-2ac2d7aa20b1b78f4a97a5a28ca186c0782af331.zip |
use either text or gui interface, depending on command line args
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/anaconda b/anaconda new file mode 100755 index 000000000..c754dece6 --- /dev/null +++ b/anaconda @@ -0,0 +1,32 @@ +#!/usr/bin/python + +import sys, getopt, os + +(args, extra) = getopt.getopt(sys.argv[1:], 'gTt', [ 'gui', 'text', 'test' ]) + +mode = None +test = 0 + +for n in args: + (str, arg) = n + if (str == '-g' or str == '--gui'): + mode = 'g' + elif (str == '-T' or str == '--text'): + mode = 't' + elif (str == '-t' or str == '--test'): + test = 1 + +if (not test and os.getpid() > 10): + print "you're running me on a live system! that's incredibly stupid." + sys.exit(1) + +if (test): + sys.path.append('balkan') + +if (mode == 'g'): + import gui +elif (mode == 't'): + import text +else: + print "No mode was specified" + |