VirtualBox

Ignore:
Timestamp:
Sep 25, 2009 4:37:29 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/Installer: added new USB bits. (can disable before 3.1 using Config.kmk define if needed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/vboxconfig.sh

    r22376 r23344  
    5757DESC_VBOXUSBMON="USBMonitor"
    5858
     59MOD_VBOXUSB=vboxusb
     60DESC_VBOXUSB="USB"
     61
    5962FATALOP=fatal
     63NULLOP=nulloutput
    6064SILENTOP=silent
    6165IPSOP=ips
     
    215219}
    216220
    217 # add_driver(modname, moddesc, [driverperm], [fatal])
    218 # failure: depends on [fatal]
     221# add_driver(modname, moddesc, fatal, nulloutput, [driverperm])
     222# failure: depends on "fatal"
    219223add_driver()
    220224{
     
    226230    modname="$1"
    227231    moddesc="$2"
    228     modperm="$3"
    229     if test "$3" = "$FATALOP"; then
    230         fatal="$FATALOP"
    231         modperm=""
    232     fi
    233     if test "$4" = "$FATALOP"; then
    234         fatal="$FATALOP"
    235     fi
     232    fatal="$3"
     233    nullop="$4"
     234    modperm="$5"
    236235
    237236    if test -n "$modperm"; then
    238         $BIN_ADDDRV -m"$modperm" $modname
     237        if test "$nullop" = "$NULLOP"; then
     238            $BIN_ADDDRV -m"$modperm" $modname  >/dev/null 2>&1
     239        else
     240            $BIN_ADDDRV -m"$modperm" $modname
     241        fi   
    239242    else
    240         $BIN_ADDDRV $modname
     243        if test "$nullop" = "$NULLOP"; then       
     244            $BIN_ADDDRV $modname >/dev/null 2>&1
     245        else
     246            $BIN_ADDDRV $modname
     247        fi       
    241248    fi
    242249
     
    342349{
    343350    if test -n "_HARDENED_"; then
    344         add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "'* 0600 root sys'" "$FATALOP"
     351        add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0600 root sys'"
    345352    else
    346         add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "'* 0666 root sys'" "$FATALOP"
     353        add_driver "$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP" "not-$NULLOP" "'* 0666 root sys'"
    347354    fi
    348355    load_module "drv/$MOD_VBOXDRV" "$DESC_VBOXDRV" "$FATALOP"
     
    383390                exit 1
    384391            fi
     392           
     393            # Add vboxusb if present
     394            # This driver is special, we need it in the boot-archive but since there is no
     395            # USB device to attach to now (it's done at runtime) it will fail to attach so
     396            # redirect attaching failure output to /dev/null
     397            if test -f /platform/i86pc/kernel/drv/vboxusb.conf; then
     398                add_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$FATALOP" "$NULLOP"
     399            fi
    385400        fi
    386401    else
     
    411426        mv -f /etc/devlink.vbox /etc/devlink.tab
    412427    fi
     428
     429    unload_module "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$fatal"
     430    rem_driver "$MOD_VBOXUSB" "$DESC_VBOXUSB" "$fatal"
    413431
    414432    unload_module "$MOD_VBOXUSBMON" "$DESC_VBOXUSBMON" "$fatal"
Note: See TracChangeset for help on using the changeset viewer.

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