VirtualBox

Ignore:
Timestamp:
Nov 18, 2021 5:43:22 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148366
Message:

Installer/solaris, Additions/solaris/Installer: Fix handing of /etc/devlink.tab group membership in the driver install. Automatically adjusts to the group which should be used on the respective OS update version. Done in a way which automatically repairs the incorrect group membership on the next install/uninstall.

Location:
trunk/src/VBox/Additions/solaris/Installer
Files:
2 edited

Legend:

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

    r82968 r92503  
    9898    $vboxadditions_path/vboxguest.sh start
    9999
     100    # Figure out group to use for /etc/devlink.tab (before Solaris 11 SRU6
     101    # it was always using group sys)
     102    group=sys
     103    if [ -f /etc/dev/reserved_devnames ]; then
     104        # Solaris 11 SRU6 and later use group root (check a file which isn't
     105        # tainted by VirtualBox install scripts and allow no other group)
     106        refgroup=$(LC_ALL=C /usr/bin/ls -lL /etc/dev/reserved_devnames | awk '{ print $4 }' 2>/dev/null)
     107        if [ $? -eq 0 -a "x$refgroup" = "xroot" ]; then
     108            group=root
     109        fi
     110        unset refgroup
     111    fi
     112
    100113    sed -e '/name=vboxguest/d' /etc/devlink.tab > /etc/devlink.vbox
    101114    echo "type=ddi_pseudo;name=vboxguest        \D" >> /etc/devlink.vbox
     115    chmod 0644 /etc/devlink.vbox
     116    chown root:$group /etc/devlink.vbox
    102117    mv -f /etc/devlink.vbox /etc/devlink.tab
    103118
  • trunk/src/VBox/Additions/solaris/Installer/preremove.sh

    r82968 r92503  
    4848/opt/VirtualBoxAdditions/vboxguest.sh stopall silentunload
    4949
     50# Figure out group to use for /etc/devlink.tab (before Solaris 11 SRU6
     51# it was always using group sys)
     52group=sys
     53if [ -f /etc/dev/reserved_devnames ]; then
     54    # Solaris 11 SRU6 and later use group root (check a file which isn't
     55    # tainted by VirtualBox install scripts and allow no other group)
     56    refgroup=$(LC_ALL=C /usr/bin/ls -lL /etc/dev/reserved_devnames | awk '{ print $4 }' 2>/dev/null)
     57    if [ $? -eq 0 -a "x$refgroup" = "xroot" ]; then
     58        group=root
     59    fi
     60    unset refgroup
     61fi
     62
    5063# remove devlink.tab entry for vboxguest
    51 sed -e '
    52 /name=vboxguest/d' /etc/devlink.tab > /etc/devlink.vbox
     64sed -e '/name=vboxguest/d' /etc/devlink.tab > /etc/devlink.vbox
     65chmod 0644 /etc/devlink.vbox
     66chown root:$group /etc/devlink.vbox
    5367mv -f /etc/devlink.vbox /etc/devlink.tab
    5468
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