File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,12 @@ function slave_update($event_name, $data) {
460460 }
461461
462462 //* Ensure that the named slave directory is writable by the named user
463- $ slave_record_dir = $ dns_config ['bind_zonefiles_dir ' ].'/ ' .$ this ->slave_zone_file_prefix ();
463+ if (!empty ($ dns_config ['bind_zonefiles_slaveprefix ' ])) {
464+ $ slave_record_dir = $ dns_config ['bind_zonefiles_dir ' ].'/ ' .$ dns_config ['bind_zonefiles_slaveprefix ' ];
465+ if (substr ($ slave_record_dir ,-1 ) != '/ ' ) $ slave_record_dir = dirname ($ slave_record_dir );
466+ } else {
467+ $ slave_record_dir = $ dns_config ['bind_zonefiles_dir ' ];
468+ }
464469 if (!@is_dir ($ slave_record_dir )) mkdir ($ slave_record_dir , 0770 , true );
465470 chown ($ slave_record_dir , $ dns_config ['bind_user ' ]);
466471 chgrp ($ slave_record_dir , $ dns_config ['bind_group ' ]);
You can’t perform that action at this time.
0 commit comments