final tweaks

This commit is contained in:
root 2018-07-27 20:51:10 +00:00
parent 906bcb2a7c
commit 14c4cd626b
4 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,7 @@
files/vrf.conf etc/iproute2/rt_tables.d files/vrf.conf etc/iproute2/rt_tables.d
files/vrf-dhcp-enter etc/dhcp/dhclient-enter-hooks.d files/vrf-dhcp-enter etc/dhcp/dhclient-enter-hooks.d
files/vrf-dhcp-exit etc/dhcp/dhclient-exit-hooks.d files/vrf-dhcp-exit etc/dhcp/dhclient-exit-hooks.d
files/dhcp-sethostname etc/dhcp/dhclient-exit-hooks.d
files/rc.local etc files/rc.local etc
files/10-frr.conf etc/sysctl.d files/10-frr.conf etc/sysctl.d
files/wit-gc usr/bin files/wit-gc usr/bin
@ -11,3 +12,5 @@ files/qemu-ifup-public etc/libvirt/hooks
files/qemu-ifup etc/libvirt/hooks files/qemu-ifup etc/libvirt/hooks
files/firewall etc/init.d files/firewall etc/init.d
files/interfaces etc/network files/interfaces etc/network
files/frr.conf.wit etc/frr
files/ipsec.conf.wit etc

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# postinst script for #PACKAGE# # postinst script for #PACKAGE#
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)
@ -22,7 +22,7 @@ case "$1" in
configure) configure)
export NODE_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $4 }') [ -z $NODE_ID ] && export NODE_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $4 }')
export MGMT_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $3 }') export MGMT_ID=$(ip -4 -br addr | grep 10.0. | awk '{ print $3 }' | awk 'BEGIN{FS="[./]"} { print $3 }')
export MGMT_MAC=$(ip -br link show dev $(ip -4 -br addr | grep 10.0. | awk '{ print $1 }') | awk '{ print $3 }') export MGMT_MAC=$(ip -br link show dev $(ip -4 -br addr | grep 10.0. | awk '{ print $1 }') | awk '{ print $3 }')

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
# preinst script for #PACKAGE# # preinst script for #PACKAGE#
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)

8
files/dhcp-sethostname Normal file
View File

@ -0,0 +1,8 @@
if [ ! -z $new_host_name ]; then
hostname $new_host_name
echo $new_host_name >/etc/hostname
fi
if [ ! -z $new_domain_name ]; then
host_name=$(hostname)
sed -i "s/\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*$host_name.*/\1 $host_name.${new_domain_name:-local} $host_name/" /etc/hosts
fi