gluon/package/gluon-next-node/generate/etc/init.d/gluon-next-node
2013-09-30 14:36:53 +02:00

26 lines
537 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2013 Project Gluon
START=95
start() {
ip link add link br-client 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 @prefix4@ dev br-client
ip address add @next_node.ip6@/128 dev local-node
ip route add @prefix6@ dev br-client
ip link set local-node up
}
stop() {
ip route del @prefix4@ dev br-client
ip route del @prefix6@ dev br-client
ip link set local-node down
ip link del local-node
}