def fixup_crontab(self): RedHat.fixup_crontab(self) # disable mlocate os.chmod(os.path.join(self.vpsroot, 'etc/cron.daily/mlocate.cron'), 0644)
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)
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
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
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
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
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
def fixup_crontab(self): RedHat.fixup_crontab(self) # disable slocate os.chmod(os.path.join(self.vpsroot, 'etc/cron.daily/slocate.cron'), 0644)