vboxadd.sh revision da5293b4b0422bf0a8cf0a3018144cf2f56cf855
# InnoTek VirtualBox
# Linux Additions kernel module init script
#
# Copyright (C) 2006 InnoTek Systemberatung 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.
#
# If you received this file as part of a commercial VirtualBox
# distribution, then only the terms of your commercial VirtualBox
# license agreement apply instead of the previous paragraph.
# chkconfig: 35 30 60
# description: VirtualBox Linux Additions kernel module
#
### BEGIN INIT INFO
# Provides: vboxadd
# Required-Start: $syslog
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: VirtualBox Linux Additions kernel module
### END INIT INFO
if [ -f /etc/redhat-release ]; then
elif [ -f /etc/SuSE-release ]; then
elif [ -f /etc/debian_version ]; then
elif [ -f /etc/gentoo-release ]; then
elif [ -f /etc/slackware-version ]; then
else
echo "$0: Unknown system" 1>&2
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" = "debian" ]; then
echo "...fail!"
}
echo "...done."
}
echo -n $1
}
fi
if [ "$system" = "gentoo" ]; then
. /sbin/functions.sh
eend 1
}
eend $?
}
ebegin $1
}
shift
fi
fi
if [ "$system" = "slackware" ]; then
echo "...fail!"
}
echo "...done."
}
echo -n $1
}
fi
file=""
eerror $1
exit 1
fi
echo -n "($1)"
exit 1
}
test -z "$file" && {
fail "Kernel module not found"
}
}
running || {
}
}
sleep 1
}
if [ ! -c $dev ]; then
fail "Cannot locate device major"
}
}
fi
return 0
}
stop() {
if running; then
fi
return 0
}
stop && start
return 0
}
if running; then
echo "The VirtualBox Additions are currently running."
else
echo "The VirtualBox Additions are not currently running."
fi
}
case "$1" in
;;
stop)
stop
;;
;;
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit