Changeset 68795 in vbox for trunk/src/VBox/Additions/solaris/SharedFolders/loadfs.sh
- Timestamp:
- Sep 19, 2017 4:15:20 PM (7 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/SharedFolders/loadfs.sh
r68794 r68795 26 26 # 27 27 28 DRVNAME="vbox guest"29 DRIVERS_USING_IT="vboxfs"28 DRVNAME="vboxfs" 29 MOUNTHLP="vboxfsmount" 30 30 31 31 DRVFILE=`dirname "$0"` 32 32 DRVFILE=`cd "$DRVFILE" && pwd` 33 MOUNTHLPFILE="$DRVFILE/$MOUNTHLP" 33 34 DRVFILE="$DRVFILE/$DRVNAME" 34 35 if [ ! -f "$DRVFILE" ]; then 35 echo "load.sh: Cannot find $DRVFILE or it's not a file..." 36 echo "loadfs.sh: Cannot find $DRVFILE or it's not a file..." 37 exit 1; 38 fi 39 if [ ! -f "$MOUNTHLPFILE" ]; then 40 echo "load.sh: Cannot find $MOUNTHLPFILE or it's not a file..." 36 41 exit 1; 37 42 fi … … 40 45 #set -x 41 46 42 # Unload driver that may depend on the driver we're going to (re-)load 43 # as well as the driver itself. 44 for drv in $DRIVERS_USING_IT $DRVNAME; 47 # Unload the driver if loaded. 48 for drv in $DRVNAME; 45 49 do 46 50 LOADED=`modinfo | grep -w "$drv"` … … 58 62 59 63 # 60 # Update the devlink.tab file so we get a /dev/vboxguest node. 61 # 62 set -e 63 sed -e '/name=vboxguest/d' /etc/devlink.tab > /tmp/devlink.vbox 64 echo "type=ddi_pseudo;name=vboxguest \D" >> /tmp/devlink.vbox 65 $SUDO cp /tmp/devlink.vbox /etc/devlink.tab 66 $SUDO ln -fs ../devices/pci@0,0/pci80ee,cafe@4:vboxguest /dev/vboxguest 67 set +e 68 69 # 70 # The add_drv command will load the driver, so we need to temporarily put it 71 # in a place that is searched in order to load it. 64 # Remove old stuff. 72 65 # 73 66 MY_RC=1 74 67 set -e 75 68 $SUDO rm -f \ 76 "/usr/kernel/drv/${DRVNAME}" \ 77 "/usr/kernel/drv/amd64/${DRVNAME}" 69 "/usr/kernel/fs/${DRVNAME}" \ 70 "/usr/kernel/fs/amd64/${DRVNAME}" \ 71 "/etc/fs/vboxfs/mount" 78 72 sync 79 $SUDO cp "${DRVFILE}" /platform/i86pc/kernel/drv/amd64/80 73 set +e 81 74 82 $SUDO rem_drv $DRVNAME 83 if $SUDO add_drv -ipci80ee,cafe -m"* 0666 root sys" -v $DRVNAME; then 75 # 76 # Install the mount program. 77 # 78 if [ ! -d /etc/fs/vboxfs ]; then 79 $SUDO mkdir -p /etc/fs/vboxfs 80 fi 81 $SUDO ln -sf "$MOUNTHLPFILE" /etc/fs/vboxfs/mount 82 83 # 84 # Load the module. We can load it without copying it to /usr/kernel/fs/. 85 # 86 if $SUDO modload "$DRVFILE"; then 84 87 sync 85 $SUDO /usr/sbin/devfsadm -i $DRVNAME86 88 MY_RC=0 87 89 else … … 90 92 fi 91 93 92 $SUDO rm -f \93 "/usr/kernel/drv/${DRVNAME}" \94 "/usr/kernel/drv/amd64/${DRVNAME}"95 sync96 97 94 exit $MY_RC; 98 95
Note:
See TracChangeset
for help on using the changeset viewer.