Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/live.py
diff options
context:
space:
mode:
Diffstat (limited to 'live.py')
-rw-r--r--live.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/live.py b/live.py
deleted file mode 100644
index 56f8c41..0000000
--- a/live.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-
-import logging
-import os
-import sys
-from time import gmtime, strftime
-
-import imgcreate
-
-base_dir = os.path.dirname(__file__)
-images_dir = os.path.join(base_dir, 'images')
-cache_dir = os.path.join(base_dir, 'cache')
-last_file = os.path.join(images_dir, 'last')
-
-def main():
-
- if not os.path.exists(images_dir):
- os.mkdir(images_dir)
-
- image_date = strftime("%Y%m%d%H%M", gmtime())
- image_name = 'SoaS3-%s' % image_date
- if os.path.exists(os.path.join(images_dir, image_name + '.iso')):
- print 'Image %s exists already' % image_name
- sys.exit(2)
-
- ks = imgcreate.read_kickstart(os.path.join(base_dir, 'soas-sugar.ks'))
- creator = imgcreate.LiveImageCreator(ks, image_name, image_name)
-
- try:
- creator.mount(cachedir=cache_dir)
- creator.install()
- creator.configure()
- creator.unmount()
- creator.package(destdir=images_dir)
- except imgcreate.CreatorError, e:
- logging.error("Error creating Live CD : %s" % e)
- return 1
- finally:
- creator.cleanup()
-
- return 0
-
-if __name__ == "__main__":
- sys.exit(main())