aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-09 12:00:20 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-09 12:00:20 -0400
commit942f82201a14aebc97f872aeddae893b9a1e0a55 (patch)
tree6d25fb1594a31c371686f5a2350ca89836cdfce8 /config
parent101c875be3cbc8158b787eb480a0077135f70d35 (diff)
downloadpfsense-packages-942f82201a14aebc97f872aeddae893b9a1e0a55.tar.gz
pfsense-packages-942f82201a14aebc97f872aeddae893b9a1e0a55.tar.bz2
pfsense-packages-942f82201a14aebc97f872aeddae893b9a1e0a55.zip
Use rename() instead of shell call for renaming directories.
Diffstat (limited to 'config')
-rw-r--r--config/suricata/suricata_post_install.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php
index 47e42c38..42f72eca 100644
--- a/config/suricata/suricata_post_install.php
+++ b/config/suricata/suricata_post_install.php
@@ -142,7 +142,8 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] =
// new one for the affected interface.
$old_uuid = $suricatacfg['uuid'];
$new_uuid = suricata_generate_id();
- exec("mv -f {$suricatalogdir}suricata_{$if_real}" . $old_uuid . " {$suricatalogdir}suricata_{$if_real}" . $new_uuid);
+ if (file_exists("{$suricatalogdir}suricata_{$if_real}{$old_uuid}/"))
+ @rename("{$suricatalogdir}suricata_{$if_real}{$old_uuid}/", "{$suricatalogdir}suricata_{$if_real}{$new_uuid}/");
$suricatacfg['uuid'] = $new_uuid;
$uuids[$new_uuid] = $if_real;
log_error(gettext("[Suricata] updated UUID for interface " . convert_friendly_interface_to_friendly_descr($suricatacfg['interface']) . " from {$old_uuid} to {$new_uuid}."));