diff options
author | Jim P <jim@pingle.org> | 2014-01-15 08:22:50 -0800 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2014-01-15 08:22:50 -0800 |
commit | 27cfa008a50debc1ad3b07bc1ffd4b1ba649f9c4 (patch) | |
tree | 81b404a2bfb286dd1bfca4de233ab763c5bc2d16 | |
parent | f1fcd52c04ae2f58c6a369186e310bc57999af96 (diff) | |
parent | 77ae1b1c2b0ad7b1dbee6b9234d97195a6277dbd (diff) | |
download | pfsense-packages-27cfa008a50debc1ad3b07bc1ffd4b1ba649f9c4.tar.gz pfsense-packages-27cfa008a50debc1ad3b07bc1ffd4b1ba649f9c4.tar.bz2 pfsense-packages-27cfa008a50debc1ad3b07bc1ffd4b1ba649f9c4.zip |
Merge pull request #573 from karl-ravn/master
Update tinc.inc
-rw-r--r-- | config/tinc/tinc.inc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/config/tinc/tinc.inc b/config/tinc/tinc.inc index 944cb846..3280c414 100644 --- a/config/tinc/tinc.inc +++ b/config/tinc/tinc.inc @@ -31,12 +31,12 @@ function tinc_save() { file_put_contents('/usr/local/etc/tinc/hosts/'.$host['name'],$_output); if($host['host_up']) { - file_put_contents('/usr/local/etc/tinc/hosts/'.$host['name'].'-up',base64_decode($host['host_up'])."\n"); + file_put_contents('/usr/local/etc/tinc/hosts/'.$host['name'].'-up',str_replace("\r", "", base64_decode($host['host_up']))."\n"); chmod('/usr/local/etc/tinc/hosts/'.$host['name'].'-up', 0744); } if($host['host_down']) { - file_put_contents('/usr/local/etc/tinc/hosts/'.$host['name'].'-down',base64_decode($host['host_down'])."\n"); + file_put_contents('/usr/local/etc/tinc/hosts/'.$host['name'].'-down',str_replace("\r", "", base64_decode($host['host_down']))."\n"); chmod('/usr/local/etc/tinc/hosts/'.$host['name'].'-down', 0744); } } @@ -77,27 +77,27 @@ function tinc_save() { chmod("/usr/local/etc/tinc/tinc-up", 0744); if($tincconf['tinc_down']) { - file_put_contents('/usr/local/etc/tinc/tinc-down',base64_decode($tincconf['tinc_down']) . "\n"); + file_put_contents('/usr/local/etc/tinc/tinc-down',str_replace("\r", "", base64_decode($tincconf['tinc_down'])) . "\n"); chmod("/usr/local/etc/tinc/tinc-down", 0744); } if($tincconf['host_up']) { - file_put_contents('/usr/local/etc/tinc/host-up',base64_decode($tincconf['host_up']) . "\n"); + file_put_contents('/usr/local/etc/tinc/host-up',str_replace("\r", "", base64_decode($tincconf['host_up'])) . "\n"); chmod("/usr/local/etc/tinc/host-up", 0744); } if($tincconf['host_down']) { - file_put_contents('/usr/local/etc/tinc/host-down',base64_decode($tincconf['host_down']) . "\n"); + file_put_contents('/usr/local/etc/tinc/host-down',str_replace("\r", "", base64_decode($tincconf['host_down'])) . "\n"); chmod("/usr/local/etc/tinc/host-down", 0744); } if($tincconf['subnet_up']) { - file_put_contents('/usr/local/etc/tinc/subnet-up',base64_decode($tincconf['subnet_up']) . "\n"); + file_put_contents('/usr/local/etc/tinc/subnet-up',str_replace("\r", "", base64_decode($tincconf['subnet_up'])) . "\n"); chmod("/usr/local/etc/tinc/subnet-up", 0744); } if($tincconf['subnet_down']) { - file_put_contents('/usr/local/etc/tinc/subnet-down',base64_decode($tincconf['subnet_down']) . "\n"); + file_put_contents('/usr/local/etc/tinc/subnet-down',str_replace("\r", "", base64_decode($tincconf['subnet_down'])) . "\n"); chmod("/usr/local/etc/tinc/subnet-down", 0744); } system("/usr/local/etc/rc.d/tinc.sh restart 2>/dev/null"); |