Setup Script - Add some firewall functions

This commit is contained in:
Mike Reeves
2018-06-27 12:09:34 -04:00
parent b756a72e30
commit 27646f2dbb

View File

@@ -251,7 +251,14 @@ filter_nics() {
}
got_root() {
get_main_ip() {
# Get the main IP address the box is using
MAINIP=$(ip route get 1 | awk '{print $NF;exit}')
}
}got_root() {
# Make sure you are root
if [ "$(id -u)" -ne 0 ]; then
@@ -505,6 +512,11 @@ sensor_pillar() {
}
set_initial_firewall_policy() {
get_main_ip
}
set_updates() {
# Set it up so the updates roll through the master
@@ -919,6 +931,7 @@ if (whiptail_you_sure); then
master_static
echo "generating the master pillar"
master_pillar
set_initial_firewall_policy
# Do a checkin to push the key up
salt_checkin
# Accept the Master Key