vboxdrv.sh revision b5c54fea3b0b605abd04782cc858e1f030ff4a29
# innotek VirtualBox
# Linux kernel module init script
#
# Copyright (C) 2006-2007 innotek GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
# chkconfig: 35 30 60
# description: VirtualBox Linux kernel module
#
### BEGIN INIT INFO
# Provides: vboxdrv
# Required-Start: $syslog
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: VirtualBox Linux kernel module
### END INIT INFO
if [ -f /etc/redhat-release ]; then
elif [ -f /etc/SuSE-release ]; then
elif [ -f /etc/gentoo-release ]; then
else
fi
if [ "$system" = "redhat" ]; then
echo
}
echo
}
echo -n "$1"
}
fi
if [ "$system" = "suse" ]; then
rc_status -v
}
rc_status -v
}
echo -n "$1"
}
fi
if [ "$system" = "gentoo" ]; then
. /sbin/functions.sh
eend 1
}
eend $?
}
ebegin $1
}
shift
fi
fi
if [ "$system" = "other" ]; then
echo " ...fail!"
}
echo " ...done."
}
echo -n $1
}
fi
eerror $1
exit 1
fi
echo "($1)"
exit 1
}
}
begin "Starting VirtualBox kernel module "
fail "Kernel module not found"
}
running || {
}
}
sleep 1
}
if [ ! -c $dev ]; then
min=0
else
maj=10
fi
fi
fail "Cannot locate the VirtualBox device"
}
}
fi
chown :$groupname $dev || {
fail "Cannot change owner $groupname for device $dev"
}
return 0
}
stop() {
begin "Stopping VirtualBox kernel module "
if running; then
fi
return 0
}
stop && start
return 0
}
. "$CONFIG"
stop
begin "Removing old VirtualBox kernel module "
fi
begin "Recompiling VirtualBox kernel module "
if ! $INSTALL_DIR/src/build_in_tmp install > /var/log/vbox-install.log 2>&1; then
fail "Look at /var/log/vbox-install.log to find out what went wrong"
fi
}
if running; then
echo "VirtualBox kernel module is loaded."
else
echo "VirtualBox kernel module is not loaded."
fi
}
case "$1" in
;;
stop)
stop
;;
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status|setup}"
exit 1
esac
exit