File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 3939mkdir -p /scratch
4040chmod 1777 /scratch
4141MAPPING=$( /usr/bin/ec2-metadata -b | grep ephemeral | awk ' {print $2}' | sed ' s/sd/xvd/' )
42- for m in MAPPING; do
43- check=$( stat -t /dev/${m} > /dev/null 2>&1 )
42+ for m in $MAPPING ; do
43+ stat -t /dev/${m} > /dev/null 2>&1
44+ check=$?
4445 if [ ${check} -eq 0 ]; then
4546 DEVS=" ${m} $DEVS "
4647 fi
@@ -62,7 +63,7 @@ sleep 10
6263# Setup LVM
6364pvcreate $PARTITIONS
6465vgcreate vg.01 $PARTITIONS
65- if [ " $cfn_encrypted_ephemeral " == " true" ] then
66+ if [ " $cfn_encrypted_ephemeral " == " true" ]; then
6667 mkfs -q /dev/ram1 1024
6768 mkdir -p /root/keystore
6869 mount /dev/ram1 /root/keystore
Original file line number Diff line number Diff line change 5858mkdir -p /scratch
5959chmod 1777 /scratch
6060MAPPING=$( /usr/bin/ec2-metadata -b | grep ephemeral | awk ' {print $2}' | sed ' s/sd/xvd/' )
61- for m in MAPPING; do
62- check=$( stat -t /dev/${m} > /dev/null 2>&1 )
61+ for m in $MAPPING ; do
62+ stat -t /dev/${m} > /dev/null 2>&1
63+ check=$?
6364 if [ ${check} -eq 0 ]; then
6465 DEVS=" ${m} $DEVS "
6566 fi
@@ -81,7 +82,7 @@ sleep 10
8182# Setup LVM
8283pvcreate $PARTITIONS
8384vgcreate vg.01 $PARTITIONS
84- if [ " $cfn_encrypted_ephemeral " == " true" ] then
85+ if [ " $cfn_encrypted_ephemeral " == " true" ]; then
8586 mkfs -q /dev/ram1 1024
8687 mkdir -p /root/keystore
8788 mount /dev/ram1 /root/keystore
You can’t perform that action at this time.
0 commit comments