VirtualBox

source: vbox/trunk/src/VBox/Installer/solaris/vboxconfig.sh@ 25646

Last change on this file since 25646 was 25646, checked in by vboxsync, 15 years ago

Solaris/Installer: fixed explicit unload of USB client driver.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 19.8 KB
Line 
1#!/bin/sh
2# $Id: vboxconfig.sh 25646 2010-01-05 09:36:37Z vboxsync $
3
4# Sun VirtualBox
5# VirtualBox Configuration Script, Solaris host.
6#
7# Copyright (C) 2009 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22
23# Never use exit 2 or exit 20 etc., the return codes are used in
24# SRv4 postinstall procedures which carry special meaning. Just use exit 1 for failure.
25
26# S10 or OpenSoalris
27HOST_OS_MAJORVERSION=`uname -r`
28# Which OpenSolaris version (snv_xxx)?
29HOST_OS_MINORVERSION=`uname -v | sed -e "s/snv_//" -e "s/[^0-9]//"`
30
31DIR_VBOXBASE=/opt/VirtualBox
32DIR_MOD_32="/platform/i86pc/kernel/drv"
33DIR_MOD_64=$DIR_MOD_32/amd64
34
35BIN_ADDDRV=/usr/sbin/add_drv
36BIN_REMDRV=/usr/sbin/rem_drv
37BIN_MODLOAD=/usr/sbin/modload
38BIN_MODUNLOAD=/usr/sbin/modunload
39BIN_MODINFO=/usr/sbin/modinfo
40BIN_DEVFSADM=/usr/sbin/devfsadm
41BIN_BOOTADM=/sbin/bootadm
42BIN_SVCADM=/usr/sbin/svcadm
43BIN_SVCCFG=/usr/sbin/svccfg
44BIN_IFCONFIG=/sbin/ifconfig
45BIN_ID=/usr/bin/id
46
47# "vboxdrv" is also used in sed lines here (change those as well if it ever changes)
48MOD_VBOXDRV=vboxdrv
49DESC_VBOXDRV="Host"
50
51MOD_VBOXNET=vboxnet
52DESC_VBOXNET="NetAdapter"
53
54MOD_VBOXFLT=vboxflt
55DESC_VBOXFLT="NetFilter"
56
57# No Separate VBI since (3.1)
58#MOD_VBI=vbi
59#DESC_VBI="Kernel Interface"
60
61MOD_VBOXUSBMON=vboxusbmon
62DESC_VBOXUSBMON="USBMonitor"
63
64MOD_VBOXUSB=vboxusb
65DESC_VBOXUSB="USB"
66
67FATALOP=fatal
68NULLOP=nulloutput
69SILENTOP=silent
70IPSOP=ips
71ISSILENT=
72ISIPS=
73
74infoprint()
75{
76 if test "$ISSILENT" != "$SILENTOP"; then
77 echo 1>&2 "$1"
78 fi
79}
80
81subprint()
82{
83 if test "$ISSILENT" != "$SILENTOP"; then
84 echo 1>&2 " - $1"
85 fi
86}
87
88warnprint()
89{
90 if test "$ISSILENT" != "$SILENTOP"; then
91 echo 1>&2 " * Warning!! $1"
92 fi
93}
94
95errorprint()
96{
97 echo 1>&2 "## $1"
98}
99
100
101# check_bin_path()
102# !! failure is always fatal
103check_bin_path()
104{
105 if test -z "$1"; then
106 errorprint "missing argument to check_bin_path()"
107 exit 1
108 fi
109
110 if test ! -x "$1"; then
111 errorprint "$1 missing or is not an executable"
112 exit 1
113 fi
114 return 0
115}
116
117# find_bins()
118# !! failure is always fatal
119find_bins()
120{
121 # Search only for binaries that might be in different locations
122 BIN_IFCONFIG=`which ifconfig 2> /dev/null`
123 BIN_SVCS=`which svcs 2> /dev/null`
124 BIN_ID=`which id 2> /dev/null`
125
126 check_bin_path "$BIN_ID"
127 check_bin_path "$BIN_ADDDRV"
128 check_bin_path "$BIN_REMDRV"
129 check_bin_path "$BIN_MODLOAD"
130 check_bin_path "$BIN_MODUNLOAD"
131 check_bin_path "$BIN_MODINFO"
132 check_bin_path "$BIN_DEVFSADM"
133 check_bin_path "$BIN_BOOTADM"
134 check_bin_path "$BIN_SVCADM"
135 check_bin_path "$BIN_SVCCFG"
136 check_bin_path "$BIN_SVCS"
137 check_bin_path "$BIN_IFCONFIG"
138}
139
140# check_root()
141# !! failure is always fatal
142check_root()
143{
144 # Don't use "-u" option as some id binaries don't support it, instead
145 # rely on "uid=101(username) gid=10(groupname) groups=10(staff)" output
146 curuid=`$BIN_ID | cut -f 2 -d '=' | cut -f 1 -d '('`
147 if test "$curuid" -ne 0; then
148 errorprint "This script must be run with administrator privileges."
149 exit 1
150 fi
151}
152
153# check_zone()
154# !! failure is always fatal
155check_zone()
156{
157 currentzone=`zonename`
158 if test "$currentzone" != "global"; then
159 errorprint "This script must be run from the global zone."
160 exit 1
161 fi
162}
163
164# check_isa()
165# !! failure is always fatal
166check_isa()
167{
168 currentisa=`uname -i`
169 if test "$currentisa" = "i86xpv"; then
170 errorprint "VirtualBox cannot run under xVM Dom0! Fatal Error, Aborting installation!"
171 exit 1
172 fi
173}
174
175# check_module_arch()
176# !! failure is always fatal
177check_module_arch()
178{
179 cputype=`isainfo -k`
180 if test "$cputype" != "amd64" && test "$cputype" != "i386"; then
181 errorprint "VirtualBox works only on i386/amd64 hosts, not $cputype"
182 exit 1
183 fi
184}
185
186# module_added(modname)
187# returns 1 if added, 0 otherwise
188module_added()
189{
190 if test -z "$1"; then
191 errorprint "missing argument to module_added()"
192 exit 1
193 fi
194
195 # Add a space at end of module name to make sure we have a perfect match to avoid
196 # any substring matches: e.g "vboxusb" & "vboxusbmon"
197 loadentry=`cat /etc/name_to_major | grep "$1 "`
198 if test -z "$loadentry"; then
199 return 1
200 fi
201 return 0
202}
203
204# module_loaded(modname)
205# returns 1 if loaded, 0 otherwise
206module_loaded()
207{
208 if test -z "$1"; then
209 errorprint "missing argument to module_loaded()"
210 exit 1
211 fi
212
213 modname=$1
214 # modinfo should now work properly since we prevent module autounloading.
215 loadentry=`$BIN_MODINFO | grep "$modname "`
216 if test -z "$loadentry"; then
217 return 1
218 fi
219 return 0
220}
221
222# add_driver(modname, moddesc, fatal, nulloutput, [driverperm])
223# failure: depends on "fatal"
224add_driver()
225{
226 if test -z "$1" || test -z "$2"; then
227 errorprint "missing argument to add_driver()"
228 exit 1
229 fi
230
231 modname="$1"
232 moddesc="$2"
233 fatal="$3"
234 nullop="$4"
235 modperm="$5"
236
237 if test -n "$modperm"; then
238 if test "$nullop" = "$NULLOP"; then
239 $BIN_ADDDRV -m"$modperm" $modname >/dev/null 2>&1
240 else
241 $BIN_ADDDRV -m"$modperm" $modname
242 fi
243 else
244 if test "$nullop" = "$NULLOP"; then
245 $BIN_ADDDRV $modname >/dev/null 2>&1
246 else
247 $BIN_ADDDRV $modname
248 fi
249 fi
250
251 if test $? -ne 0; then
252 subprint "Adding: $moddesc module ...FAILED!"
253 if test "$fatal" = "$FATALOP"; then
254 exit 1
255 fi
256 return 1
257 fi
258 return 0
259}
260
261# rem_driver(modname, moddesc, [fatal])
262# failure: depends on [fatal]
263rem_driver()
264{
265 if test -z "$1" || test -z "$2"; then
266 errorprint "missing argument to rem_driver()"
267 exit 1
268 fi
269
270 modname=$1
271 moddesc=$2
272 fatal=$3
273 module_added $modname
274 if test "$?" -eq 0; then
275 if test "$ISIPS" != "$IPSOP"; then
276 $BIN_REMDRV $modname
277 else
278 $BIN_REMDRV $modname >/dev/null 2>&1
279 fi
280 if test $? -eq 0; then
281 subprint "Removed: $moddesc module"
282 return 0
283 else
284 subprint "Removing: $moddesc ...FAILED!"
285 if test "$fatal" = "$FATALOP"; then
286 exit 1
287 fi
288 return 1
289 fi
290 fi
291}
292
293# unload_module(modname, moddesc, [fatal])
294# failure: fatal
295unload_module()
296{
297 if test -z "$1" || test -z "$2"; then
298 errorprint "missing argument to unload_module()"
299 exit 1
300 fi
301
302 modname=$1
303 moddesc=$2
304 fatal=$3
305 modid=`$BIN_MODINFO | grep "$modname " | cut -f 1 -d ' ' `
306 if test -n "$modid"; then
307 $BIN_MODUNLOAD -i $modid
308 if test $? -eq 0; then
309 subprint "Unloaded: $moddesc module"
310 else
311 subprint "Unloading: $moddesc module ...FAILED!"
312 if test "$fatal" = "$FATALOP"; then
313 exit 1
314 fi
315 return 1
316 fi
317 fi
318 return 0
319}
320
321# load_module(modname, moddesc, [fatal])
322# pass "drv/modname" or "misc/vbi" etc.
323# failure: fatal
324load_module()
325{
326 if test -z "$1" || test -z "$2"; then
327 errorprint "missing argument to load_module()"
328 exit 1
329 fi
330
331 modname=$1
332 moddesc=$2
333 fatal=$3
334 $BIN_MODLOAD -p $modname
335 if test $? -eq 0; then
336 subprint "Loaded: $moddesc module"
337 return 0
338 else
339 subprint "Loading: $moddesc ...FAILED!"
340 if test "$fatal" = "$FATALOP"; then
341 exit 1
342 fi
343 return 1
344 fi
345}
346
347# install_drivers()
348# !! failure is always fatal
349install_drivers()
350{
351 if test -n "_HARDENED_"; then
352 add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0600 root sys'"
353 else
354 add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'"
355 fi
356 load_module "drv/$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP"
357
358 # Add vboxdrv to devlink.tab
359 sed -e '/name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox
360 echo "type=ddi_pseudo;name=vboxdrv \D" >> /etc/devlink.vbox
361 mv -f /etc/devlink.vbox /etc/devlink.tab
362
363 # Create the device link
364 /usr/sbin/devfsadm -i "$MOD_VBOXDRV"
365
366 if test $? -eq 0 && test -h "/dev/vboxdrv"; then
367
368 if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then
369 add_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP"
370 load_module "drv/$MOD_VBOXNET" "$DESC_VBOXNET" "$FATALOP"
371 fi
372
373 if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then
374 add_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP"
375 load_module "drv/$MOD_VBOXFLT" "$DESC_VBOXFLT" "$FATALOP"
376 fi
377
378 if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$HOST_OS_MAJORVERSION" != "5.10"; then
379 # For VirtualBox 3.1 the new USB code requires Nevada > 123
380 if test "$HOST_OS_MINORVERSION" -gt 123; then
381 add_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'"
382 load_module "drv/$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$FATALOP"
383
384 # Add vboxusbmon to devlink.tab
385 sed -e '/name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox
386 echo "type=ddi_pseudo;name=vboxusbmon \D" >> /etc/devlink.vbox
387 mv -f /etc/devlink.vbox /etc/devlink.tab
388
389 # Create the device link
390 /usr/sbin/devfsadm -i "$MOD_VBOXUSBMON"
391 if test $? -ne 0; then
392 errorprint "Failed to create device link for $MOD_VBOXUSBMON."
393 exit 1
394 fi
395
396 # Add vboxusb if present
397 # This driver is special, we need it in the boot-archive but since there is no
398 # USB device to attach to now (it's done at runtime) it will fail to attach so
399 # redirect attaching failure output to /dev/null
400 if test -f /platform/i86pc/kernel/drv/vboxusb.conf; then
401 add_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" "$NULLOP"
402 load_module "drv/$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP"
403 fi
404 else
405 warnprint "Solaris 5.11 snv_124 or higher required for USB support. Skipped installing USB support."
406 fi
407 fi
408 else
409 errorprint "Failed to create device link for $MOD_VBOXDRV."
410 exit 1
411 fi
412
413 return $?
414}
415
416# remove_all([fatal])
417# failure: depends on [fatal]
418remove_drivers()
419{
420 fatal=$1
421
422 # Remove vboxdrv from devlink.tab
423 devlinkfound=`cat /etc/devlink.tab | grep vboxdrv`
424 if test -n "$devlinkfound"; then
425 sed -e '/name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox
426 mv -f /etc/devlink.vbox /etc/devlink.tab
427 fi
428
429 # Remove vboxusbmon from devlink.tab
430 devlinkfound=`cat /etc/devlink.tab | grep vboxusbmon`
431 if test -n "$devlinkfound"; then
432 sed -e '/name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox
433 mv -f /etc/devlink.vbox /etc/devlink.tab
434 fi
435
436 unload_module "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$fatal"
437 rem_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$fatal"
438
439 unload_module "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$fatal"
440 rem_driver "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$fatal"
441
442 unload_module "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$fatal"
443 rem_driver "$MOD_VBOXFLT" "$DESC_VBOXFLT" "$fatal"
444
445 unload_module "$MOD_VBOXNET" "$DESC_VBOXNET" "$fatal"
446 rem_driver "$MOD_VBOXNET" "$DESC_VBOXNET" "$fatal"
447
448 unload_module "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$fatal"
449 rem_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$fatal"
450
451# No separate VBI since 3.1
452# unload_module "$MOD_VBI" "$DESC_VBI" "$fatal"
453
454 # remove devlinks
455 if test -h "/dev/vboxdrv" || test -f "/dev/vboxdrv"; then
456 rm -f /dev/vboxdrv
457 fi
458 if test -h "/dev/vboxusbmon" || test -f "/dev/vboxusbmon"; then
459 rm -f /dev/vboxusbmon
460 fi
461
462 # unpatch nwam/dhcpagent fix
463 nwamfile=/etc/nwam/llp
464 nwambackupfile=$nwamfile.vbox
465 if test -f "$nwamfile"; then
466 sed -e '/vboxnet/d' $nwamfile > $nwambackupfile
467 mv -f $nwambackupfile $nwamfile
468 fi
469
470 return 0
471}
472
473# install_python_bindings(pythonbin)
474# remarks: changes pwd
475# failure: non fatal
476install_python_bindings()
477{
478 # The python binary might not be there, so just exit silently
479 if test -z "$1"; then
480 return 0
481 fi
482
483 if test -z "$2"; then
484 errorprint "missing argument to install_python_bindings"
485 exit 1
486 fi
487
488 pythonbin=$1
489 pythondesc=$2
490 if test -x "$pythonbin"; then
491 VBOX_INSTALL_PATH="$DIR_VBOXBASE"
492 export VBOX_INSTALL_PATH
493 cd $DIR_VBOXBASE/sdk/installer
494 $pythonbin ./vboxapisetup.py install > /dev/null
495 if test "$?" -eq 0; then
496 subprint "Installed: Bindings for $pythondesc"
497 fi
498 return 0
499 fi
500 return 1
501}
502
503
504# cleanup_install([fatal])
505# failure: depends on [fatal]
506cleanup_install()
507{
508 fatal=$1
509
510 # stop and unregister webservice SMF
511 servicefound=`$BIN_SVCS -a | grep "virtualbox/webservice" 2>/dev/null`
512 if test ! -z "$servicefound"; then
513 $BIN_SVCADM disable -s svc:/application/virtualbox/webservice:default
514 $BIN_SVCCFG delete svc:/application/virtualbox/webservice:default
515 if test "$?" -eq 0; then
516 subprint "Unloaded: Web service"
517 else
518 subprint "Unloading: Web service ...ERROR(S)."
519 fi
520 fi
521
522 # stop and unregister zoneaccess SMF
523 servicefound=`$BIN_SVCS -a | grep "virtualbox/zoneaccess" 2>/dev/null`
524 if test ! -z "$servicefound"; then
525 $BIN_SVCADM disable -s svc:/application/virtualbox/zoneaccess
526 $BIN_SVCCFG delete svc:/application/virtualbox/zoneaccess
527 if test "$?" -eq 0; then
528 subprint "Unloaded: Zone access service"
529 else
530 subprint "Unloading: Zone access service ...ERROR(S)."
531 fi
532 fi
533
534 # unplumb vboxnet0
535 vboxnetup=`$BIN_IFCONFIG vboxnet0 >/dev/null 2>&1`
536 if test "$?" -eq 0; then
537 $BIN_IFCONFIG vboxnet0 unplumb
538 if test "$?" -ne 0; then
539 errorprint "VirtualBox NetAdapter 'vboxnet0' couldn't be unplumbed (probably in use)."
540 if test "$fatal" = "$FATALOP"; then
541 exit 1
542 fi
543 fi
544 fi
545
546 # unplumb vboxnet0 ipv6
547 vboxnetup=`$BIN_IFCONFIG vboxnet0 inet6 >/dev/null 2>&1`
548 if test "$?" -eq 0; then
549 $BIN_IFCONFIG vboxnet0 inet6 unplumb
550 if test "$?" -ne 0; then
551 errorprint "VirtualBox NetAdapter 'vboxnet0' IPv6 couldn't be unplumbed (probably in use)."
552 if test "$fatal" = "$FATALOP"; then
553 exit 1
554 fi
555 fi
556 fi
557}
558
559
560# postinstall()
561# !! failure is always fatal
562postinstall()
563{
564 infoprint "Loading VirtualBox kernel modules..."
565 install_drivers
566
567 if test "$?" -eq 0; then
568 if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then
569 # nwam/dhcpagent fix
570 nwamfile=/etc/nwam/llp
571 nwambackupfile=$nwamfile.vbox
572 if test -f "$nwamfile"; then
573 sed -e '/vboxnet/d' $nwamfile > $nwambackupfile
574 echo "vboxnet0 static 192.168.56.1" >> $nwambackupfile
575 mv -f $nwambackupfile $nwamfile
576 fi
577
578 # plumb and configure vboxnet0
579 $BIN_IFCONFIG vboxnet0 plumb up
580 if test "$?" -eq 0; then
581 $BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up
582 else
583 # Should this be fatal?
584 warnprint "Failed to bring up vboxnet0!!"
585 fi
586 fi
587
588 if test -f /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml || test -f /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then
589 infoprint "Configuring services..."
590 fi
591
592 # Web service
593 if test -f /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml; then
594 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/virtualbox-webservice.xml
595 /usr/sbin/svcadm disable -s svc:/application/virtualbox/webservice:default
596 if test "$?" -eq 0; then
597 subprint "Loaded: Web service"
598 else
599 subprint "Loading: Web service ...ERROR(S)."
600 fi
601 fi
602
603 # Zone access service
604 if test -f /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml; then
605 /usr/sbin/svccfg import /var/svc/manifest/application/virtualbox/virtualbox-zoneaccess.xml
606 /usr/sbin/svcadm enable -s svc:/application/virtualbox/zoneaccess
607 if test "$?" -eq 0; then
608 subprint "Loaded: Zone access service"
609 else
610 subprint "Loading: Zone access service ...ERROR(S)."
611 fi
612 fi
613
614 # Install python bindings
615 if test -f "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py" || test -h "$DIR_VBOXBASE/sdk/installer/vboxapisetup.py"; then
616 PYTHONBIN=`which python 2> /dev/null`
617 if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then
618 infoprint "Installing Python bindings..."
619
620 INSTALLEDIT=1
621 PYTHONBIN=`which python2.4 2>/dev/null`
622 install_python_bindings "$PYTHONBIN" "Python 2.4"
623 if test "$?" -eq 0; then
624 INSTALLEDIT=0
625 fi
626 PYTHONBIN=`which python2.5 2>/dev/null`
627 install_python_bindings "$PYTHONBIN" "Python 2.5"
628 if test "$?" -eq 0; then
629 INSTALLEDIT=0
630 fi
631 PYTHONBIN=`which python2.6 2>/dev/null`
632 install_python_bindings "$PYTHONBIN" "Python 2.6"
633 if test "$?" -eq 0; then
634 INSTALLEDIT=0
635 fi
636
637 # remove files installed by Python build
638 rm -rf $DIR_VBOXBASE/sdk/installer/build
639
640 if test "$INSTALLEDIT" -ne 0; then
641 warnprint "No suitable Python version found. Required Python 2.4, 2.5 or 2.6."
642 warnprint "Skipped installing the Python bindings."
643 fi
644 else
645 warnprint "Python not found, skipped installed Python bindings."
646 fi
647 fi
648
649 # Update boot archive
650 infoprint "Updating the boot archive..."
651 $BIN_BOOTADM update-archive > /dev/null
652
653 return 0
654 else
655 errorprint "Failed to update boot-archive"
656 exit 666
657 fi
658 return 1
659}
660
661# preremove([fatal])
662# failure: depends on [fatal]
663preremove()
664{
665 fatal=$1
666
667 cleanup_install "$fatal"
668
669 remove_drivers "$fatal"
670 if test "$?" -eq 0; then
671 return 0;
672 fi
673 return 1
674}
675
676
677
678# And it begins...
679check_root
680check_isa
681check_zone
682find_bins
683
684# Get command line options
685while test $# -gt 0;
686do
687 case "$1" in
688 --postinstall | --preremove | --installdrivers | --removedrivers)
689 drvop="$1"
690 ;;
691 --fatal)
692 fatal="$FATALOP"
693 ;;
694 --silent)
695 ISSILENT="$SILENTOP"
696 ;;
697 --ips)
698 ISIPS="$IPSOP"
699 ;;
700 *)
701 break
702 ;;
703 esac
704 shift
705done
706
707case "$drvop" in
708--postinstall)
709 check_module_arch
710 postinstall
711 ;;
712--preremove)
713 preremove "$fatal"
714 ;;
715--installdrivers)
716 check_module_arch
717 install_drivers
718 ;;
719--removedrivers)
720 remove_drivers "$fatal"
721 ;;
722*)
723 errorprint "Invalid operation $drvop"
724 exit 1
725esac
726
727exit "$?"
728
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette