Changeset 32487 in vbox
- Timestamp:
- Sep 14, 2010 2:32:55 PM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
r32251 r32487 261 261 %endif 262 262 %if %{?rpm_suse:1}%{!?rpm_suse:0} 263 %{fillup_and_insserv -fy vboxdrv} 264 %{fillup_and_insserv -fy vboxweb-service} 263 %{fillup_and_insserv -fy vboxdrv vboxweb-service} 265 264 %endif 266 265 %if %{?rpm_mdv:1}%{!?rpm_mdv:0} … … 311 310 312 311 %preun 312 %if %{?rpm_suse:1}%{!?rpm_suse:0} 313 %stop_on_removal vboxweb-service 314 %endif 315 %if %{?rpm_mdv:1}%{!?rpm_mdv:0} 316 %_preun_service vboxweb-service 317 %endif 318 %if %{?rpm_redhat:1}%{!?rpm_redhat:0} 319 if [ "$1" = 0 ]; then 320 /sbin/service vboxweb-service stop > /dev/null 321 /sbin/chkconfig --del vboxweb-service 322 fi 323 %endif 313 324 # check for active VMs 314 325 VBOXSVC_PID=`pidof VBoxSVC 2>/dev/null || true` 315 326 if [ -n "$VBOXSVC_PID" ]; then 316 # try graceful termination; terminate the webservice first 317 /etc/init.d/vboxweb-service stop || true 327 kill -USR1 $VBOXSVC_PID 318 328 sleep 1 319 329 if pidof VBoxSVC > /dev/null 2>&1; then … … 324 334 fi 325 335 fi 326 327 %if %{?rpm_suse:1}%{!?rpm_suse:0} 328 %stop_on_removal vboxweb-service 336 %if %{?rpm_suse:1}%{!?rpm_suse:0} 329 337 %stop_on_removal vboxdrv 330 338 %endif 331 339 %if %{?rpm_mdv:1}%{!?rpm_mdv:0} 332 %_preun_service vboxweb-service333 340 %_preun_service vboxdrv 334 341 %endif … … 337 344 /sbin/service vboxdrv stop > /dev/null 338 345 /sbin/chkconfig --del vboxdrv 339 /sbin/service vboxweb-service stop > /dev/null340 /sbin/chkconfig --del vboxweb-service341 346 %endif 342 347 rm -f /etc/udev/rules.d/10-vboxdrv.rules -
trunk/src/VBox/Installer/linux/vboxdrv.sh.in
r32183 r32487 161 161 start() 162 162 { 163 begin_msg "Starting VirtualBox kernel module "163 begin_msg "Starting VirtualBox kernel modules" 164 164 if ! running vboxdrv; then 165 165 if ! rm -f $DEVICE; then … … 213 213 stop() 214 214 { 215 begin_msg "Stopping VirtualBox kernel module "215 begin_msg "Stopping VirtualBox kernel modules" 216 216 if running vboxnetadp; then 217 217 if ! rmmod vboxnetadp 2>/dev/null; then … … 307 307 if ! $DODKMS install >> $LOG; then 308 308 fail_msg "Failed, trying without DKMS" 309 begin_msg "Recompiling VirtualBox kernel module "309 begin_msg "Recompiling VirtualBox kernel modules" 310 310 if ! $BUILDVBOXDRV \ 311 311 --save-module-symvers /tmp/vboxdrv-Module.symvers \ -
trunk/src/VBox/Installer/linux/vboxweb-service.sh.in
r32473 r32487 28 28 PATH=$PATH:/bin:/sbin:/usr/sbin 29 29 DEBIAN=%DEBIAN% 30 NOLSB=%NOLSB% 30 31 31 32 [ -f /lib/lsb/init-functions ] || NOLSB=yes … … 91 92 if [ -n "$NOLSB" ]; then 92 93 start_daemon() { 93 daemon --user $1 $2 $3 94 usr="$1" 95 shift 96 daemon --user $usr $@ 94 97 } 95 98 fail_msg() { … … 112 115 usr="$1" 113 116 shift 114 s tartproc -u "$usr" $@117 su - $usr -c "$*" 115 118 } 116 119 if [ -n "$NOLSB" ]; then … … 135 138 bin="$1" 136 139 shift 137 start-stop-daemon --chuid "$usr" --start --exec "$bin"-- $@140 start-stop-daemon --chuid $usr --start --exec $bin -- $@ 138 141 } 139 142 killproc() { … … 160 163 bin="$1" 161 164 shift 162 start-stop-daemon --chuid "$usr" --start --exec "$bin"-- $@165 start-stop-daemon --chuid $usr --start --exec $bin -- $@ 163 166 } 164 167 killproc() { … … 185 188 . /etc/rc.d/functions 186 189 start_daemon() { 187 $@ 190 usr="$1" 191 shift 192 su - $usr -c "$*" 188 193 test $? -eq 0 && add_daemon rc.`basename $2` 189 194 } … … 222 227 fi 223 228 start_daemon() { 224 # runuser 225 fail_msg "not supported on Slackware!" 226 return 227 $2 $3 229 usr="$1" 230 shift 231 su - $usr -c "$*" 228 232 } 229 233 fi … … 243 247 fi 244 248 start_daemon() { 245 # runuser 246 fail_msg "not supported on LFS!" 247 return 248 loadproc $2 $3 249 usr="$1" 250 shift 251 su - $usr -c "$*" 249 252 } 250 253 status() {
Note:
See TracChangeset
for help on using the changeset viewer.