VirtualBox

Changeset 7022 in vbox for trunk/src/VBox/Installer


Ignore:
Timestamp:
Feb 19, 2008 2:32:53 PM (17 years ago)
Author:
vboxsync
Message:

Installers/Linux: changed the network management scripts to no longer force the name vbox<x> for tap interfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/VBoxAddIF.sh

    r6868 r7022  
    6161}
    6262
    63 valid_ifname() {
    64   if expr match "$1" "vbox[0-9][0-9]*$" > /dev/null 2>&1
    65   then
    66     return 0
    67   else
    68     return 1
    69   fi
    70 }
    71 
    7263# Check which name we were called under, and exit if it was not recognised.
    7364if [ ! "$appname" = "$appadd" -a ! "$appname" = "$appdel" ]
     
    9384  fi
    9485fi
    95 # Check that the interface name is valid if we are adding it.  If we are
    96 # deleting it then the user will get a better error message later if it is
    97 # invalid as the interface will not exist.
    98 if [ "$appname" = "$appadd" ]
    99 then
    100   if ! valid_ifname "$interface"
    101   then
    102     usage
    103     exit 1
    104   fi
    105 fi
    106 
    10786
    10887# Make sure that we can create files in the configuration directory
     
    148127      # or two non-comment entries, possibly followed by a comment).
    149128      if ((expr match "$2" "#" > /dev/null) ||
    150           (! test -z "$4" && ! expr match "$4" "#" > /dev/null) ||
    151           (! valid_ifname "$1"))
     129          (! test -z "$4" && ! expr match "$4" "#" > /dev/null))
    152130      then
    153131        echo 1>&2 ""
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