Skip to content

Commit

Permalink
Disable license check due to issue #158 (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruzickap authored Aug 21, 2020
1 parent 3c220f4 commit 806408c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vagrant_init_destroy_boxes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@ check_vagrant_vm() {
fi

LICENSE_STATUS=$(vagrant winrm --shell cmd --command "cscript C:\Windows\System32\slmgr.vbs /dli" | uniq)
if [[ ! ${LICENSE_STATUS} =~ (10|90|180)\ day ]]; then
# if [[ ! ${LICENSE_STATUS} =~ (10|90|180)\ day ]]; then
echo "${LICENSE_STATUS}"
echo "*** Licensing issue - expiration should be 10 or 180 days !"
vagrant_cleanup
exit 4
fi
# vagrant_cleanup
# exit 4
# fi

WIN_VERSION=$(vagrant winrm --shell cmd --command 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"')
if [[ ! ${VAGRANT_BOX_FILE} =~ $(echo "${WIN_VERSION}" | awk '/^OS Name/ { print tolower($4 "-" $5 "-" $6) }') ]]; then
echo "${WIN_VERSION}"
echo "*** Windows version mismatch \"$(echo "${WIN_VERSION}" | awk '{ print tolower($4 "-" $5 "-" $6) }')\" vs \"${VAGRANT_BOX_FILE}\" !"
vagrant_cleanup
exit 5
fi
;;
Expand Down

0 comments on commit 806408c

Please sign in to comment.