summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>1999-11-12 21:35:25 +0000
committerMike Fulbright <msf@redhat.com>1999-11-12 21:35:25 +0000
commit288529a31576468d7d27ca1e9aec8a63ac973510 (patch)
treeaab56db9f4f406e2a7a6b321bed746a7ed09c9fc /anaconda
parent3230f88eef53294ac71019f620c998e98b62af77 (diff)
downloadanaconda-288529a31576468d7d27ca1e9aec8a63ac973510.tar.gz
anaconda-288529a31576468d7d27ca1e9aec8a63ac973510.tar.xz
anaconda-288529a31576468d7d27ca1e9aec8a63ac973510.zip
Several changes to build structure - contact Dr Mike if you hit problems.
I've made most of the Makefile's use the Makefile.inc include in the root of the anaconda src tree to get the python path, instead of having it defined in many different places. In the top level Makefile I added a install target called install-unconfig. This target installs the anaconda script and associated support files with the intention of being able to run anaconda in unconfig mode after a successful install. This mode is automatically selected if the executed script is called 'anaconda-unconfig', or the '-U' command line parameter is used.
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda38
1 files changed, 29 insertions, 9 deletions
diff --git a/anaconda b/anaconda
index b519106bc..15f2d1770 100755
--- a/anaconda
+++ b/anaconda
@@ -2,13 +2,19 @@
import sys, os
+#
+# only used by anaconda in unconfig mode
+#
+sys.path.append('/usr/lib/anaconda')
+
# Python passed my path as argv[0]!
# if sys.argv[0][-7:] == "syslogd":
-if sys.argv[1] == "--syslogd":
- from syslogd import Syslogd
- root = sys.argv[2]
- output = sys.argv[3]
- syslog = Syslogd (root, open (output, "w+"))
+if len(sys.argv) > 1:
+ if sys.argv[1] == "--syslogd":
+ from syslogd import Syslogd
+ root = sys.argv[2]
+ output = sys.argv[3]
+ syslog = Syslogd (root, open (output, "w+"))
if (os.path.exists('isys')):
sys.path.append('isys')
@@ -22,12 +28,15 @@ import iutil
setverPath = None
+# save because we munge argv below
+[execname] = string.split(sys.argv[0], '/')[-1:]
+
gettext.bindtextdomain("anaconda", "/usr/share/locale")
gettext.textdomain("anaconda")
_ = gettext.gettext
-(args, extra) = isys.getopt(sys.argv[1:], 'GTtdr:fm:',
- [ 'gui', 'text', 'test', 'debug', 'method=', 'rootpath=',
+(args, extra) = isys.getopt(sys.argv[1:], 'GTUtdr:fm:',
+ [ 'gui', 'text', 'unconfig', 'test', 'debug', 'method=', 'rootpath=',
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'lang=', 'keymap=', 'kbdtype=', 'module=',
'expert', 'serial' ])
@@ -63,6 +72,8 @@ for n in args:
mode = 'g'
elif (str == '-T' or str == '--text'):
mode = 't'
+ elif (str == '-U' or str == '--unconfig'):
+ mode = 'u'
elif (str == '-t' or str == '--test'):
test = 1
elif (str == '--module'):
@@ -93,7 +104,13 @@ for n in args:
elif (str == '--kbdtype'):
kbdtype = arg
-if (not method):
+# see how we were run, override command line mode selection
+if (execname == "anaconda-unconfig"):
+ print "overriding to unconfig mode based on exec name"
+ mode = 'u'
+
+
+if (mode != 'u' and not method):
print "no install method specified"
sys.exit(1)
@@ -101,7 +118,7 @@ if (debug):
import pdb
pdb.set_trace()
-if (not test and not localInstall and os.getpid() > 50):
+if (mode != 'u' and not test and not localInstall and os.getpid() > 50):
print "you're running me on a live system! that's incredibly stupid."
sys.exit(1)
@@ -147,6 +164,9 @@ if (mode == 'g'):
from gui import InstallInterface
elif (mode == 't'):
from text import InstallInterface
+elif (mode == 'u'):
+ print "Going to go into uninstall mode"
+ sys.exit(1)
else:
print "No mode was specified"
sys.exit(1)