瀏覽代碼

chmod if possible

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

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

@@ -38,7 +38,9 @@ function save_firewall_settings {
38 38
     printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
39 39
     printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
40 40
     printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
41
-    chmod +x /etc/network/if-up.d/iptables
41
+    if [ -f /etc/network/if-up.d/iptables ]; then
42
+        chmod +x /etc/network/if-up.d/iptables
43
+    fi
42 44
 }
43 45
 
44 46
 function global_rate_limit {