1 |
#!/bin/bash |
#!/bin/bash |
2 |
# $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.5 2008-06-10 16:29:07 niro Exp $ |
3 |
# Wrapper for virtual for Magellan-Linux |
# Wrapper for virtual for Magellan-Linux |
4 |
|
|
5 |
LIBDIR=/usr/lib |
LIBDIR=/usr/lib |
20 |
# check for the vbox module |
# check for the vbox module |
21 |
if [[ ! -w /dev/vboxdrv ]] |
if [[ ! -w /dev/vboxdrv ]] |
22 |
then |
then |
23 |
|
if [[ ! -z ${DISPLAY} ]] |
24 |
|
then |
25 |
|
dialog() { xterm -T "VirtualBox" -e "echo -e \"$@\"; echo; echo \"Press [Enter] to continue ...\"; read"; } |
26 |
|
[[ -x /usr/bin/xmessage ]] && dialog() { echo -e "$@" | /usr/bin/xmessage -center -button cancel -file -; } |
27 |
|
[[ -x /usr/bin/Xdialog ]] && dialog() { /usr/bin/Xdialog --no-ok --center --infobox "$@" 0 0; } |
28 |
|
|
29 |
|
dialog "Please make sure that you have the virtualbox kernel module installed and loaded |
30 |
|
Run 'virtualbox-config' to get the kernel module compiled and installed." |
31 |
|
fi |
32 |
|
|
33 |
echo -e ${COLRED}"Please make sure that you have the virtualbox kernel module installed and loaded."${COLDEFAULT} |
echo -e ${COLRED}"Please make sure that you have the virtualbox kernel module installed and loaded."${COLDEFAULT} |
34 |
echo -e ${COLRED}"Run 'virtualbox-config' to get the kernel module compiled and installed."${COLDEFAULT} |
echo -e ${COLRED}"Run 'virtualbox-config' to get the kernel module compiled and installed."${COLDEFAULT} |
35 |
exit 1 |
exit 1 |