blob: 59f0bbb2ce60a503f461bd21e50a66f30ef03721 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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)
|