Script to automate VMWare Tools Install Error: No such file or directory
So I wrote a simple Bash script to try and automate the install of VMWare Tools for all of our RHEL Servers. I was doing multiple commands from the CLI successfully, so I'm trying to automate it. However I continue to get the following error output.
Code:
Here is the code: Code:
In trying to troubleshoot, I've done the following: Code:
I've check permission and set the following: Code:
chmod +x /root/scripts/vmwaretools_uninstall |
What happens if you replace the escape with double quotes?
e.g. cd "/media/VMWare Tools/" rather than: cd /media/VMWare\ Tools/ |
Tried what you recommended and still getting the following error message.
Code:
Line 19 in the code is the following: Code:
|
Quote:
|
On your original question when I do a test using either the double quotes or the escape (\) it works in a simple script for me.
That makes me wonder: Did you actually mount the ISO as /media/VMWare Tools before hitting return when you ran the script? That is your script isn't mounting the ISO but rather asking you to do so then hit return. Presumably you are doing that mount in a separate session. Do you see it mounted when you run "df -h" after the mount? (Maybe you're mount is mounting it as /media/VMWare rather than /media/VMWare Tools because you didn't escape or quote in your mount command line?) |
Quote:
When mounting the VMware Tools iso, it shows the following: Code:
|
And what does df show after the mount?
What do you see if you do the cd manually after the mount and type pwd? By the way why cd to the mount anyway? Why not just do: cp -R "/media/VMWare Tools/*" /tmp/vmwaretools |
Code:
df -ha Code:
# cd /media |
Quote:
There is a mismatch between your original script and what you are mounting as. Script has uppercase "W" after VM but what you just wrote shows you're mounting with lower case "w" i.e. VMWare vs VMware. Linux is case sensitive so it sees VMWare, VMware, vMware, VmWare etc... all as different names. If you are mounting with the lower case "w" then you should use the lower case "w" in the script. |
Well, I posted a response, however I got logged out of the website and lost all of that info.
HOWEVER, I found a solution, which did the trick: Code:
thanks for you help |
Quote:
/media/VMWare\ Tools instead of /media/VMware\ Tools Your debugging process is very odd...why didn't you just go straight to line 19 and look at why your cd was failing, since that's the part of the script that was failing??? Copy-paste that line from your script into the terminal, see if it fails, why it fails, fix it, and then make that change to the script. Focusing on execute permissions and character dumps of the shebang makes absolutely no sense to me when the script is failing all the way down on line 19 with a VERY clear error: Quote:
|
One last thing.
There was a globbing issue when it was running the ./vmware-install.pl. I believe this is because these commands are being ran from the Bash Shell Script Vs from the CLI. I'm running the program as root, along with user and group is root. |
Quote:
|
Quote:
|
What warning/output?
|
All times are GMT -5. The time now is 01:00 PM. |