VirtualBox

Changeset 27260 in vbox


Ignore:
Timestamp:
Mar 10, 2010 7:07:13 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58655
Message:

Solaris/Installer: make vboxnet netmask persistent across boots.

File:
1 edited

Legend:

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

    r27216 r27260  
    475475    fi
    476476
     477    # remove netmask configuration
     478    nmaskfile=/etc/netmasks
     479    nmaskbackupfile=$nmaskfile.vbox
     480    if test -f "$nmaskfile"; then
     481        sed -e '/VirtualBox_SectionStart_DoNotEdit/,/VirtualBox_SectionEnd_DoNotEdit/d' $nmaskfile > $nmaskbackupfile
     482        mv -f $nmaskbackupfile $nmaskfile
     483    fi
     484
    477485    return 0
    478486}
     
    600608            if test "$?" -eq 0; then
    601609                $BIN_IFCONFIG vboxnet0 192.168.56.1 netmask 255.255.255.0 up
     610
     611                # add the netmask to stay persistent across host reboots
     612                nmaskfile=/etc/netmasks
     613                nmaskbackupfile=$nmaskfile.vbox
     614                if test -f $nmaskfile; then
     615                    sed -e '/VirtualBox_SectionStart_DoNotEdit/,/VirtualBox_SectionEnd_DoNotEdit/d' $nmaskfile > $nmaskbackupfile
     616                    echo "VirtualBox_SectionStart_DoNotEdit" >> $nmaskbackupfile
     617                    echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile
     618                    echo "VirtualBox_SectionEnd_DoNotEdit" >> $nmaskbackupfile
     619                    mv -f $netmasksbackupfile $netmasksfile
     620                fi
    602621            else
    603622                # Should this be 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