瀏覽代碼

chmod if possible

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

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

38
     printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
38
     printf '#!/bin/sh\n' > /etc/network/if-up.d/iptables
39
     printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
39
     printf 'iptables-restore < /etc/firewall.conf\n' >> /etc/network/if-up.d/iptables
40
     printf 'ip6tables-restore < /etc/firewall6.conf\n' >> /etc/network/if-up.d/iptables
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
 function global_rate_limit {
46
 function global_rate_limit {