From fdb8414938a9186a63ce58516318138e45d557be Mon Sep 17 00:00:00 2001 From: David Parsons Date: Sat, 17 Dec 2016 17:09:46 +0000 Subject: [PATCH] Release candidate for 2.0.9 --- esxi-install.sh | 28 +++++++++++++++++----------- gettools.py | 0 local.sh | 7 +++++++ smctest.sh | 2 +- unlocker.py | 15 ++++++++------- win-install.cmd | 0 win-uninstall.cmd | 0 7 files changed, 33 insertions(+), 19 deletions(-) mode change 100644 => 100755 gettools.py mode change 100755 => 100644 win-install.cmd mode change 100755 => 100644 win-uninstall.cmd diff --git a/esxi-install.sh b/esxi-install.sh index dc9d5a6..30ceb96 100755 --- a/esxi-install.sh +++ b/esxi-install.sh @@ -9,6 +9,10 @@ echo Copyright: Dave Parsons 2011-16 # Ensure we only use unmodified commands export PATH=/bin:/sbin:/usr/bin:/usr/sbin +# Ensure we run from the patcher directory +cd "`dirname $0`" + + # Create tmp folder for patching the files echo Creating unlocker vmtar disk # Create tmp folder for patching the files @@ -18,23 +22,25 @@ mkdir -p tmp/lib cp -v /bin/vmx tmp/bin cp -v /bin/vmx-debug tmp/bin cp -v /bin/vmx-stats tmp/bin -cp -v /lib/libvmkctl.so tmp/lib -if [ -f /lib64/libvmkctl.so ]; then - mkdir -p tmp/lib64 - cp -v /lib64/libvmkctl.so tmp/lib64 -fi +# Now using sed in the local.sh script +#cp -v /lib/libvmkctl.so tmp/lib +# +#if [ -f /lib64/libvmkctl.so ]; then +# mkdir -p tmp/lib64 +# cp -v /lib64/libvmkctl.so tmp/lib64 +#fi # Patch the files python unlocker.py # Create the vmtar file for ESXi kernel -if [ -f /lib64/libvmkctl.so ]; then - tar cvf tmp/unlocker.tar -C tmp bin lib lib64 -else - tar cvf tmp/unlocker.tar -C tmp bin lib -fi - +#if [ -f /lib64/libvmkctl.so ]; then +# tar cvf tmp/unlocker.tar -C tmp bin lib lib64 +#else +# tar cvf tmp/unlocker.tar -C tmp bin lib +#fi +tar cvf tmp/unlocker.tar -C tmp bin vmtar -c tmp/unlocker.tar -v -o tmp/unlocker.vmtar gzip tmp/unlocker.vmtar mv tmp/unlocker.vmtar.gz tmp/unlocker.vgz diff --git a/gettools.py b/gettools.py old mode 100644 new mode 100755 diff --git a/local.sh b/local.sh index 4131fbf..5fce030 100755 --- a/local.sh +++ b/local.sh @@ -8,6 +8,13 @@ echo Copyright: Dave Parsons 2011-16 /etc/init.d/hostd status /etc/init.d/hostd stop + vmkramdisk /bootbank/unlocker.vgz + +sed -i 's/applesmc/vmkernel/g' /lib/libvmkctl.so +if [ -f /lib64/libvmkctl.so ]; then + sed -i 's/applesmc/vmkernel/g' /lib64/libvmkctl.so +fi + /etc/init.d/hostd start /etc/init.d/hostd status diff --git a/smctest.sh b/smctest.sh index 11a5234..ca77bec 100755 --- a/smctest.sh +++ b/smctest.sh @@ -1,2 +1,2 @@ #!/bin/sh -vim-cmd hostsvc/hosthardware | grep smcPresent +vim-cmd hostsvc/hosthardware | grep smcPresent | cut -d ',' -f 1 | sed 's/^[ \t]*//' diff --git a/unlocker.py b/unlocker.py index 01f72be..161b8c5 100755 --- a/unlocker.py +++ b/unlocker.py @@ -413,13 +413,14 @@ def main(): else: print('Patching vmwarebase is not required on this system') - if osname == 'vmkernel': - # Patch ESXi 6.0 and 6.5 32 bit .so - patchvmkctl(libvmkctl32) - - # Patch ESXi 6.5 64 bit .so - if os.path.isfile(libvmkctl64): - patchvmkctl(libvmkctl64) + # Now using sed in the local.sh script + # if osname == 'vmkernel': + # # Patch ESXi 6.0 and 6.5 32 bit .so + # patchvmkctl(libvmkctl32) + # + # # Patch ESXi 6.5 64 bit .so + # if os.path.isfile(libvmkctl64): + # patchvmkctl(libvmkctl64) if __name__ == '__main__': diff --git a/win-install.cmd b/win-install.cmd old mode 100755 new mode 100644 diff --git a/win-uninstall.cmd b/win-uninstall.cmd old mode 100755 new mode 100644