VirtualBox

Ticket #5833: virtualbox_install-3.1.2.u

File virtualbox_install-3.1.2.u, 4.8 KB (added by Eric Joseph-Alexandre, 15 years ago)
Line 
1--- install-ori/routines.sh Thu Dec 17 14:37:35 2009
2+++ install/routines.sh Thu Dec 24 13:33:02 2009
3@@ -207,6 +207,10 @@
4 ro_SYS_TYPE=unknown
5 ro_INIT_TYPE=bsd
6 ro_RC_LOCAL=/etc/rc.local
7+ elif [ -f /etc/slitaz-release ]; then
8+ ro_SYS_TYPE=slitaz
9+ ro_INIT_TYPE=slitaz
10+ ro_RC_LOCAL=/etc/rcS.conf
11 elif [ -d /etc/init.d ]; then
12 ro_SYS_TYPE=unknown
13 ro_INIT_TYPE=sysv
14@@ -252,6 +256,9 @@
15 cp "$script" "/usr/sbin/$name" 2> /dev/null
16 chmod 755 "/usr/sbin/$name" 2> /dev/null
17 hav register $name System.Service $pardus_script
18+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
19+ cp "$script" "/etc/init.d/$name" 2> /dev/null
20+ chmod 755 "/etc/init.d/$name" 2> /dev/null
21 else
22 log "install_init_script: error: unknown init type"
23 return 1
24@@ -279,6 +286,8 @@
25 elif [ "$ro_INIT_TYPE" = "pardus" ]; then
26 hav remove $name
27 rm -f "/usr/sbin/$name" > /dev/null 2>&1
28+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
29+ rm -f "/etc/init.d/$name" > /dev/null 2>&1
30 else
31 log "remove_init_script: error: unknown init type"
32 return 1
33@@ -303,6 +312,8 @@
34 "/etc/rc.d/rc.$name" start >> $ro_LOG_FILE 2>&1
35 elif [ "$ro_INIT_TYPE" = "lfs" ]; then
36 "/etc/rc.d/init.d/$name" start >> $ro_LOG_FILE 2>&1
37+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
38+ "/etc/init.d/$name" start >> $ro_LOG_FILE 2>&1
39 elif [ "$ro_INIT_TYPE" = "pardus" ]; then
40 service $name on
41 else
42@@ -328,6 +339,8 @@
43 "/etc/rc.d/rc.$name" stop >> $ro_LOG_FILE 2>&1
44 elif [ "$ro_INIT_TYPE" = "lfs" ]; then
45 "/etc/rc.d/init.d/$name" stop >> $ro_LOG_FILE 2>&1
46+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
47+ "/etc/init.d/$name" stop >> $ro_LOG_FILE 2>&1
48 elif [ "$ro_INIT_TYPE" = "pardus" ]; then
49 service $name off
50 else
51@@ -425,6 +438,12 @@
52 echo "fi" >> $ro_RC_LOCAL
53 echo "" >> $ro_RC_LOCAL
54 fi
55+ # Slitaz GNU/Linux use /etc/rcS.conf to start services.
56+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
57+ if ! grep $1 $ro_RC_LOCAL
58+ then
59+ sed -i -e "s/RUN_DAEMONS=\"\(.*\)\"/RUN_DAEMONS=\"\1 $1\"/" $ro_RC_LOCAL
60+ fi
61 # Probably most unknown Linux systems will be sysv type ones. These can theoretically
62 # be handled automatically if people give us information about them.
63 elif [ "$ro_INIT_TYPE" = "sysv" ]; then
64@@ -484,6 +503,12 @@
65 rm "/etc/rc4.d/S??$1" > /dev/null 2>&1
66 rm "/etc/rc5.d/S??$1" > /dev/null 2>&1
67 rm "/etc/rc6.d/K??$1" > /dev/null 2>&1
68+ # Slitaz GNU/Linux
69+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
70+ if grep $1 $ro_RC_LOCAL
71+ then
72+ sed -i -e "s/$1//" $ro_RC_LOCAL
73+ fi
74 # Unknown sysv-type system
75 elif [ "$ro_INIT_TYPE" = "sysv" ]; then
76 echo 1>&2 "Please remove remove references to the initialization script"
77@@ -515,6 +540,8 @@
78 scriptname="/etc/rc.d/init.d/$name"
79 elif [ "$ro_INIT_TYPE" = "pardus" ]; then
80 scriptname="/usr/sbin/$name"
81+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
82+ scriptname="/etc/init.d/$name"
83 else
84 log "$self: error: unknown init type"
85 return 1
86@@ -563,6 +590,8 @@
87 scriptname="/etc/rc.d/init.d/$name"
88 elif [ "$ro_INIT_TYPE" = "pardus" ]; then
89 scriptname="/usr/sbin/$name"
90+ elif [ "$ro_INIT_TYPE" = "slitaz" ]; then
91+ scriptname="/etc/rc.d/init.d/$name"
92 else
93 log "$self: error: unknown init type"
94 return 1
95--- install-ori/vboxdrv.sh Thu Dec 17 14:37:35 2009
96+++ install/vboxdrv.sh Thu Dec 24 11:49:30 2009
97@@ -63,6 +63,8 @@
98 system=suse
99 elif [ -f /etc/gentoo-release ]; then
100 system=gentoo
101+ elif [ -f /etc/slitaz-release ]; then
102+ system=slitaz
103 fi
104 fi
105
106@@ -123,6 +125,19 @@
107 if [ "`which $0`" = "/sbin/rc" ]; then
108 shift
109 fi
110+ elif [ "$system" = "slitaz" ]; then
111+ if [ -f /etc/init.d/rc.functions ]; then
112+ . /etc/init.d/rc.functions
113+ fi
114+ fail_msg() {
115+ status
116+ }
117+ succ_msg() {
118+ status "$?"
119+ }
120+ begin_msg() {
121+ echo "$1"
122+ }
123 else
124 fail_msg() {
125 echo " ...failed!"
126@@ -132,6 +147,7 @@
127 echo " ...done."
128 }
129 fi
130+
131 if [ "$system" != "gentoo" ]; then
132 begin_msg() {
133 [ -z "${1:-}" ] && return 1
134@@ -169,7 +185,11 @@
135 if ! modprobe vboxdrv > /dev/null 2>&1; then
136 failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
137 fi
138- sleep .2
139+ if [ "$system" = "slitaz" ]; then
140+ sleep 1
141+ else
142+ sleep .2
143+ fi
144 fi
145 # ensure the character special exists
146 if [ ! -c $DEVICE ]; then

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy