diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-12-17 01:25:46 -0500 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-12-17 01:25:46 -0500 |
commit | 86c6a4bdf261845348b0452ef1099d82e134c2a0 (patch) | |
tree | 625a0cfffa478e9d49a9f61f1614fc88dc0d1488 /scripts/live-build-config | |
parent | 27fa086f072b1499075de700350b664f9c25cb25 (diff) | |
download | vyos-build-86c6a4bdf261845348b0452ef1099d82e134c2a0.tar.gz vyos-build-86c6a4bdf261845348b0452ef1099d82e134c2a0.zip |
Add initial drafts of the build scripts.
Diffstat (limited to 'scripts/live-build-config')
-rwxr-xr-x | scripts/live-build-config | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/live-build-config b/scripts/live-build-config new file mode 100755 index 00000000..59f0bbb2 --- /dev/null +++ b/scripts/live-build-config @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +import sys +import os +import json + +import pystache + +import defaults +import util + +util.check_build_config() + +lb_config_tmpl = """ +lb config noauto \ + --architectures {{architecture}} \ + --bootappend-live "boot=live components hostname=vyos username=live" \ + --bootloader syslinux \ + --binary-images iso-hybrid \ + --debian-installer false \ + --distribution jessie \ + --iso-application "VyOS" \ + --iso-publisher "{{build_by}}" \ + --iso-volume "VyOS" \ + --debootstrap-options "--variant=minbase --exclude=isc-dhcp-client,isc-dhcp-common,ifupdown" \ + "${@}" +""" + +with open(defaults.BUILD_CONFIG, 'r') as f: + build_config = json.load(f) + +lb_config_command = pystache.render(lb_config_tmpl, build_config) + +print("Configuring live-build") +os.chdir(defaults.BUILD_DIR) + +result = os.system(lb_config_command) +if result > 0: + print("live-build config failed") + sys.exit(1) |