diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-31 20:37:10 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-31 20:37:10 +0000 |
commit | f85166d320cd0b67eae885dba21620ff590a4f73 (patch) | |
tree | 9dd51033428ec730882195d97597c7a0a5aefc58 /etc | |
parent | 551ef384b19866df357d187696085f42b15146f8 (diff) | |
download | pfsense-f85166d320cd0b67eae885dba21620ff590a4f73.zip pfsense-f85166d320cd0b67eae885dba21620ff590a4f73.tar.gz |
Symlink captive portal elements over to /var/db/cpelements on bootup and creation/deletion
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 789b853..8810a52 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -892,7 +892,7 @@ function captiveportal_write_elements() { } if (is_array($config['captiveportal']['element'])) { - + conf_mount_rw(); foreach ($config['captiveportal']['element'] as $data) { $fd = @fopen($g['captiveportal_element_path'] . '/' . $data['name'], "wb"); if (!$fd) { @@ -902,7 +902,10 @@ function captiveportal_write_elements() { $decoded = base64_decode($data['content']); fwrite($fd,$decoded); fclose($fd); + unlink_if_exists("{$g['captiveportal_path']}/{$data['name']}"); + mwexec("cd {$g['captiveportal_path']}/ && ln -s {$g['captiveportal_element_path']}/{$data['name']} {$data['name']}"); } + conf_mount_ro(); } return 0; |