cleanup...
This commit is contained in:
parent
13fbc9d572
commit
3592ea524b
|
@ -32,8 +32,8 @@ case "$1" in
|
||||||
|
|
||||||
export TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3)
|
export TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3)
|
||||||
export NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4)
|
export NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4)
|
||||||
|
export DOMAINNAME=${HOSTNAME#*.}
|
||||||
|
|
||||||
export DOMAINNAME=${HOSTNAME#*.}
|
|
||||||
|
|
||||||
if [ -z "$TIER_ID" ]; then
|
if [ -z "$TIER_ID" ]; then
|
||||||
echo "Unable to autodetect TIER_ID, looks like we deal with a special node, please set in environment"
|
echo "Unable to autodetect TIER_ID, looks like we deal with a special node, please set in environment"
|
||||||
|
@ -44,6 +44,7 @@ case "$1" in
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
export NODE_ASN="4200$(printf "%03d" $TIER_ID)$(printf "%03d" $NODE_ID)"
|
export NODE_ASN="4200$(printf "%03d" $TIER_ID)$(printf "%03d" $NODE_ID)"
|
||||||
export LOOPBACKv6="2604:bbc0::$TIER_ID:$NODE_ID"
|
export LOOPBACKv6="2604:bbc0::$TIER_ID:$NODE_ID"
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ case "$1" in
|
||||||
## START writing config files
|
## 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
|
echo "PasswordAuthentication no" >>/etc/ssh/sshd_config
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/etc/systemd/timesyncd.conf.wit sed -e 's/#NTP=.*/NTP=ipv6.ntp.ubuntu.com/g'
|
/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/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/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/'
|
||||||
|
|
Loading…
Reference in New Issue