26 lines
583 B
Bash
26 lines
583 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2013 Project Gluon
|
|
|
|
START=95
|
|
|
|
|
|
start() {
|
|
ip link add link br-mesh name local-node type macvlan
|
|
ip link set local-node address @next_node.mac@
|
|
|
|
ip address add @next_node.ip4@/32 dev local-node
|
|
ip route add @next_node.prefix4@ dev br-freifunk
|
|
|
|
ip address add @next_node.ip6@/128 dev local-node
|
|
ip route add @next_node.prefix6@ dev br-freifunk
|
|
|
|
ip link set local-node up
|
|
}
|
|
|
|
stop() {
|
|
ip route del @next_node.prefix4@ dev br-freifunk
|
|
ip route del @next_node.prefix6@ dev br-freifunk
|
|
ip link set local-node down
|
|
ip link del local-node
|
|
}
|