Magellan Linux

Contents of /trunk/virtualbox/patches/virtualbox-4.0.0-vboxdrv-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1381 - (show annotations) (download)
Wed Jun 29 23:28:26 2011 UTC (12 years, 10 months ago) by niro
File size: 4923 byte(s)
-virtualbox4 patches
1 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
2 --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/routines.sh 2010-10-18 17:37:03.000000000 +0200
3 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/routines.sh 2010-12-24 12:57:32.000000000 +0100
4 @@ -195,6 +195,9 @@
5 elif [ -f /etc/gentoo-release ]; then
6 ro_SYS_TYPE=gentoo
7 ro_INIT_TYPE=sysv
8 + elif [ -f /etc/mageversion ]; then
9 + ro_SYS_TYPE=magellan
10 + ro_INIT_TYPE=sysv
11 elif [ -x /sbin/chkconfig ]; then
12 ro_SYS_TYPE=redhat
13 ro_INIT_TYPE=sysv
14 @@ -404,6 +407,12 @@
15 { log "addrunlevel: update-rc.d not found" && return 1; }
16 rc-update del $1 > /dev/null 2>&1
17 rc-update add $1 default > /dev/null 2>&1
18 + # Magellan Linux
19 + elif [ "$ro_SYS_TYPE" = "magellan" ]; then
20 + test -x `which rc-config` || \
21 + { log "addrunlevel: rc-config not found" && return 1; }
22 + rc-config del $1 > /dev/null 2>&1
23 + rc-config add $1 default > /dev/null 2>&1
24 # Linux from scratch, by the book
25 elif [ "$ro_SYS_TYPE" = "lfs" ]; then
26 test -x /etc/rc.d/init.d/$1 || \
27 @@ -492,6 +501,11 @@
28 test -x `which rc-update` || \
29 { log "addrunlevel: update-rc.d not found" && return 1; }
30 rc-update del "$1" > /dev/null 2>&1
31 + # Magellan Linux
32 + elif [ "$ro_SYS_TYPE" = "magellan" ]; then
33 + test -x `which rc-config` || \
34 + { log "addrunlevel: rc-config not found" && return 1; }
35 + rc-config del "$1" > /dev/null 2>&1
36 # Linux from scratch, by the book
37 elif [ "$ro_SYS_TYPE" = "lfs" ]; then
38 rm "/etc/rc0.d/K??$1" > /dev/null 2>&1
39 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
40 --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxdrv.sh.in 2010-12-17 16:14:23.000000000 +0100
41 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxdrv.sh.in 2010-12-24 13:08:17.000000000 +0100
42 @@ -26,6 +26,15 @@
43 # Short-Description: VirtualBox Linux kernel module
44 ### END INIT INFO
45
46 +#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
47 +#%start: 70
48 +#%stop: 30
49 +
50 +#deps
51 +#%needs:
52 +#%before:
53 +#%after:
54 +
55 PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
56 DEVICE=/dev/vboxdrv
57 LOG="/var/log/vbox-install.log"
58 @@ -65,6 +74,8 @@
59 system=suse
60 elif [ -f /etc/gentoo-release ]; then
61 system=gentoo
62 + elif [ -f /etc/mageversion ]; then
63 + system=magellan
64 fi
65 fi
66
67 @@ -125,6 +136,17 @@
68 if [ "`which $0`" = "/sbin/rc" ]; then
69 shift
70 fi
71 + elif [ "$system" = "magellan" ]; then
72 + . /etc/rc.d/init.d/functions
73 + fail_msg() {
74 + evaluate_retval
75 + }
76 + succ_msg() {
77 + evaluate_retval
78 + }
79 + begin_msg() {
80 + echo -e ${COLOREDSTAR}"$1"
81 + }
82 else
83 fail_msg() {
84 echo " ...failed!"
85 @@ -134,7 +156,7 @@
86 echo " ...done."
87 }
88 fi
89 - if [ "$system" != "gentoo" ]; then
90 + if [ "$system" != "gentoo" ] || [ "$system" != "magellan" ]; then
91 begin_msg() {
92 [ -z "${1:-}" ] && return 1
93 if [ -z "${2:-}" ]; then
94 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
95 --- VirtualBox-4.0.0_OSE/src/VBox/Installer/linux/vboxweb-service.sh.in 2010-12-05 19:17:36.000000000 +0100
96 +++ VirtualBox-4.0.0_OSE-magellan/src/VBox/Installer/linux/vboxweb-service.sh.in 2010-12-24 13:06:40.000000000 +0100
97 @@ -25,6 +25,15 @@
98 # Description: VirtualBox Additions Service
99 ### END INIT INFO
100
101 +#%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
102 +#%start: 80
103 +#%stop: 20
104 +
105 +#deps
106 +#%needs:
107 +#%before:
108 +#%after:
109 +
110 PATH=$PATH:/bin:/sbin:/usr/sbin
111 DEBIAN=%DEBIAN%
112 NOLSB=%NOLSB%
113 @@ -57,6 +66,9 @@
114 elif [ -f /etc/gentoo-release ]; then
115 system=gentoo
116 PIDFILE="/var/run/vboxweb-service"
117 +elif [ -f /etc/mageversion ]; then
118 + system=magellan
119 + PIDFILE="/var/run/vboxweb-service"
120 elif [ -f /etc/arch-release ]; then
121 system=arch
122 PIDFILE="/var/run/vboxweb-service"
123 @@ -183,6 +195,31 @@
124 fi
125 fi
126
127 +if [ "$system" = "magellan" ]; then
128 + . /etc/rc.d/init.d/functions
129 + start_daemon() {
130 + usr="$1"
131 + shift
132 + bin="$1"
133 + shift
134 + start-stop-daemon --background --chuid $usr --start --exec $bin -- $@
135 + }
136 + killproc() {
137 + start-stop-daemon --stop --exec $@
138 + }
139 + if [ -n "$NOLSB" ]; then
140 + fail_msg() {
141 + evaluate_retval
142 + }
143 + succ_msg() {
144 + evaluate_retval
145 + }
146 + begin_msg() {
147 + echo -e ${COLOREDSTAR}"$1"
148 + }
149 + fi
150 +fi
151 +
152 if [ "$system" = "arch" ]; then
153 USECOLOR=yes
154 . /etc/rc.d/functions