Check the mount space

Hi,

When i check the cifs = cifs i could get two dupliates of cifs present in unix. so the system couldnt check. could you please let me know how to make the change code to find out the unique one in the line 6.

 
1NTBD="/ft/sv/ss"
2check_ntfs()
3{
4 # Check that the necessary NT areas are mounted
5 [[ ! -d $NTBD ]] && error "Cannot find $NTBD"
6 [[ "$(df -n $NTBD | awk '{print $NF}')" = "cifs" ]]
7 print -u2 "$NTBD filesystem is mounted correctly"
8 return 0
}
 

I need to change the code to find the unique oe below.
Output:

> df -n /ft/sv/ss
/ft/sv/ss (ft45:/ss ) : cifs
/ft/sv/ss (ft45:/ss ) : cifs

You could try this change in red which will only look at the 1st line of the df output:

[[ "$(df -n $NTBD | awk 'NR==1{print $NF}')" = "cifs" ]]

However, I feel you may have missed showing some of the code, as line six above doesn't appear to be taking any action based on the result of this "cifs" test.

1 Like