Ejemplo n.º 1
0
    def fixup_crontab(self):

        RedHat.fixup_crontab(self)

        # disable mlocate
        os.chmod(os.path.join(self.vpsroot, 'etc/cron.daily/mlocate.cron'),
                 0644)
Ejemplo n.º 2
0
    def customize(self, name, xid, ip, userid, passwd, disklim, dns=cfg.PRIMARY_IP,
                  vpn_ip=None, vpn_mask='255.255.255.0'):

        # call super
        RedHat.customize(self, name, xid, ip, userid, passwd, disklim, dns,
                         vpn_ip, vpn_mask)

        self.enable_imaps()
        self.disable_pam_limits()
        self.fix_vncserver(name)
Ejemplo n.º 3
0
 def vps_version(self):
     rh_ver = RedHat.vps_version(self)
     try:
         if rh_ver and rh_ver.startswith('CentOS'):
             if rh_ver.split()[2] == self.CentOS_VER:
                 return self.CentOS_VER
     except:
         return None
Ejemplo n.º 4
0
 def vps_version(self):
     rh_ver = RedHat.vps_version(self)
     try:
         if rh_ver and rh_ver.startswith('CentOS'):
             if rh_ver.split()[2] == self.CentOS_VER:
                 return self.CentOS_VER
     except:
         return None
Ejemplo n.º 5
0
    def vps_version(self):

        rh_ver = RedHat.vps_version(self)
        try:
            if rh_ver and rh_ver.startswith('Fedora Core release'):
                if int(rh_ver.split()[3]) == self.FC_VER:
                    return self.FC_VER
        except:
            return None
Ejemplo n.º 6
0
    def custcopy(self, source, name, userid, data={}, dns=cfg.PRIMARY_IP):

        xid = RedHat.custcopy(self, source, name, userid, data, dns)

        self.enable_imaps()
        self.disable_pam_limits()
        self.fix_vncserver(name)

        return xid
Ejemplo n.º 7
0
    def custcopy(self, source, name, userid, data={}, dns=cfg.PRIMARY_IP):

        xid = RedHat.custcopy(self, source, name, userid, data, dns)

        self.enable_imaps()
        self.disable_pam_limits()
        self.fix_vncserver(name)

        return xid
Ejemplo n.º 8
0
    def customize(self,
                  name,
                  xid,
                  ip,
                  userid,
                  passwd,
                  disklim,
                  dns=cfg.PRIMARY_IP,
                  vpn_ip=None,
                  vpn_mask='255.255.255.0'):

        # call super
        RedHat.customize(self, name, xid, ip, userid, passwd, disklim, dns,
                         vpn_ip, vpn_mask)

        self.enable_imaps()
        self.disable_pam_limits()
        self.fix_vncserver(name)
Ejemplo n.º 9
0
    def vps_version(self):

        rh_ver = RedHat.vps_version(self)
        try:
            if rh_ver and rh_ver.startswith('Fedora Core release'):
                if int(rh_ver.split()[3]) == self.FC_VER:
                    return self.FC_VER
        except:
            return None
Ejemplo n.º 10
0
    def distro_version(self):

        rh_ver = RedHat.distro_version(self)
        try:
            if rh_ver:
                fc_ver = rh_ver['name'].split()[-1]
                if int(fc_ver) == self.FC_VER:
                    return self.FC_VER
        except:
            return None
Ejemplo n.º 11
0
    def distro_version(self):

        rh_ver = RedHat.distro_version(self)
        try:
            if rh_ver:
                fc_ver = rh_ver['name'].split()[-1]
                if int(fc_ver) == self.FC_VER:
                    return self.FC_VER
        except:
            return None
Ejemplo n.º 12
0
    def distro_version(self):

        # XXX
        # CentOS does not follow RedHat's convention in identifying
        # itself in its .discinfo file, the version simply said
        # "Final" in CentOS 5. So for now, we'll just take that
        # "Final" is CentOS 5
        
        rh_ver = RedHat.distro_version(self)
        try:
            if rh_ver:
                if rh_ver['name'] == 'Final':
                    if '5.2' in rh_ver['RPMS']:
                        rhel_ver = '5.2'
                    elif '5.3' in rh_ver['RPMS']:
                        rhel_ver = '5.3'
                    else:
                        rhel_ver = '5'
                    if rhel_ver == self.CentOS_VER:
                        return self.CentOS_VER
        except:
            return None
Ejemplo n.º 13
0
    def distro_version(self):

        # XXX
        # CentOS does not follow RedHat's convention in identifying
        # itself in its .discinfo file, the version simply said
        # "Final" in CentOS 5. So for now, we'll just take that
        # "Final" is CentOS 5

        rh_ver = RedHat.distro_version(self)
        try:
            if rh_ver:
                if rh_ver['name'] == 'Final':
                    if '5.2' in rh_ver['RPMS']:
                        rhel_ver = '5.2'
                    elif '5.3' in rh_ver['RPMS']:
                        rhel_ver = '5.3'
                    else:
                        rhel_ver = '5'
                    if rhel_ver == self.CentOS_VER:
                        return self.CentOS_VER
        except:
            return None
Ejemplo n.º 14
0
    def fixup_crontab(self):

        RedHat.fixup_crontab(self)

        # disable slocate
        os.chmod(os.path.join(self.vpsroot, 'etc/cron.daily/slocate.cron'), 0644)