[Bug 256545] securuty/ossec-hids-server 3.6.0_1 rc script fails to generate ossec.conf agent.conf

Hello. ossec-hids script fails to generate ossec.conf and agent.conf files with default (right after installation) setup. Diagnostic steps:
Install security/ossec-hids-server and security/ossec-hids-server-config ports.
Generation of configuration files fails right after installation (in default configuration):
# /usr/local/etc/rc.d/ossec-hids ossec_conf

sed: 1: "/^s*$/d": RE error: trailing backslash ()
sed: 1: "/^s*$/d": RE error: trailing backslash ()
sed: 1: "/^s*$/d": RE error: trailing backslash ()
sed: 1: "/^s*$/d": RE error: trailing backslash ()

# sudo /usr/local/etc/rc.d/ossec-hids agent_conf sed: 1: "/^s*$/d": RE error: trailing backslash () -------------
Build options for security/ossec-hids-server security/ossec-hids-server-config
~ % cd /usr/ports/security/ossec-hids-server && make showconfig
===> The following configuration options are available for ossec-hids-server-3.6.0_1: DOCS=on: Build and/or install documentation INOTIFY=on: Kevent based real time monitoring LUA=off: Lua scripting language support PRELUDE=off: Sensor support from Prelude SIEM ZEROMQ=off: ZeroMQ support (experimental)
====> Database output: you can only select none or one of them MYSQL=off: MySQL database support PGSQL=off: PostgreSQL database support
===> Use 'make config' to modify these settings % cd /usr/ports/security/ossec-hids-server-config && make showconfig
===> The following configuration options are available for ossec-hids-server-config-3.6.0_1:
====> Alerting Rules DEFAULT_R=on: Rules provided by OSSEC CONFIG_R=on: Alert changes of the OSSEC main configuration files CMDOUT_R=on: Alert changes of output of the monitored commands
====> Active Response DEFAULT_C=on: Commands provided by OSSEC MERGE_C=on: Commands to merge configuration files MERGE_AR=on: Merge configuration files when they change RESTART_AR=on: Restart OSSEC when main configuration files change HOSTDENY_AR=off: Block the attacker's IP using access control files FWDROP_AR=off: Block the attacker's IP on the firewall
====> System Audit and Rootkit Detection (rootcheck) BASIC_RC=on: Basic audit and rootkits
====> File Integrity Checking (syscheck) NEWFILES_SC=on: Alert on new files ..