Skip to content

Commit 45f4a67

Browse files
authored
Update linux_userData.sh
Fix comments, fix lint error
1 parent 9a9f280 commit 45f4a67

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Management-Utilities/ec2-user-data-iscsi-create-and-mount/linux_userData.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
SECRET_NAME=[Secret name has it been saved in AWS secret manager]
66
AWS_REGION=[AWS region]
77

8-
FSXN_PASSWORD=[Fsx admin password, e.g. fsxadmin123]
98
FSXN_ADMIN_IP=[Fsx admin ip, e.g. 172.25.45.32]
109
# Volume name
1110
VOLUME_NAME=[Fsx volume name, e.g. iscsiVol]
@@ -21,6 +20,8 @@ max=999
2120
LUN_NAME=${VOLUME_NAME}_$(($RANDOM%($max-$min+1)+$min))
2221

2322
# defaults
23+
# All FSxN instances are created with the user 'fsxadmin' which can't be changed
24+
# The script will create a log file in the ec2-user home directory
2425
ONTAP_USER=fsxadmin
2526
LOG_FILE=/home/ec2-user/install.log
2627

@@ -45,11 +46,6 @@ function getSecretValue() {
4546
fi
4647
}
4748

48-
function fsxnSshCommand(){
49-
command = $1
50-
sshpass -p $FSXN_PASSWORD ssh -o StrictHostKeyChecking=no fsxadmin@$FSXN_ADMIN_IP $command
51-
}
52-
5349
logMessage() {
5450
echo "$(date) - $1" >> $LOG_FILE
5551
}
@@ -309,4 +305,4 @@ cat /$directory_path/$mount_point/testIscsci.txt
309305

310306
logMessage "Mounting the FSXn iSCSI volume was successful."
311307

312-
rm -f uninstall.sh
308+
rm -f uninstall.sh

0 commit comments

Comments
 (0)