cleanup...

This commit is contained in:
root 2018-08-09 12:42:42 +00:00
parent 13fbc9d572
commit 3592ea524b
2 changed files with 4 additions and 3 deletions

View File

@ -32,9 +32,9 @@ case "$1" in
export TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3)
export NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4)
export DOMAINNAME=${HOSTNAME#*.}
if [ -z "$TIER_ID" ]; then
echo "Unable to autodetect TIER_ID, looks like we deal with a special node, please set in environment"
exit 2
@ -44,6 +44,7 @@ case "$1" in
exit 2
fi
export NODE_ASN="4200$(printf "%03d" $TIER_ID)$(printf "%03d" $NODE_ID)"
export LOOPBACKv6="2604:bbc0::$TIER_ID:$NODE_ID"
@ -55,7 +56,7 @@ case "$1" in
## START writing config files
sed -i -e '/#*PasswordAuthentication /d' /etc/ssh/sshd_config
sed -i -e '/#*\s*PasswordAuthentication /d' /etc/ssh/sshd_config
echo "PasswordAuthentication no" >>/etc/ssh/sshd_config

View File

@ -1,4 +1,4 @@
/etc/systemd/timesyncd.conf.wit sed -e 's/#NTP=.*/NTP=ipv6.ntp.ubuntu.com/g'
/etc/frr/daemons.wit sed -e 's/bgpd=no/bgpd=yes/' -e 's/zebra=no/zebra=yes/'
/etc/bash.bashrc.wit sed -e 's/.*witaddon/source \/etc\/bashrc-witaddon/; t; $ s/$/\nsource \/etc\/bashrc-witaddon/'
/etc/dhcp/dhclient.conf.wit sed -e '/^option.*loopbackv4/d;' | sed -e '1s/^/option loopbackv4 code 225 = ip-address;\n/;'
/etc/dhcp/dhclient.conf.wit sed -e 's/^option.*loopbackv4.*/option loopbackv4 code 225 = ip-address;/; t; 1s/^/option loopbackv4 code 225 = ip-address;\n/'