vboxdrv.init.tmpl revision 7e958a4329e4f9d83f597e26c72121969091e87b
#
# 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:
# Short-Description: VirtualBox Linux kernel module
### END INIT INFO
fi
else
{
if [ -z "${1:-}" ]; then
return 1
fi
if [ -z "${2:-}" ]; then
echo -n "$1:"
return
fi
echo -n "$1: $2"
}
{
[ -z "${1:-}" ] && return 1
if [ $1 -eq 0 ]; then
echo "."
else
echo " failed!"
fi
}
{
echo "$@"
}
{
echo "$@"
}
fi
failure()
{
echo ""
log_failure_msg "$1"
exit 0
}
running()
{
}
start()
{
# ensure the module is loaded
if ! running; then
failure "No suitable module for running kernel found."
fi
fi
sleep .2
fi
# ensure the character special exists
if [ ! -c $DEVICE ]; then
MINOR=0
else
MAJOR=10
fi
fi
failure "Cannot locate device major."
fi
fi
fi
# ensure permissions
if ! chown :$GROUPNAME $DEVICE; then
failure "Cannot change owner $GROUPNAME for device $DEVICE."
fi
}
stop()
{
if running; then
fi
fi
fi
}
case "$1" in
;;
stop)
stop
;;
stop
;;
stop
log_daemon_msg "Recompiling VirtualBox kernel module" "$MODNAME"
fi
;;
if running; then
log_success_msg "VirtualBox kernel module is loaded."
else
log_failure_msg "VirtualBox kernel module is not loaded."
fi
;;
*)
log_failure_msg "Usage: $0 {start|stop|restart|status|setup}"
exit 3
esac
exit 0