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 { ...@@ -43,13 +43,13 @@ function try {
function clear_log { function clear_log {
rm -f /var/lib/snf-network/$INTERFACE rm -f $STATE_DIR/$INTERFACE
} }
function init_log { function init_log {
cat > /var/lib/snf-network/$INTERFACE <<EOF cat > $STATE_DIR/$INTERFACE <<EOF
INSTANCE=$INSTANCE INSTANCE=$INSTANCE
IP=$IP IP=$IP
EUI64=$EUI64 EUI64=$EUI64
...@@ -64,7 +64,7 @@ EOF ...@@ -64,7 +64,7 @@ EOF
function log { function log {
echo $@ >> /var/lib/snf-network/$INTERFACE echo $@ >> $STATE_DIR/$INTERFACE
} }
......
...@@ -96,11 +96,10 @@ function setup_extra () { ...@@ -96,11 +96,10 @@ function setup_extra () {
function save_all_tables () { function save_all_tables () {
mkdir -p /etc/iptables date > $STATE_DIR/date
date > /etc/iptables/date iptables-save > $STATE_DIR/snf-network.v4
iptables-save > /etc/iptables/snf-network.v4 ip6tables-save > $STATE_DIR/snf-network.v6
ip6tables-save > /etc/iptables/snf-network.v6 arptables-save > $STATE_DIR/snf-network.arp
arptables-save > /etc/iptables/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