diff -Naur VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/routines.sh VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/routines.sh --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/routines.sh 2010-10-18 17:37:03.000000000 +0200 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/routines.sh 2010-12-24 12:57:32.000000000 +0100 @@ -195,6 +195,9 @@ elif [ -f /etc/gentoo-release ]; then ro_SYS_TYPE=gentoo ro_INIT_TYPE=sysv + elif [ -f /etc/mageversion ]; then + ro_SYS_TYPE=magellan + ro_INIT_TYPE=sysv elif [ -x /sbin/chkconfig ]; then ro_SYS_TYPE=redhat ro_INIT_TYPE=sysv @@ -404,6 +407,12 @@ { log "addrunlevel: update-rc.d not found" && return 1; } rc-update del $1 > /dev/null 2>&1 rc-update add $1 default > /dev/null 2>&1 + # Magellan Linux + elif [ "$ro_SYS_TYPE" = "magellan" ]; then + test -x `which rc-config` || \ + { log "addrunlevel: rc-config not found" && return 1; } + rc-config del $1 > /dev/null 2>&1 + rc-config add $1 default > /dev/null 2>&1 # Linux from scratch, by the book elif [ "$ro_SYS_TYPE" = "lfs" ]; then test -x /etc/rc.d/init.d/$1 || \ @@ -492,6 +501,11 @@ test -x `which rc-update` || \ { log "addrunlevel: update-rc.d not found" && return 1; } rc-update del "$1" > /dev/null 2>&1 + # Magellan Linux + elif [ "$ro_SYS_TYPE" = "magellan" ]; then + test -x `which rc-config` || \ + { log "addrunlevel: rc-config not found" && return 1; } + rc-config del "$1" > /dev/null 2>&1 # Linux from scratch, by the book elif [ "$ro_SYS_TYPE" = "lfs" ]; then rm "/etc/rc0.d/K??$1" > /dev/null 2>&1 diff -Naur VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxdrv.sh.in VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxdrv.sh.in --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxdrv.sh.in 2010-12-17 16:14:23.000000000 +0100 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxdrv.sh.in 2010-12-24 13:08:17.000000000 +0100 @@ -26,6 +26,15 @@ # Short-Description: VirtualBox Linux kernel module ### END INIT INFO +#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k +#%start: 70 +#%stop: 30 + +#deps +#%needs: +#%before: +#%after: + PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH DEVICE=/dev/vboxdrv LOG="/var/log/vbox-install.log" @@ -65,6 +74,8 @@ system=suse elif [ -f /etc/gentoo-release ]; then system=gentoo + elif [ -f /etc/mageversion ]; then + system=magellan fi fi @@ -125,6 +136,17 @@ if [ "`which $0`" = "/sbin/rc" ]; then shift fi + elif [ "$system" = "magellan" ]; then + . /etc/rc.d/init.d/functions + fail_msg() { + evaluate_retval + } + succ_msg() { + evaluate_retval + } + begin_msg() { + echo -e ${COLOREDSTAR}"$1" + } else fail_msg() { echo " ...failed!" @@ -134,7 +156,7 @@ echo " ...done." } fi - if [ "$system" != "gentoo" ]; then + if [ "$system" != "gentoo" ] || [ "$system" != "magellan" ]; then begin_msg() { [ -z "${1:-}" ] && return 1 if [ -z "${2:-}" ]; then diff -Naur VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxweb-service.sh.in VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxweb-service.sh.in --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxweb-service.sh.in 2010-12-05 19:17:36.000000000 +0100 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxweb-service.sh.in 2010-12-24 13:06:40.000000000 +0100 @@ -25,6 +25,15 @@ # Description: VirtualBox Additions Service ### END INIT INFO +#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k +#%start: 80 +#%stop: 20 + +#deps +#%needs: +#%before: +#%after: + PATH=$PATH:/bin:/sbin:/usr/sbin DEBIAN=%DEBIAN% NOLSB=%NOLSB% @@ -57,6 +66,9 @@ elif [ -f /etc/gentoo-release ]; then system=gentoo PIDFILE="/var/run/vboxweb-service" +elif [ -f /etc/mageversion ]; then + system=magellan + PIDFILE="/var/run/vboxweb-service" elif [ -f /etc/arch-release ]; then system=arch PIDFILE="/var/run/vboxweb-service" @@ -183,6 +195,31 @@ fi fi +if [ "$system" = "magellan" ]; then + . /etc/rc.d/init.d/functions + start_daemon() { + usr="$1" + shift + bin="$1" + shift + start-stop-daemon --background --chuid $usr --start --exec $bin -- $@ + } + killproc() { + start-stop-daemon --stop --exec $@ + } + if [ -n "$NOLSB" ]; then + fail_msg() { + evaluate_retval + } + succ_msg() { + evaluate_retval + } + begin_msg() { + echo -e ${COLOREDSTAR}"$1" + } + fi +fi + if [ "$system" = "arch" ]; then USECOLOR=yes . /etc/rc.d/functions