diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 32 insertions, 2 deletions
@@ -40,12 +40,42 @@ install-nested-kvm: conf/kvm.conf | |||
40 | install -m0644 conf/kvm.conf ${instdir}/etc/modprobe.d/ | 40 | install -m0644 conf/kvm.conf ${instdir}/etc/modprobe.d/ |
41 | modprobe -r kvm-intel kvm-amd kvm; modprobe kvm; modprobe kvm-intel; modprobe kvm-amd; true | 41 | modprobe -r kvm-intel kvm-amd kvm; modprobe kvm; modprobe kvm-intel; modprobe kvm-amd; true |
42 | 42 | ||
43 | install-configuration: | 43 | network_filter := $(shell ./src/generate-network-filter.sh) |
44 | |||
45 | conf_files_out = conf/br0 conf/dnsmasq.conf conf/network_if-up.d_samizdat | ||
46 | conf_files_in = $(addsuffix .in, $(conf_files_out)) | ||
47 | |||
48 | $(conf_files_out): $(conf_files_in) ./src/generate-network-filter.sh | ||
49 | sed -e '$(network_filter)' < $@.in > $@ | ||
50 | |||
51 | static_conf_files = conf/torrc conf/nbd-server conf/postfix_main.cf | ||
52 | |||
53 | .PHONY: install-configuration install-bootserver start-bootserver | ||
54 | install-bootserver: | ||
55 | sudo -E $(MAKE) instdir=/ real-install-bootserver start-bootserver | ||
56 | |||
57 | start-bootserver: | ||
58 | ifup --force br0 | ||
59 | service dnsmasq restart | ||
60 | service nbd-server restart | ||
61 | |||
62 | real-install-bootserver: $(conf_files_out) $(static_conf_files) | ||
63 | ifndef instdir | ||
64 | $(error "You must specify instdir, for safety.") | ||
65 | else | ||
66 | install -p -m0644 -DT conf/dnsmasq.conf ${instdir}/etc/dnsmasq.conf | ||
67 | install -p -m0644 -DT conf/eth0 ${instdir}/etc/network/interfaces.d/eth0 | ||
68 | install -p -m0644 -DT conf/br0 ${instdir}/etc/network/interfaces.d/br0 | ||
69 | install -p -m0644 -DT conf/network_if-up.d_samizdat ${instdir}/etc/network/if-up.d/samizdat | ||
70 | endif | ||
71 | |||
72 | install-configuration: real-install-bootserver $(conf_files_out) $(static_conf_files) | ||
44 | ifndef instdir | 73 | ifndef instdir |
45 | $(error "You must specify instdir, for safety.") | 74 | $(error "You must specify instdir, for safety.") |
46 | else | 75 | else |
47 | install -p -m0644 -DT conf/dnsmasq.conf ${instdir}/etc/dnsmasq.conf | 76 | install -p -m0644 -DT conf/dnsmasq.conf ${instdir}/etc/dnsmasq.conf |
48 | install -p -m0644 -DT conf/interfaces.d_eth0 ${instdir}/etc/network/interfaces.d/eth0 | 77 | install -p -m0644 -DT conf/eth0 ${instdir}/etc/network/interfaces.d/eth0 |
78 | install -p -m0644 -DT conf/br0 ${instdir}/etc/network/interfaces.d/br0 | ||
49 | install -p -m0644 -DT conf/network_if-up.d_samizdat ${instdir}/etc/network/if-up.d/samizdat | 79 | install -p -m0644 -DT conf/network_if-up.d_samizdat ${instdir}/etc/network/if-up.d/samizdat |
50 | install -p -m0644 -DT conf/postfix_main.cf ${instdir}/etc/postfix/main.cf | 80 | install -p -m0644 -DT conf/postfix_main.cf ${instdir}/etc/postfix/main.cf |
51 | install -p -m0644 -DT conf/torrc ${instdir}/etc/tor/torrc | 81 | install -p -m0644 -DT conf/torrc ${instdir}/etc/tor/torrc |