2
if [ "$(id -u)" != "0" ]; then
3
echo "This utility may only be run as root." 1>&2
6
export PYTHONPATH="/usr/share/maas${PYTHONPATH:+:}${PYTHONPATH}"
7
exec /usr/bin/python -m provisioningserver "$@"
2
# Copyright 2015 Canonical Ltd. This software is licensed under the
3
# GNU Affero General Public License version 3 (see the file LICENSE).
5
from __future__ import (
21
# At present, only root should execute this.
23
raise SystemExit("This utility may only be run as root.")
27
# Ensure that we're running as the `maas` group.
29
gr_maas = grp.getgrnam("maas")
31
raise SystemExit("No such group: maas")
33
os.setegid(gr_maas.gr_gid)
37
# Prevent creation of world-readable (or writable, executable) files.
42
# Run the main provisioning script.
43
from provisioningserver.__main__ import main
54
if __name__ == "__main__":