-
Notifications
You must be signed in to change notification settings - Fork 28
INIT_SCRIPTS not run when using VMWare Tools #52
Comments
If any script inside the INIT_SCRIPTS variable is not an absolute path then its path will be prefixed either by the disk drive letter of the CD-ROM containing the 'context.sh' or simply by the system drive letter. Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Hi, you are correct that Correct me if I am wrong or I misunderstood something. Either way I am tackling this issue in another PR: #89 It will check if the script is absolute path and if it is then it will use this path unmodified but if the script path is relative then it will be prefixed as you suggested here. Hopefully by doing it like this I don't break anyone's code - who used absolute paths to workaround this issue should be unaffected and the others now can enjoy your solution. If my change does not solve your issue feel free to reopen this and update your PR to resolve the merging conflicts. Thanks |
* F #87: Add support for recontextualization Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Refactor wait loop Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Fix contextPaths object Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Refactor log messages Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Fix subshell issue with termination - Reexecuting the powershell with 64bit version will break service stop and fail to terminate both powershell sessions (32bit and 64bit). It will also create orphaned process tree which will continue to hold file descriptors. - Disable subshell for the whole script and instead use new pswrapper function only where it is truly needed and where the subprocess is expected to terminate on its own. Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Add support for nssm - The problem with orphans was caused by rhsrvany itself which does not handle stop service correctly. The solution was better service manager: http://nssm.cc/ - If nssm directory is present then nssm will be used otherwise the wixl will fallback to rhsrvany again. Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Move context.ps1 to src dir Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Add nssm.exe binaries and remove src Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Add SRV_MANAGER parameter Do not check the existence of the nssm.exe vs rhsrvany.exe but enforce the service manager by env. variable SRV_MANAGER - defaults to 'nssm'. Usage: % env SRV_MANAGER=rhsrvany VERSION=5.13 ./generate-all.sh % env SRV_MANAGER=nssm VERSION=5.13 ./generate-all.sh Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Update comments Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Update README Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Update example prompt in README Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * M #-: Add support for PASSWORD_BASE64 Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * M #-: Fix newlines in older powershells (e.g.: 4) Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * F #87: Improve contextualization Create a copy instead of working directly on the context.sh. This way even when context changes during the contextualization - we will have the proper checksum of the actually applied file and we can still act subsequently on the waiting changed and unapplied context.sh. Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * M #-: Remove Start-Script copy after the use Signed-off-by: Petr Ospalý <pospaly@opennebula.io> * B #52: Fix INIT_SCRIPTS in VMWare If any script inside the INIT_SCRIPTS variable is not an absolute path then its path will be prefixed either by the disk drive letter of the CD-ROM containing the 'context.sh' or simply by the system drive letter. Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
I'm partially reopening this issue as I see 2 problems:
|
Thanks for taking a look at this. I'm not in a position where I can test out changes with OpenNebula anymore, but based on @vholer's description it sounds like |
Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Move 'ContextLetter' destination from the System Drive (most often 'C:\') to 'C:\.onecontext\' where 'context.sh' is already stored. Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Signed-off-by: Petr Ospalý <pospaly@opennebula.io>
Implemented as part of #91 |
Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
If we end up using the VMWare tools to pull the context information instead of the CONTEXT ISO, the
$contextLetter
variable never gets set. I'd expect this to get set up$env:SystemDrive\
. Without this being set, scripts declared in therunScripts
function don't run because the this doesn't set the path correctly:addon-context-windows/context.ps1
Line 664 in d25022a
addon-context-windows/context.ps1
Line 550 in d25022a
The text was updated successfully, but these errors were encountered: