qubes_create.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # The Qubes OS Project, https://www.qubes-os.org/
  3. #
  4. # Copyright (C) 2015 Joanna Rutkowska <joanna@invisiblethingslab.com>
  5. # Copyright (C) 2015 Wojtek Porczyk <woju@invisiblethingslab.com>
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Lesser General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2.1 of the License, or (at your option) any later version.
  11. #
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public
  18. # License along with this library; if not, see <https://www.gnu.org/licenses/>.
  19. #
  20. '''qubes-create - Create new Qubes OS store'''
  21. import sys
  22. import qubes
  23. import qubes.tools
  24. parser = qubes.tools.QubesArgumentParser(
  25. description='Create new Qubes OS store.',
  26. want_app=True,
  27. want_app_no_instance=True)
  28. def main(args=None):
  29. '''Main routine of :program:`qubes-create`.
  30. :param list args: Optional arguments to override those delivered from \
  31. command line.
  32. '''
  33. args = parser.parse_args(args)
  34. qubes.Qubes.create_empty_store(args.app,
  35. offline_mode=args.offline_mode).setup_pools()
  36. return 0
  37. if __name__ == '__main__':
  38. sys.exit(main())