Comments (2)
Hi Rob,
I believe this would break the check for the other versions.
Perhaps using sed or grep to match the version is more suitable.
something like the following sed does the trick
ESX_VERSION=$(vmware -v | sed -e 's#.([3-9].[0-9].[0-9]).#\1#')
but that wouldn't catch 3i. Although it does match any version formatted x.x.x. So that might be good enough as 3.5.0 is also in the line.
using grep on the other hand might be more flexible/readable if syntax is changed in future versions
ESX_VERSION=$(vmware -v)
if echo "${ESX_VERSION}" | grep -E '5.0.0|5.1.0' >/dev/null 2>&1; then
VER=5
elif echo "${ESX_VERSION}" | grep -E '4.0.0|4.1.0' >/dev/null 2>&1; then
VER=4
elif echo "${ESX_VERSION}" | grep -E '3.5.0' >/dev/null 2>&1; then
VER=3
else
echo "You're not running ESX(i) 3.5, 4.x, 5.x!"; exit 1;
fi
Best regards,
Fréderic
On 1-feb.-2013, at 01:05, RobMarshall109 [email protected] wrote:
I've been running ghettoVCB for a while now and it has been working great. I just updated to the latest version and found that on my 1 ESXi 3.5 host the script would fail with the error - "You're not running ESX(i) 3.5, 4.x, 5.x!".
I found by changing following line, the issue was resolved
ESX_VERSION=$(vmware -v | awk '{print $3}')
to
ESX_VERSION=$(vmware -v | awk '{print $4}')
The vmware version info comes back as the following on my host:
~ # vmware -v
VMware ESX Server 3i 3.5.0 build-207095
~ # vmware -v | awk '{print $3}'
Server
~ # vmware -v | awk '{print $4}'
3i—
Reply to this email directly or view it on GitHub.
from ghettovcb.
@fdleersn Thanks for helping out, it looks like the change in the case statement did in fact break ESXi 3.5 version checking. I've gone ahead and implemented your solution and will be pushing it up to the development branch. Thanks
from ghettovcb.
Related Issues (20)
- persistent rule for emails HOT 11
- am i missing something else from global config
- auto-backup.sh still shows old backup software HOT 1
- error backing up vms HOT 2
- getting backups to use another VMKernel port
- Calculated digest at EOF does not match expected result HOT 3
- ESXI 8 sending Logs per Mail, is it possible on ESXi8 ? HOT 1
- Upgrade for ESXi 8 does not persist - keeps reverting back to older version HOT 2
- SMTP protocol synchronization error (next input sent too soon: pipelining was not advertised) HOT 1
- How can cronjobs made persistent during a reboot with UEFI secure boot enabled HOT 4
- 8.0U2 --> ESX(i) Version not supported! HOT 5
- Using SCP to copy files in a remote destination folder
- VIB-Installation on VMware ESXi 8.0.1 build-21813344 not possible - acceptance level HOT 2
- 8.0U2 build 22380479 - VIB installation fails HOT 2
- Machine
- Calculated digest at EOF does not match expected result HOT 5
- not running cron jobs HOT 8
- Cp: can’t create ‘/etc/rc.local’: Operation not permitted HOT 1
- install on vcenter HOT 2
- DISK_BACKUP_FORMAT=thin but copies as a thick
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghettovcb.