summaryrefslogtreecommitdiffstats
path: root/cobbler/action_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/action_import.py')
-rw-r--r--cobbler/action_import.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/cobbler/action_import.py b/cobbler/action_import.py
index 93593c9e..48f4b112 100644
--- a/cobbler/action_import.py
+++ b/cobbler/action_import.py
@@ -88,8 +88,8 @@ class Importer:
if self.arch == "x86":
# be consistent
self.arch = "i386"
- if self.arch not in [ "i386", "ia64", "ppc", "ppc64", "s390x", "x86_64", ]:
- raise CX(_("arch must be i386, ia64, ppc, ppc64, s390x or x86_64"))
+ if self.arch not in [ "i386", "ia64", "ppc", "ppc64", "s390", "s390x", "x86_64", ]:
+ raise CX(_("arch must be i386, ia64, ppc, ppc64, s390, s390x or x86_64"))
# if we're going to do any copying, set where to put things
# and then make sure nothing is already there.
@@ -113,7 +113,7 @@ class Importer:
if self.arch:
# append the arch path to the name if the arch is not already
# found in the name.
- for x in [ "i386", "ia64", "ppc", "ppc64", "s390x", "x86_64", "x86", ]:
+ for x in [ "i386", "ia64", "ppc", "ppc64", "s390", "s390x", "x86_64", "x86", ]:
if self.mirror_name.lower().find(x) != -1:
if self.arch != x :
raise CX(_("Architecture found on pathname (%s) does not fit the one given in command line (%s)")%(x,self.arch))
@@ -519,7 +519,7 @@ class Importer:
print "- following symlink: %s" % fullname
os.path.walk(fullname, self.distro_adder, foo)
- if x.startswith("initrd") or x.startswith("ramdisk.image.gz"):
+ if ( x.startswith("initrd") or x.startswith("ramdisk.image.gz") ) and x != "initrd.size":
initrd = os.path.join(dirname,x)
if ( x.startswith("vmlinuz") or x.startswith("kernel.img") ) and x.find("initrd") == -1:
kernel = os.path.join(dirname,x)
@@ -774,7 +774,7 @@ class Importer:
name = name.replace("chrp","ppc64")
for separator in [ '-' , '_' , '.' ] :
- for arch in [ "i386" , "x86_64" , "ia64" , "ppc64", "ppc32", "ppc", "x86" , "s390x" , "386" , "amd" ]:
+ for arch in [ "i386" , "x86_64" , "ia64" , "ppc64", "ppc32", "ppc", "x86" , "s390", "s390x" , "386" , "amd" ]:
name = name.replace("%s%s" % ( separator , arch ),"")
return name
@@ -793,6 +793,8 @@ class Importer:
if dirname.find("i386") != -1 or dirname.find("386") != -1 or dirname.find("x86") != -1:
return "i386"
if dirname.find("s390") != -1:
+ return "s390"
+ if dirname.find("s390x") != -1:
return "s390x"
if dirname.find("ppc64") != -1 or dirname.find("chrp") != -1:
return "ppc64"
@@ -915,7 +917,7 @@ class BaseImporter:
for x in fnames:
if self.match_kernelarch_file(x):
# print _("- kernel header found: %s") % x
- for arch in [ "i386" , "x86_64" , "ia64" , "ppc64", "ppc", "s390x" ]:
+ for arch in [ "i386" , "x86_64" , "ia64" , "ppc64", "ppc", "s390", "s390x" ]:
if x.find(arch) != -1:
foo[arch] = 1
for arch in [ "i686" , "amd64" ]: