~rcj/charms/trusty/ntp/lp1366880

« back to all changes in this revision

Viewing changes to hooks/ntp_hooks.py

  • Committer: James Page
  • Date: 2013-08-29 18:41:41 UTC
  • Revision ID: james.page@canonical.com-20130829184141-z80jeztj814cb6np
Sync up with charmhelpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import sys
4
4
import charmhelpers.core.hookenv as hookenv
5
5
import charmhelpers.core.host as host
 
6
import charmhelpers.fetch as fetch
6
7
from charmhelpers.core.hookenv import UnregisteredHookError
7
8
import shutil
8
9
import os
18
19
 
19
20
@hooks.hook('install')
20
21
def install():
21
 
    host.apt_update(fatal=True)
22
 
    host.apt_install(["ntp"], fatal=True)
 
22
    fetch.apt_update(fatal=True)
 
23
    fetch.apt_install(["ntp"], fatal=True)
23
24
    shutil.copy(NTP_CONF, NTP_CONF_ORIG)
24
25
 
25
26