I have made the following script to target all the computers that ar listed in a input file and check if mountd is running true a rpcinfo request. Using this script I can check if users ar making mountd available to the network what is not the company rule.
This code is working buth there are some things that do not work and do not apply to the rule.
This are the things I like to add buth I have no clue how this should be done.
I like to check first if RPC is running or not and do this in a defined time that I can set. Something like wait fore 2 sec before skipping the computer and go to the next.
If RPC is running than do the check "rpcinfo -p $line |grep mountd"
and then if mountd is runnig a output of "showmount -e $line" because there ar some computers that are allowd to run distribution mounts to be accesd by the rest of the network.
What I like to know is how I can make a "if then" like statement based on the returning results. Anybody can help me with this problem?
|All times are GMT -5. The time now is 03:23 PM.|