瀏覽代碼

Create directory if needed

Bob Mottram 7 年之前
父節點
當前提交
e429663435
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/freedombone-utils-firewall

+ 3
- 0
src/freedombone-utils-firewall 查看文件

@@ -36,6 +36,9 @@ EXTERNAL_IPV4_ADDRESS=
36 36
 function save_firewall_settings {
37 37
     iptables-save > /etc/firewall.conf
38 38
     ip6tables-save > /etc/firewall6.conf
39
+    if [ ! -d /etc/network/if-up.d ]; then
40
+        mkdir /etc/network/if-up.d
41
+    fi
39 42
     printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
40 43
     printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
41 44
     printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables