Changeset 6868 in vbox
- Timestamp:
- Feb 8, 2008 3:18:18 PM (17 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/VBoxAddIF.sh
r5999 r6868 24 24 interface=$1 25 25 user=$2 26 if [ "$user" = "-g" ]; then 27 shift; 28 group=$2 29 user=+$group 30 fi 26 31 bridge=$3 27 32 … … 38 43 then 39 44 echo 1>&2 "" 40 echo 1>&2 "Usage: $appname <interface name> <user name> [<bridge name>]" 45 echo 1>&2 "Usage: $appname <interface name>" 46 echo 1>&2 " [<user name>| -g <group name>] [<bridge name>]" 41 47 echo 1>&2 "Create and register the permanent interface <interface name> for use by user" 42 echo 1>&2 "<user name> on the host system. Optionally attach the interface to the network" 48 echo 1>&2 "<user name> (or group <group name> for linux kernels which support this)" 49 echo 1>&2 "on the host system. Optionally attach the interface to the network" 43 50 echo 1>&2 "bridge <bridge name>. <interface name> should take the form vbox<0-99>." 44 51 elif [ "$appname" = "$appdel" ] … … 174 181 echo "$interface" "$user" "$bridge" >> /etc/vbox/interfaces 175 182 echo "" 176 echo "Creating the permanent host networking interface \"$interface\" for user $user." 183 if [ -n "$group" ]; then 184 echo "Creating the permanent host networking interface \"$interface\" for group $group." 185 else 186 echo "Creating the permanent host networking interface \"$interface\" for user $user." 187 fi 177 188 fi 178 189 … … 199 210 if [ "$appname" = "$appadd" ] 200 211 then 201 if ! VBoxTunctl -t "$interface" -u "$user" > /dev/null 2>&1 202 then 203 echo 1>&2 "" 204 echo 1>&2 "Failed to create the interface \"$interface\" for user $user. Please check" 205 echo 1>&2 "that you currently have sufficient permissions to do this." 206 exit 1 212 if [ -n "$group" ]; then 213 if ! VBoxTunctl -t "$interface" -g "$group" > /dev/null 2>&1 214 then 215 echo 1>&2 "" 216 echo 1>&2 "Failed to create the interface \"$interface\" for group $group. Please check" 217 echo 1>&2 "that you currently have sufficient permissions to do this." 218 exit 1 219 fi 220 else 221 if ! VBoxTunctl -t "$interface" -u "$user" > /dev/null 2>&1 222 then 223 echo 1>&2 "" 224 echo 1>&2 "Failed to create the interface \"$interface\" for user $user. Please check" 225 echo 1>&2 "that you currently have sufficient permissions to do this." 226 exit 1 227 fi 207 228 fi 208 229 # On SUSE Linux Enterprise Server, the tunctl command does not take -
trunk/src/VBox/Installer/linux/vboxnet.sh
r5999 r6868 201 201 (valid_ifname "$1")) 202 202 then 203 case $user in 204 +*) 205 group=`echo $2 | cut -c2-` 206 cmd="VBoxTunctl -t $1 -g $group" 207 ;; 208 *) 209 cmd="VBoxTunctl -t $1 -u $2" 210 ;; 211 esac 203 212 # Try to create the interface 204 if VBoxTunctl -t "$1" -u "$2"> /dev/null 2>&1213 if $cmd > /dev/null 2>&1 205 214 then 206 215 # On SUSE Linux Enterprise Server, the interface does not
Note:
See TracChangeset
for help on using the changeset viewer.