Hi I need help creating a script which main purpose would be to check if the smbmount connection has been established. If is has not, then ask the user to enter the ip address of the node that will be tested. And the last portion would be to issue to smbmount command:
smbmount //10.5.0.3/icsglobal /mnt/iotest/ --verbose -o username=admin pass=admin1
#Prompt for remote or local test, if is remote invoke samba, for local do nothing
#Samba check and mount
#Checking if mount /mnt/iotest directory exists
read -p "Please enter the ip address of the node to test: " -e ip
df -h |grep $samba
if [ -d $samba];then
echo "Directory $samba appears to be mounted"
if [ ! -d $samba];then
echo "Creating $samba directory"
echo "Mounting $samba directory for samba connection"
smbmount //10.5.0.3/mnt/iotest/ --verbose -o username=admin pass=admin1