modules/mu/clouds/aws/userdata/linux.erb in cloud-mu-2.0.1 vs modules/mu/clouds/aws/userdata/linux.erb in cloud-mu-2.0.2

- old
+ new

@@ -64,11 +64,11 @@ amazon_version=`/bin/rpm -qa \*-release | grep -Ei "system-release"| cut -d"-" -f3 | cut -d"." -f1` if [ "$amazon_version" == "2014" ] || [ "$amazon_version" == "2015" ] || [ "$amazon_version" == "2016" ];then version=6 fi fi - if [ $version -eq 7 ];then + if [ "$version" == "7" ];then userdata_dir="/var/lib/cloud/instances/$instance_id" else userdata_dir="/var/lib/cloud/instance" fi if ! grep "^/bin/sh $userdata_dir/user-data.txt$" /etc/rc.d/rc.local > /dev/null;then @@ -77,11 +77,11 @@ mv /tmp/rc.local.$$ /etc/rc.d/rc.local fi sed -i 's/^Defaults.*requiretty$/Defaults !requiretty/' /etc/sudoers - if [ $version == 7 ];then + if [ "$version" == "7" ];then chmod 755 /etc/rc.d/rc.local systemctl reset-failed sshd.service fi if [ ! -f /usr/bin/curl ] ;then /usr/bin/yum -y install curl;fi # Ugh, rando EPEL mirror @@ -159,10 +159,9 @@ <% if !$mu.skipApplyUpdates %> if [ "$need_reboot" == "1" ];then shutdown -r now "Applying new kernel" fi <% end %> -fi if [ "$AWSCLI" != "" ];then $AWSCLI --region="$region" s3 cp s3://<%= MU.adminBucketName %>/<%= $mu.muID %>-secret . fi