1
#!/usr/bin/python2.6 -S
2
# Copyright 2011 Canonical Ltd. This software is licensed under the
3
# GNU Affero General Public License version 3 (see the file LICENSE).
5
"""Full update process."""
10
from optparse import OptionParser
14
from canonical.launchpad.scripts import (
20
def run_script(script, *extra_args):
21
script_path = os.path.join(os.path.dirname(__file__), script)
22
return subprocess.call([script_path] + sys.argv[1:] + list(extra_args))
26
parser = OptionParser()
28
# Add all the command command line arguments.
30
logger_options(parser)
31
(options, args) = parser.parse_args()
33
parser.error("Too many arguments")
35
preflight_rc = run_script('preflight.py')
39
upgrade_rc = run_script('upgrade.py')
43
fti_rc = run_script('fti.py')
47
security_rc = run_script('security.py', '--cluster')
51
preflight_rc = run_script('preflight.py')
55
if __name__ == '__main__':