VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/solaris/tapinit_solaris.sh@ 11284

最後變更 在這個檔案從11284是 5587,由 vboxsync 提交於 17 年 前

example scripts.

  • 屬性 svn:eol-style 設為 LF
  • 屬性 svn:executable 設為 *
  • 屬性 svn:keywords 設為 Revision Id
檔案大小: 670 位元組
 
1#!/bin/bash
2
3# VirtualBox TAP setup script for Solaris hosts.
4# usage: ./tapinit.sh tapname
5#
6# format of TAP interface names MUST be like [name][number]
7# example: tap0, tap1, tap2 etc.
8
9if [ -z "$1" ]; then
10 echo "Missing TAP interface name."
11 echo
12 echo "Usage: $0 tapifname"
13 exit 1
14fi
15
16tap_name=`echo $1 | /usr/xpg4/bin/tr -s [:upper:] [:lower:]`
17ppa=${tap_name##*[a-z]}
18tap_name=$1
19host_ip="192.168.1.10${ppa}"
20guest_ip="192.168.1.20${ppa}"
21netmask="255.255.255.0"
22
23/sbin/ifconfig $tap_name $host_ip destination $guest_ip netmask $netmask
24/sbin/ifconfig $tap_name up
25
26# Output the TAP interface though not used by VirtualBox
27echo "$tap_name"
28
29exit $?
30
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette