#!/bin/sh # # Format: # bridge=<bridgename>:<bridgeslaves> # # <bridgeslaves> is a comma-separated list of physical (ethernet) interfaces # bridge without parameters assumes bridge=br0:eth0 # parsebridge() { local v=${1}: set -- while [ -n "$v" ]; do set -- "$@" "${v%%:*}" v=${v#*:} done case $# in 0) bridgename=br0; bridgeslaves=$iface ;; 1) die "bridge= requires two parameters" ;; 2) bridgename=$1; bridgeslaves=$(str_replace "$2" "," " ") ;; *) die "bridge= requires two parameters" ;; esac } # Parse bridge for bridgename and bridgeslaves for bridge in $(getargs bridge=); do unset bridgename unset bridgeslaves iface=eth0 # Read bridge= parameters if they exist if [ "$bridge" != "bridge" ]; then parsebridge $bridge fi # Simple default bridge if [ -z "$bridgename" ]; then bridgename=br0 bridgeslaves=$iface fi echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info done
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
dhclient-script.sh | File | 8.32 KB | 0755 |
|
dhclient.conf | File | 262 B | 0644 |
|
dhcp-root.sh | File | 926 B | 0755 |
|
ifname-genrules.sh | File | 1.2 KB | 0755 |
|
ifup.sh | File | 13.6 KB | 0755 |
|
kill-dhclient.sh | File | 362 B | 0755 |
|
module-setup.sh | File | 4.72 KB | 0755 |
|
net-genrules.sh | File | 3.67 KB | 0755 |
|
net-lib.sh | File | 24.13 KB | 0755 |
|
netroot.sh | File | 2.72 KB | 0755 |
|
parse-bond.sh | File | 1.96 KB | 0755 |
|
parse-bridge.sh | File | 1.1 KB | 0755 |
|
parse-ibft.sh | File | 393 B | 0755 |
|
parse-ifname.sh | File | 662 B | 0755 |
|
parse-ip-opts.sh | File | 4.8 KB | 0755 |
|
parse-team.sh | File | 983 B | 0755 |
|
parse-vlan.sh | File | 532 B | 0755 |
|