Skip to content

Instantly share code, notes, and snippets.

@sierra-tango-echo
Last active June 6, 2020 11:57
Show Gist options
  • Select an option

  • Save sierra-tango-echo/fc3da4863717a081ae77a563c76005c0 to your computer and use it in GitHub Desktop.

Select an option

Save sierra-tango-echo/fc3da4863717a081ae77a563c76005c0 to your computer and use it in GitHub Desktop.

Revisions

  1. sierra-tango-echo revised this gist Jun 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ cat << EOF > /etc/profile.d/flightcenter.sh
    #Custom PS1 with client name
    [ -f /etc/flightcentersupported ] && c=32 || c=31
    if [ "\$PS1" ]; then
    PS1="[\u@\h\[\e[1;${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    PS1="[\u@\h\[\e[1;\${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    fi
    EOF
    touch /etc/flightcentersupported
  2. sierra-tango-echo revised this gist Jun 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ firewall-offline-cmd --add-interface eth0 --zone public
    cat << EOF > /etc/profile.d/flightcenter.sh
    #Custom PS1 with client name
    [ -f /etc/flightcentersupported ] && c=32 || c=31
    if [ "$PS1" ]; then
    if [ "\$PS1" ]; then
    PS1="[\u@\h\[\e[1;${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    fi
    EOF
  3. sierra-tango-echo revised this gist Jun 6, 2020. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -12,10 +12,11 @@ EOF
    yum -y install firewalld
    firewall-offline-cmd --add-interface eth0 --zone public

    cat << EOF
    cat << EOF > /etc/profile.d/flightcenter.sh
    #Custom PS1 with client name
    [ -f /etc/flightcentersupported ] && c=32 || c=31
    if [ "$PS1" ]; then
    PS1="[\u@\h\[\e[1;${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    fi
    EOF
    EOF
    touch /etc/flightcentersupported
  4. sierra-tango-echo revised this gist Jun 6, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -17,4 +17,5 @@ cat << EOF
    [ -f /etc/flightcentersupported ] && c=32 || c=31
    if [ "$PS1" ]; then
    PS1="[\u@\h\[\e[1;${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    fi
    fi
    EOF
  5. sierra-tango-echo revised this gist Jun 6, 2020. 1 changed file with 15 additions and 3 deletions.
    18 changes: 15 additions & 3 deletions cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,20 @@
    hostnamectl set-hostname crscfd1gw.cloud.rscfd1.alces.network
    if [ -z "${CLUSTERNAME}" ]; then
    echo "No clustername set" >&2
    exit 1
    fi

    hostnamectl set-hostname cgw1.cloud.pri.${CLUSTERNAME}.alces.network
    cat << EOF >> /etc/hosts
    10.110.1.254 crscfd1gw.cloud.rscfd1.alces.network crscfd1gw
    10.110.1.254 cgw1.cloud.pri.${CLUSTERNAME}.alces.network ${CLUSTERNAME}
    EOF

    yum -y install firewalld
    firewall-offline-cmd --add-interface eth0 --zone public
    firewall-offline-cmd --add-interface eth0 --zone public

    cat << EOF
    #Custom PS1 with client name
    [ -f /etc/flightcentersupported ] && c=32 || c=31
    if [ "$PS1" ]; then
    PS1="[\u@\h\[\e[1;${c}m\][${CLUSTERNAME}]\[\e[0m\] \W]\\$ "
    fi
  6. sierra-tango-echo revised this gist May 9, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@ cat << EOF >> /etc/hosts
    EOF

    yum -y install firewalld
    firewall-offline-cmd --add-interface eth0 --zone public --permanent
    firewall-offline-cmd --add-interface eth0 --zone public
  7. sierra-tango-echo revised this gist May 9, 2020. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,7 @@ hostnamectl set-hostname crscfd1gw.cloud.rscfd1.alces.network
    cat << EOF >> /etc/hosts
    10.110.1.254 crscfd1gw.cloud.rscfd1.alces.network crscfd1gw
    EOF
    EOF

    yum -y install firewalld
    firewall-offline-cmd --add-interface eth0 --zone public --permanent
  8. sierra-tango-echo created this gist May 9, 2020.
    5 changes: 5 additions & 0 deletions cleanupcloudimage.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    hostnamectl set-hostname crscfd1gw.cloud.rscfd1.alces.network
    cat << EOF >> /etc/hosts
    10.110.1.254 crscfd1gw.cloud.rscfd1.alces.network crscfd1gw
    EOF