@@ -129,7 +129,7 @@ process_nfsv4_mounts()
129
129
#
130
130
# findmnt=$(findmnt | grep 'nfs4\|$LOCALHOST' 2>&1)
131
131
findmnt=$( findmnt --raw --noheading -o MAJ:MIN,FSTYPE,SOURCE,TARGET,OPTIONS -t nfs 2>&1 )
132
-
132
+ # daniewo use this findmnt to check against the fslocation file for the IP
133
133
134
134
#
135
135
# For no matching mounts also, findmnt exits with a failure return, so check
@@ -168,6 +168,8 @@ process_nfsv4_mounts()
168
168
accept_port=$( cat $l_conf | grep accept | cut -d ' :' -f 2)
169
169
vecho " accept_port: $accept_port "
170
170
171
+
172
+
171
173
#
172
174
# Delete entry from MOUNTMAPv4 if there are no mounted shares on that host.
173
175
# As long as we have at least one mount using the MOUNTMAPv4 entry, we leave
@@ -199,6 +201,29 @@ process_nfsv4_mounts()
199
201
# above
200
202
201
203
204
+ # daniewo get dest ip from mountmap file
205
+ ip_address=$( echo $l_conf | awk -F' .file' ' {print $1}' )
206
+ echo " The extracted IP address is: $ip_address "
207
+
208
+ # get matching ip address from fs location entry for the account name FQDN
209
+ local fslocation_entry=$( grep -m1 $l_host $VIRTUALFSLOCATION )
210
+ # probably need to check if it returns empty as well.
211
+
212
+ eecho " daniewo fslocation_entry = $fslocation_entry "
213
+
214
+
215
+
216
+
217
+ # extract fslocation entry
218
+ IFS=" " read l_fqdn new_ip l_prt <<< $fslocation_entry
219
+ eecho " daniewo $l_fqdn , $new_ip , $l_prt "
220
+
221
+
222
+ # check fslocation ip against the old ip that was in mountmap file
223
+ if [ " $ip_address " != " $new_ip " ]; then
224
+ eecho " daniewwo IP for $l_host changed [$l_nfsip -> $new_ip ]."
225
+ fi
226
+
202
227
# Check if checksumHash for stunnel.conf file has changed.
203
228
# Customers should not modify stunnel.conf files created by aznfs mount helper.
204
229
checksumHash=` cksum $l_conf | awk ' {print $1}' `
0 commit comments