From 41beddc8562e53e36fcc0ce074b014ef9ec1ee63 Mon Sep 17 00:00:00 2001 From: Christian Rößler Date: Tue, 29 Apr 2014 16:30:58 +0200 Subject: [vbox] Simplified script list to be patched with openslx binary path --- remote/modules/vbox/module.build | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/remote/modules/vbox/module.build b/remote/modules/vbox/module.build index 5a533089..f4a8610a 100644 --- a/remote/modules/vbox/module.build +++ b/remote/modules/vbox/module.build @@ -1,11 +1,16 @@ #!/bin/bash patch_vbox_scripts() { - # patching some virtualbox utility scripts to include openslx-busybox paths. Strange sed-ing, as the added - # openslx paths need to be at the end of PATH to not impede with system binaries to not impede with system binaries + # Patching virtualbox utility scripts to include openslx-busybox binary paths. Strange sed-ing, as the openslx + # binary paths need to be at the end of PATH to not impede with system binaries. + # It seems sufficient to patch just VBox, as eg. vboxmanage, vboxheadless etc. are just links to VBox. + # If only vboxmanage, vboxheadless or such should be patched (and not the base script VBox) just use a list + # in the loop (eg. 'for i in virtualbox vboxmanage vboxheadless; do'). These links will be replaced by patched + # 'real' files. Of course it will not make sense if VBox is included in the list, then. + # Patched files will be saved with extension .original. + pinfo "Patching virtual box scripts to include openslx (busybox)-paths ..." - # vboxmanage is a link to VBox; will get unlinked. Original link will be vboxmanage.original - for i in virtualbox vboxmanage vboxheadless; do + for i in VBox; do pinfo "Patching virtual box script $i ..." SCRIPTPATH=$(grep -m 1 PATH "${MODULE_BUILD_DIR}/usr/bin/$i"|sed 's/"//g') # assume first hit is real path sed -i "-i.original" "/^PATH=/c ${SCRIPTPATH}:/opt/openslx/bin:/opt/openslx/usr/bin:/opt/openslx/sbin"\ -- cgit v1.2.3-55-g7522