summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 32 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b64cab9..e5a3109 100644
--- a/Makefile
+++ b/Makefile
@@ -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
43install-configuration: 43network_filter := $(shell ./src/generate-network-filter.sh)
44
45conf_files_out = conf/br0 conf/dnsmasq.conf conf/network_if-up.d_samizdat
46conf_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
51static_conf_files = conf/torrc conf/nbd-server conf/postfix_main.cf
52
53.PHONY: install-configuration install-bootserver start-bootserver
54install-bootserver:
55 sudo -E $(MAKE) instdir=/ real-install-bootserver start-bootserver
56
57start-bootserver:
58 ifup --force br0
59 service dnsmasq restart
60 service nbd-server restart
61
62real-install-bootserver: $(conf_files_out) $(static_conf_files)
63ifndef instdir
64 $(error "You must specify instdir, for safety.")
65else
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
70endif
71
72install-configuration: real-install-bootserver $(conf_files_out) $(static_conf_files)
44ifndef instdir 73ifndef instdir
45 $(error "You must specify instdir, for safety.") 74 $(error "You must specify instdir, for safety.")
46else 75else
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