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

« back to all changes in this revision

Viewing changes to cloudinit/distros/sles.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:
18
18
#    You should have received a copy of the GNU General Public License
19
19
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
20
 
21
 
import os
22
 
 
23
21
from cloudinit import distros
24
22
 
25
23
from cloudinit.distros.parsers.hostname import HostnameConf
42
40
    network_script_tpl = '/etc/sysconfig/network/ifcfg-%s'
43
41
    resolve_conf_fn = '/etc/resolv.conf'
44
42
    tz_local_fn = '/etc/localtime'
45
 
    tz_zone_dir = '/usr/share/zoneinfo'
46
43
 
47
44
    def __init__(self, name, cfg, paths):
48
45
        distros.Distro.__init__(self, name, cfg, paths)
151
148
        return distros.Distro._bring_up_interfaces(self, device_names)
152
149
 
153
150
    def set_timezone(self, tz):
154
 
        # TODO(harlowja): move this code into
155
 
        # the parent distro...
156
 
        tz_file = os.path.join(self.tz_zone_dir, str(tz))
157
 
        if not os.path.isfile(tz_file):
158
 
            raise RuntimeError(("Invalid timezone %s,"
159
 
                                " no file found at %s") % (tz, tz_file))
 
151
        tz_file = self._find_tz_file(tz)
160
152
        # Adjust the sysconfig clock zone setting
161
153
        clock_cfg = {
162
154
            'TIMEZONE': str(tz),