Commit 8e8ece4a authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

Use env var for state dir

Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 8c9626b0
......@@ -43,13 +43,13 @@ function try {
function clear_log {
rm -f /var/lib/snf-network/$INTERFACE
rm -f $STATE_DIR/$INTERFACE
}
function init_log {
cat > /var/lib/snf-network/$INTERFACE <<EOF
cat > $STATE_DIR/$INTERFACE <<EOF
INSTANCE=$INSTANCE
IP=$IP
EUI64=$EUI64
......@@ -64,7 +64,7 @@ EOF
function log {
echo $@ >> /var/lib/snf-network/$INTERFACE
echo $@ >> $STATE_DIR/$INTERFACE
}
......
......@@ -96,11 +96,10 @@ function setup_extra () {
function save_all_tables () {
mkdir -p /etc/iptables
date > /etc/iptables/date
iptables-save > /etc/iptables/snf-network.v4
ip6tables-save > /etc/iptables/snf-network.v6
arptables-save > /etc/iptables/snf-network.arp
date > $STATE_DIR/date
iptables-save > $STATE_DIR/snf-network.v4
ip6tables-save > $STATE_DIR/snf-network.v6
arptables-save > $STATE_DIR/snf-network.arp
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment