~ubuntu-branches/ubuntu/saucy/cloud-init/saucy-proposed

« back to all changes in this revision

Viewing changes to cloudinit/distros/rhel.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-08-14 21:44:22 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20130814214422-uzrq82t5srz2g4c2
Tags: 0.7.3~bzr858-0ubuntu1
* New upstream snapshot.
  * fix resizing of root partition by preferring the functional 'growpart'
    support over the broken 'parted resizepart' support (LP: #1212444)
  * add options for apt_ftp_proxy, apt_https_proxy and apt_config
    (LP: #1057195)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#    You should have received a copy of the GNU General Public License
21
21
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 
23
 
import os
24
 
 
25
23
from cloudinit import distros
26
24
from cloudinit import helpers
27
25
from cloudinit import log as logging
51
49
    network_script_tpl = '/etc/sysconfig/network-scripts/ifcfg-%s'
52
50
    resolve_conf_fn = "/etc/resolv.conf"
53
51
    tz_local_fn = "/etc/localtime"
54
 
    tz_zone_dir = "/usr/share/zoneinfo"
55
52
 
56
53
    def __init__(self, name, cfg, paths):
57
54
        distros.Distro.__init__(self, name, cfg, paths)
164
161
        return distros.Distro._bring_up_interfaces(self, device_names)
165
162
 
166
163
    def set_timezone(self, tz):
167
 
        # TODO(harlowja): move this code into
168
 
        # the parent distro...
169
 
        tz_file = os.path.join(self.tz_zone_dir, str(tz))
170
 
        if not os.path.isfile(tz_file):
171
 
            raise RuntimeError(("Invalid timezone %s,"
172
 
                                " no file found at %s") % (tz, tz_file))
 
164
        tz_file = self._find_tz_file(tz)
173
165
        if self._dist_uses_systemd():
174
166
            # Currently, timedatectl complains if invoked during startup
175
167
            # so for compatibility, create the link manually.