Skip to content

Commit

Permalink
Allow unlocker to be disabled on ESXi via boot option
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDonk committed Dec 19, 2016
1 parent fdb8414 commit b13e0dd
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@ echo VMware ESXi 6.x Unlocker 2.0.9
echo ===============================
echo Copyright: Dave Parsons 2011-16

/etc/init.d/hostd status
/etc/init.d/hostd stop
if bootOption -o | grep -q 'nounlocker'; then

vmkramdisk /bootbank/unlocker.vgz
echo Unlocker disabled via boot options >> /var/log/unlocker.log

else

echo Unlocker running >> /var/log/unlocker.log

/etc/init.d/hostd status >> /var/log/unlocker.log
/etc/init.d/hostd stop >> /var/log/unlocker.log

vmkramdisk /bootbank/unlocker.vgz >> /var/log/unlocker.log

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 >> /var/log/unlocker.log
/etc/init.d/hostd status >> /var/log/unlocker.log

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
exit 0

0 comments on commit b13e0dd

Please sign in to comment.