X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=vm_hosted;h=134b5399bb1a1767b58f2882928b73038f03297a;hp=91ec25ae0babdd15b705013bb33943849999f1bc;hb=750477542776680c76994067340fcbea31f8b118;hpb=a34a5ff2b077d249462b1626b706d8dc21347f5a diff --git a/vm_hosted b/vm_hosted index 91ec25a..134b539 100755 --- a/vm_hosted +++ b/vm_hosted @@ -748,6 +748,10 @@ rule_network_configure () { $(cat /etc/hosts) 127.0.0.1 $vm_fqdn $vm EOF + sudo install -m 644 -o root -g root /dev/stdin /etc/resolv.conf <<-EOF + search ${vm_host#*.} + nameserver ${vm_host_nameserver} + EOF sudo install -m 644 -o root -g root /dev/stdin /etc/network/interfaces <<-EOF auto lo iface lo inet loopback @@ -1283,6 +1287,23 @@ rule_time_configure () { rule dpkg_reconfigure tzdata rule apt_get_install ntp } +rule_unbound_configure () { + sudo apt-get install unbound m4 + sudo install -m 644 -o root -g root /dev/stdin /etc/resolv.conf <<-EOF + search ${vm_host#*.} + nameserver 127.0.0.1 + #nameserver ${vm_host_nameserver} + EOF + sudo install -m 440 -o unbound -g unbound \ + "$tool"/etc/unbound/named.cache \ + /etc/unbound/named.cache + m4 \ + --define=OUTGOING_INTERFACE=$vm_ipv4 \ + <"$tool"/etc/unbound/unbound.conf | + sudo install -m 440 -o unbound -g unbound /dev/stdin \ + /etc/unbound/unbound.conf + sudo service unbound restart + } rule_user_add () { # SYNTAX: $user rule user_configure local user=$1