--- trunk/virtualbox/virtualbox-wrapper.sh 2007/04/14 14:11:02 130 +++ trunk/virtualbox/virtualbox-wrapper.sh 2008/03/27 14:14:30 552 @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /root/magellan-cvs/src/virtualbox/virtualbox-wrapper.sh,v 1.3 2007-04-14 14:11:02 niro Exp $ +# $Header: /root/magellan-cvs/src/virtualbox/virtualbox-wrapper.sh,v 1.4 2008-03-27 14:14:30 niro Exp $ # Wrapper for virtual for Magellan-Linux LIBDIR=/usr/lib @@ -20,6 +20,16 @@ # check for the vbox module if [[ ! -w /dev/vboxdrv ]] then + if [[ ! -z ${DISPLAY} ]] + then + dialog() { xterm -e "echo -e \"$@\"; echo; echo \"Press [Enter] to continue ...\"; read"; } + [[ -x /usr/bin/xmessage ]] && dialog() { echo -e "$@" | /usr/bin/xmessage -center -button cancel -file -; } + [[ -x /usr/bin/Xdialog ]] && dialog() { /usr/bin/Xdialog --infobox "$@" 0 0 --no-ok --center; } + + dialog "Please make sure that you have the virtualbox kernel module installed and loaded.\n" \ + "Run 'virtualbox-config' to get the kernel module compiled and installed." + fi + echo -e ${COLRED}"Please make sure that you have the virtualbox kernel module installed and loaded."${COLDEFAULT} echo -e ${COLRED}"Run 'virtualbox-config' to get the kernel module compiled and installed."${COLDEFAULT} exit 1