diff options
author | James Laska <jlaska@redhat.com> | 2008-12-16 07:51:22 -0500 |
---|---|---|
committer | James Laska <jlaska@redhat.com> | 2008-12-16 07:51:22 -0500 |
commit | 28d022474595e0e46c12720c7881ffce1376f755 (patch) | |
tree | bffe1e8376e8e9cfd58eddf9faf6ca4a5c7ae0a0 | |
parent | 42b3d812268d8920b6e0f76cdc5c39df78c4dc80 (diff) | |
parent | b176d471f7516e4027cd85cf505e0f8d2113eec5 (diff) | |
download | cobbler-28d022474595e0e46c12720c7881ffce1376f755.tar.gz cobbler-28d022474595e0e46c12720c7881ffce1376f755.tar.xz cobbler-28d022474595e0e46c12720c7881ffce1376f755.zip |
Merge commit 'origin/devel' into devel
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | cobbler/action_acl.py | 4 | ||||
-rw-r--r-- | cobbler/action_buildiso.py | 2 | ||||
-rw-r--r-- | cobbler/action_check.py | 8 | ||||
-rw-r--r-- | cobbler/action_import.py | 4 | ||||
-rw-r--r-- | cobbler/action_power.py | 2 | ||||
-rw-r--r-- | cobbler/action_replicate.py | 4 | ||||
-rw-r--r-- | cobbler/action_reposync.py | 25 | ||||
-rw-r--r-- | cobbler/action_validate.py | 1 | ||||
-rw-r--r-- | cobbler/api.py | 5 | ||||
-rw-r--r-- | cobbler/cobblerd.py | 2 | ||||
-rw-r--r-- | cobbler/kickgen.py | 1 | ||||
-rw-r--r-- | cobbler/pxegen.py | 11 | ||||
-rw-r--r-- | cobbler/remote.py | 8 | ||||
-rw-r--r-- | cobbler/services.py | 2 | ||||
-rw-r--r-- | cobbler/test_basic.py | 1 | ||||
-rw-r--r-- | cobbler/utils.py | 131 | ||||
-rw-r--r-- | snippets/redhat_register | 2 | ||||
-rw-r--r-- | webui_templates/distro_edit.tmpl | 7 |
19 files changed, 153 insertions, 68 deletions
@@ -20,6 +20,7 @@ Patches and other contributions from: Máirín Duffy <duffy@redhat.com> John Eckersberg <jeckersb@redhat.com> Dan Guernsey <danpg102@gmail.com> + Henry Kemp <henrykemp@gmail.com> Marcel Haerry <haerry+et@puzzle.ch> Dave Hatton <dave@davehatton.it> Scott Henson <shenson@redhat.com> diff --git a/cobbler/action_acl.py b/cobbler/action_acl.py index 35a4f204..7608713b 100644 --- a/cobbler/action_acl.py +++ b/cobbler/action_acl.py @@ -99,11 +99,11 @@ class AclConfig: cmd2 = "%s %s" % (cmd2,d) print "- setfacl -d %s" % cmd2 - rc = sub_process.call("setfacl -d %s" % cmd2,shell=True) + rc = sub_process.call("setfacl -d %s" % cmd2,shell=True,close_fds=True) if not rc == 0: raise CX(_("command failed")) print "- setfacl %s" % cmd2 - rc = sub_process.call("setfacl %s" % cmd2,shell=True) + rc = sub_process.call("setfacl %s" % cmd2,shell=True,close_fds=True) if not rc == 0: raise CX(_("command failed")) diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py index f94f059c..de95afb9 100644 --- a/cobbler/action_buildiso.py +++ b/cobbler/action_buildiso.py @@ -253,7 +253,7 @@ class BuildIso: cmd = cmd + " -boot-info-table -V Cobbler\ Install -R -J -T %s" % tempdir print _("- running: %s") % cmd - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc: raise CX(_("mkisofs failed")) diff --git a/cobbler/action_check.py b/cobbler/action_check.py index 2a3c8bec..99fffbb0 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -97,13 +97,13 @@ class BootCheck: rc = 0 if utils.check_dist() == "redhat": if os.path.exists("/etc/rc.d/init.d/%s" % which): - rc = sub_process.call("/sbin/service %s status >/dev/null 2>/dev/null" % which, shell=True) + rc = sub_process.call("/sbin/service %s status >/dev/null 2>/dev/null" % which, shell=True, close_fds=True) if rc != 0: status.append(_("service %s is not running%s") % (which,notes)) return False elif utils.check_dist() == "debian": if os.path.exists("/etc/init.d/%s" % which): - rc = sub_process.call("/etc/init.d/%s status /dev/null 2>/dev/null" % which, shell=True) + rc = sub_process.call("/etc/init.d/%s status /dev/null 2>/dev/null" % which, shell=True, close_fds=True) if rc != 0: status.append(_("service %s is not running%s") % which,notes) return False @@ -114,7 +114,7 @@ class BootCheck: def check_iptables(self, status): if os.path.exists("/etc/rc.d/init.d/iptables"): - rc = sub_process.call("/sbin/service iptables status >/dev/null 2>/dev/null", shell=True) + rc = sub_process.call("/sbin/service iptables status >/dev/null 2>/dev/null", shell=True, close_fds=True) if rc == 0: status.append(_("since iptables may be running, ensure 69, 80, %(syslog)s, and %(xmlrpc)s are unblocked") % { "syslog" : self.settings.syslog_port, "xmlrpc" : self.settings.xmlrpc_port }) @@ -140,7 +140,7 @@ class BootCheck: def check_selinux(self,status): enabled = self.config.api.is_selinux_enabled() if enabled: - prc2 = sub_process.Popen("/usr/sbin/getsebool -a",shell=True,stdout=sub_process.PIPE) + prc2 = sub_process.Popen("/usr/sbin/getsebool -a",shell=True,stdout=sub_process.PIPE, close_fds=True) data2 = prc2.communicate()[0] for line in data2.split("\n"): if line.find("httpd_can_network_connect ") != -1: diff --git a/cobbler/action_import.py b/cobbler/action_import.py index 6b19434f..faa68e53 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -244,7 +244,7 @@ class Importer: my_cmd = cmd % args print _("- %s") % my_cmd - rc = sub_process.call(my_cmd,shell=True) + rc = sub_process.call(my_cmd,shell=True,close_fds=True) if rc != 0: raise CX(_("Command failed")) @@ -475,7 +475,7 @@ class Importer: #cmd = "createrepo --basedir / --groupfile %s %s" % (os.path.join(comps_path, masterdir, comps_file), comps_path) cmd = "createrepo -c cache --groupfile %s %s" % (os.path.join(comps_path, masterdir, comps_file), comps_path) print _("- %s") % cmd - sub_process.call(cmd,shell=True) + sub_process.call(cmd,shell=True,close_fds=True) processed_repos[comps_path] = 1 # for older distros, if we have a "base" dir parallel with "repodata", we need to copy comps.xml up one... p1 = os.path.join(comps_path, "repodata", "comps.xml") diff --git a/cobbler/action_power.py b/cobbler/action_power.py index e88c7327..9db4535c 100644 --- a/cobbler/action_power.py +++ b/cobbler/action_power.py @@ -106,7 +106,7 @@ class PowerTool: #if not os.path.exists(tool_needed): # print "warning: %s does not seem to be installed" % tool_needed - rc = sub_process.call(cmd, shell=False) + rc = sub_process.call(cmd, shell=False, close_fds=True) if not rc == 0: raise CX("command failed (rc=%s), please validate the physical setup and cobbler config" % rc) diff --git a/cobbler/action_replicate.py b/cobbler/action_replicate.py index 74016f2c..0f0de5bd 100644 --- a/cobbler/action_replicate.py +++ b/cobbler/action_replicate.py @@ -71,7 +71,7 @@ class Replicate: from_path = "%s:%s" % (self.host, from_path) cmd = "rsync -avz %s %s" % (from_path, to_path) print _("- %s") % cmd - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("rsync failed")) @@ -79,7 +79,7 @@ class Replicate: from_path = "%s:%s" % (self.host, from_path) cmd = "scp %s %s" % (from_path, to_path) print _("- %s") % cmd - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("scp failed")) diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py index 19bee2ae..4bb484c5 100644 --- a/cobbler/action_reposync.py +++ b/cobbler/action_reposync.py @@ -152,7 +152,7 @@ class RepoSync: try: cmd = "createrepo %s %s" % (repo.createrepo_flags, dirname) print _("- %s") % cmd - sub_process.call(cmd, shell=True) + sub_process.call(cmd, shell=True, close_fds=True) except: print _("- createrepo failed. Is it installed?") del fnames[:] # we're in the right place @@ -183,7 +183,7 @@ class RepoSync: repo.mirror = "%s/" % repo.mirror cmd = "rsync -rltDv %s --delete --delete-excluded --exclude-from=/etc/cobbler/rsync.exclude %s %s" % (spacer, repo.mirror, dest_path) print _("- %s") % cmd - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("cobbler reposync failed")) print _("- walking: %s") % dest_path @@ -251,7 +251,7 @@ class RepoSync: # commands here. Any failure at any point stops the operation. if repo.mirror_locally: - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("cobbler reposync failed")) @@ -341,7 +341,7 @@ class RepoSync: # commands here. Any failure at any point stops the operation. if repo.mirror_locally: - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("cobbler reposync failed")) @@ -418,7 +418,7 @@ class RepoSync: print _("- %s") % cmd - rc = sub_process.call(cmd, shell=True) + rc = sub_process.call(cmd, shell=True, close_fds=True) if rc !=0: raise CX(_("cobbler reposync failed")) @@ -498,17 +498,14 @@ class RepoSync: """ # all_path = os.path.join(repo_path, "*") cmd1 = "chown -R root:apache %s" % repo_path - sub_process.call(cmd1, shell=True) + sub_process.call(cmd1, shell=True, close_fds=True) cmd2 = "chmod -R 755 %s" % repo_path - sub_process.call(cmd2, shell=True) - - getenforce = "/usr/sbin/getenforce" - if os.path.exists(getenforce): - data = sub_process.Popen(getenforce, shell=True, stdout=sub_process.PIPE).communicate()[0] - if data.lower().find("disabled") == -1: - cmd3 = "chcon --reference /var/www %s >/dev/null 2>/dev/null" % repo_path - sub_process.call(cmd3, shell=True) + sub_process.call(cmd2, shell=True, close_fds=True) + + if self.config.api.is_selinux_enabled(): + cmd3 = "chcon --reference /var/www %s >/dev/null 2>/dev/null" % repo_path + sub_process.call(cmd3, shell=True, close_fds=True) diff --git a/cobbler/action_validate.py b/cobbler/action_validate.py index 2229e097..fcd35408 100644 --- a/cobbler/action_validate.py +++ b/cobbler/action_validate.py @@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA import os import re -import sub_process from utils import _ import utils diff --git a/cobbler/api.py b/cobbler/api.py index 13936978..c550ddac 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -92,6 +92,8 @@ class BootAPI: self.logger_remote = self.__setup_logger("remote") self.selinux_enabled = utils.is_selinux_enabled() + self.dist = utils.check_dist() + self.os_version = utils.os_release() self.acl_engine = acls.AclEngine() @@ -687,4 +689,7 @@ class BootAPI: time.sleep(1) return self.power_on(system, user, password) + def get_os_details(self): + return (self.dist, self.os_version) + diff --git a/cobbler/cobblerd.py b/cobbler/cobblerd.py index 18b016a8..36645750 100644 --- a/cobbler/cobblerd.py +++ b/cobbler/cobblerd.py @@ -129,7 +129,7 @@ def do_avahi(bootapi, settings, logger): "cobblerd", "_http._tcp", "%s" % settings.xmlrpc_port ] - proc = sub_process.Popen(cmd, shell=False, stderr=sub_process.PIPE, stdout=sub_process.PIPE) + proc = sub_process.Popen(cmd, shell=False, stderr=sub_process.PIPE, stdout=sub_process.PIPE, close_fds=True) proc.communicate()[0] log(logger, "avahi service terminated") diff --git a/cobbler/kickgen.py b/cobbler/kickgen.py index 1b1f2153..00eb2a17 100644 --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -25,7 +25,6 @@ import os import os.path import shutil import time -import sub_process import sys import glob import traceback diff --git a/cobbler/pxegen.py b/cobbler/pxegen.py index 83f5f888..20210644 100644 --- a/cobbler/pxegen.py +++ b/cobbler/pxegen.py @@ -25,7 +25,6 @@ import os import os.path import shutil import time -import sub_process import sys import glob import traceback @@ -234,9 +233,9 @@ class PXEGen: if system.is_management_supported(): if not image_based: - self.write_pxe_file(f2,system,profile,distro,distro.arch) + self.write_pxe_file(f2,system,profile,distro,working_arch) else: - self.write_pxe_file(f2,system,None,None,None,image=profile) + self.write_pxe_file(f2,system,None,None,working_arch,image=profile) else: # ensure the file doesn't exist utils.rmfile(f2) @@ -269,7 +268,7 @@ class PXEGen: if os.path.exists(image.file): listfile2.write("%s\n" % image.name) f2 = os.path.join(self.bootloc, "s390x", image.name) - self.write_pxe_file(f2,None,None,None,None,image=image) + self.write_pxe_file(f2,None,None,None,image.arch,image=image) listfile.close() listfile2.close() @@ -313,7 +312,7 @@ class PXEGen: # image names towards the bottom for image in image_list: if os.path.exists(image.file): - contents = self.write_pxe_file(None,None,None,None,None,image=image) + contents = self.write_pxe_file(None,None,None,None,image.arch,image=image) if contents is not None: pxe_menu_items = pxe_menu_items + contents + "\n" @@ -424,7 +423,7 @@ class PXEGen: template = os.path.join(self.settings.pxe_template_dir,"pxesystem_ppc.template") else: # local booting on ppc requires removing the system-specific dhcpd.conf filename - if arch.startswith("ppc"): + if arch is not None and arch.startswith("ppc"): # Disable yaboot network booting for all interfaces on the system for (name,interface) in system.interfaces.iteritems(): diff --git a/cobbler/remote.py b/cobbler/remote.py index bf87a444..19291465 100644 --- a/cobbler/remote.py +++ b/cobbler/remote.py @@ -38,7 +38,7 @@ import fcntl import string import traceback import glob -import subprocess +import sub_process as subprocess import api as cobbler_api import utils @@ -1513,9 +1513,9 @@ def _test_setup_settings(pxe_once=1): def _test_bootstrap_restart(): - rc1 = subprocess.call(["/sbin/service","cobblerd","restart"],shell=False) + rc1 = subprocess.call(["/sbin/service","cobblerd","restart"],shell=False,close_fds=True) assert rc1 == 0 - rc2 = subprocess.call(["/sbin/service","httpd","restart"],shell=False) + rc2 = subprocess.call(["/sbin/service","httpd","restart"],shell=False,close_fds=True) assert rc2 == 0 time.sleep(2) @@ -1592,7 +1592,7 @@ def test_xmlrpc_ro(): files = glob.glob("rpm-build/*.rpm") if len(files) == 0: raise Exception("Tests must be run from the cobbler checkout directory.") - subprocess.call("cp rpm-build/*.rpm /tmp/empty",shell=True) + subprocess.call("cp rpm-build/*.rpm /tmp/empty",shell=True,close_fds=True) api.add_repo(repo) profile = api.new_profile() diff --git a/cobbler/services.py b/cobbler/services.py index c7b90f72..98a7a8dd 100644 --- a/cobbler/services.py +++ b/cobbler/services.py @@ -258,7 +258,7 @@ def __test_setup(): files = glob.glob("rpm-build/*.rpm") if len(files) == 0: raise Exception("Tests must be run from the cobbler checkout directory.") - sub_process.call("cp rpm-build/*.rpm /tmp/empty",shell=True) + sub_process.call("cp rpm-build/*.rpm /tmp/empty",shell=True,close_fds=True) api.add_repo(repo) fd = open("/tmp/cobbler_t1","w+") diff --git a/cobbler/test_basic.py b/cobbler/test_basic.py index 551cad4f..2a839c5a 100644 --- a/cobbler/test_basic.py +++ b/cobbler/test_basic.py @@ -5,7 +5,6 @@ import sys import unittest import os -import subprocess import tempfile import shutil import traceback diff --git a/cobbler/utils.py b/cobbler/utils.py index ae1459a9..1cfda2cf 100644 --- a/cobbler/utils.py +++ b/cobbler/utils.py @@ -144,7 +144,7 @@ def get_host_ip(ip, shorten=True): # CIDR notation (ip, slash) = ip.split("/") - handle = sub_process.Popen("/usr/bin/gethostip %s" % ip, shell=True, stdout=sub_process.PIPE) + handle = sub_process.Popen("/usr/bin/gethostip %s" % ip, shell=True, stdout=sub_process.PIPE, close_fds=True) out = handle.stdout results = out.read() converted = results.split(" ")[-1][0:8] @@ -684,7 +684,7 @@ def run_triggers(ref,globber,additional=[]): arglist.append(ref.name) for x in additional: arglist.append(x) - rc = sub_process.call(arglist, shell=False) + rc = sub_process.call(arglist, shell=False, close_fds=True) except: print _("Warning: failed to execute trigger: %s" % file) continue @@ -731,7 +731,7 @@ def os_release(): if not os.path.exists("/bin/rpm"): return ("unknown", 0) args = ["/bin/rpm", "-q", "--whatprovides", "redhat-release"] - cmd = sub_process.Popen(args,shell=False,stdout=sub_process.PIPE) + cmd = sub_process.Popen(args,shell=False,stdout=sub_process.PIPE,close_fds=True) data = cmd.communicate()[0] data = data.rstrip().lower() make = "other" @@ -789,6 +789,16 @@ def tftpboot_location(): return "/var/lib/tftpboot" return "/tftpboot" +def can_do_public_content(api): + """ + Returns whether we can use public_content_t which greatly + simplifies SELinux usage. + """ + (dist, ver) = api.get_os_details() + if dist == "redhat" and ver <= 4: + return False + return True + def linkfile(src, dst, symlink_ok=False, api=None): """ Attempt to create a link dst that points to src. Because file @@ -796,10 +806,24 @@ def linkfile(src, dst, symlink_ok=False, api=None): copyfile() """ + if api is None: + raise "Internal error: API handle is required" + + if os.path.exists(dst): if os.path.samefile(src, dst): - # hardlink already exists, no action needed - return True + # hardlink already exists, though this is old cobbler + # behavior and will cause problems with selinux if enabled + if api.is_selinux_enabled(): + # if we have RHEL 4 we must remove the destination + # and copy it to assign differing context + if not can_do_public_content(api): + os.remove(dst) + else: + # selinux is DISABLED so we can hardlink to save space. + # differing httpd and tftp-server requirements don't + # matter + return True elif os.path.islink(dst): # existing path exists and is a symlink, update the symlink os.remove(dst) @@ -808,18 +832,26 @@ def linkfile(src, dst, symlink_ok=False, api=None): # to copy over it pass - try: - return os.link(src, dst) - except (IOError, OSError): - # hardlink across devices, or link already exists - pass - - if symlink_ok: + if not api.is_selinux_enabled() or can_do_public_content(api): try: - return os.symlink(src, dst) + rc = os.link(src, dst) + restorecon(dst,api=api) + return rc except (IOError, OSError): + # hardlink across devices, or link already exists + # can result in extra call to restorecon but no + # major harm, we'll just symlink it if we can + # or otherwise copy it pass + if symlink_ok: + try: + rc = os.symlink(src, dst) + restorecon(dst,api=api) + return rc + except (IOError, OSError): + pass + return copyfile(src, dst, api=api) def copyfile(src,dst,api=None): @@ -833,8 +865,9 @@ def copyfile(src,dst,api=None): if not os.path.samefile(src,dst): # accomodate for the possibility that we already copied # the file as a symlink/hardlink - traceback.print_exc() - raise CX(_("Error copying %(src)s to %(dst)s") % { "src" : src, "dst" : dst}) + raise + # traceback.print_exc() + # raise CX(_("Error copying %(src)s to %(dst)s") % { "src" : src, "dst" : dst}) def copyfile_pattern(pattern,dst,require_match=True,symlink_ok=False,api=None): files = glob.glob(pattern) @@ -843,17 +876,63 @@ def copyfile_pattern(pattern,dst,require_match=True,symlink_ok=False,api=None): for file in files: base = os.path.basename(file) dst1 = os.path.join(dst,os.path.basename(file)) - linkfile(file,dst1,symlink_ok=symlink_ok) + linkfile(file,dst1,symlink_ok=symlink_ok,api=api) restorecon(dst1,api=api) -def restorecon(dest, api=None): - if api is None: - run = True - else: - run = api.is_selinux_enabled() +def restorecon(dest, api): + + """ + You'd think this function would just run restorecon but it's not that + simple. Some things are symlinks. For those we care about the + source and the destination. RHEL 4 doesn't support public_content_t + and we must also deal with that. This makes this all a bit more + complicated. + """ + + + run = api.is_selinux_enabled() rc = 0 + tdest = os.path.realpath(dest) + + should_step_one = False + should_step_two = False + + matched_path = False + + if dest.startswith("/var/www"): + matched_path = True + elif dest.find("/tftpboot/"): + matched_path = True + if run: - rc = sub_process.call(["/sbin/restorecon",dest],shell=False) + if can_do_public_content(api) and matched_path: + # this allows us to symlink/hardlink more when using + # content that needs to be accessed both by HTTP and TFTP. + # though RHEL 4 cannot do this. + should_step_one = True + if not os.path.samefile(dest,tdest): + # it's not a hardlink, but the symlink itself needs + # context applied. + # otherwise it will still not be readable + should_step_two = True + + else: + should_step_two = True + + if should_step_one: + # ensure the true destination is flagged as public_content_t + cmd = ["/usr/bin/chcon","-t","public_content_t", tdest] + rc = sub_process.call(cmd,shell=False,close_fds=True) + if rc != 0: + raise CX("chcon operation failed: %s" % cmd) + + if should_step_two: + # the basic restorecon stuff... + cmd = [ "/sbin/restorecon",dest ] + rc = sub_process.call(cmd,shell=False,close_fds=True) + if rc != 0: + raise CX("restorecon operation failed: %s" % cmd) + return rc def rmfile(path): @@ -1129,7 +1208,7 @@ def safe_filter(var): def is_selinux_enabled(): args = "/usr/sbin/selinuxenabled" - selinuxenabled = sub_process.call(args) + selinuxenabled = sub_process.call(args,close_fds=True) if selinuxenabled == 0: return True else: @@ -1143,7 +1222,7 @@ if __name__ == "__main__": # value = get_host_ip("255.255.255.0/%s" % x, shorten=False) # value2 = get_host_ip("255.255.255.0/%s" % x, shorten=True) # print "%s -> %s" % (value,value2) - no_ctrl_c() - ctrl_c_ok() - + #no_ctrl_c() + #ctrl_c_ok() + pass diff --git a/snippets/redhat_register b/snippets/redhat_register index 6a204481..9d0f465c 100644 --- a/snippets/redhat_register +++ b/snippets/redhat_register @@ -4,7 +4,7 @@ mkdir -p /usr/share/rhn/ #if $redhat_management_type == "site" #set $mycert = "/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT" -wget http://$redhat_management_server/pub/rhn/RHN-ORG-TRUSTED-SSL-CERT -O $mycert +wget http://$redhat_management_server/pub/RHN-ORG-TRUSTED-SSL-CERT -O $mycert #end if #if $redhat_management_type == "hosted" #set $mycert = "/usr/share/rhn/RHNS-CA-CERT" diff --git a/webui_templates/distro_edit.tmpl b/webui_templates/distro_edit.tmpl index 43e7325f..f8cbf7d2 100644 --- a/webui_templates/distro_edit.tmpl +++ b/webui_templates/distro_edit.tmpl @@ -244,6 +244,13 @@ function disablename(value) #else <input type="radio" name="breed" id="breed" value="suse">SuSE #end if + #if $distro and $distro.breed == "ubuntu" + <input type="radio" name="breed" id="breed" value="ubuntu" +checked>Ubuntu + #else + <input type="radio" name="breed" id="breed" value="ubuntu">Ubuntu + #end if + <p class="context-tip">This option determines how kernel options are prepared</p> </td> </tr> |