<?xml version="1.0"?> <!-- -*- mode: xml; -*- -->
<FWBuilderResources version="2.1.8">
    <Target name="freebsd">
      <description>FreeBSD</description>
      <family>freebsd</family>
      <dialog>freebsd</dialog>

      <options>
        <user_can_change_install_dir>true</user_can_change_install_dir>
        <default>
          <freebsd_ip_forward>1</freebsd_ip_forward>
          <loopback_interface>lo0</loopback_interface>
        </default>

        <activation>
          <fwdir>/etc/fw</fwdir>

          <fwdir_test>/tmp</fwdir_test>

          <timeout_units>min</timeout_units>

          <reg_user>
            <run>
              <copy>
echo '%FWBPROMPT%';
cat > %FWDIR%/%FWSCRIPT%;
              </copy>

              <compression>
echo '%FWBPROMPT%';
chmod +x %FWDIR%/%FWSCRIPT%;
sudo -S %FWDIR%/%FWSCRIPT% &#38;&#38; sudo -S pkill shutdown; echo 'Policy activated'
              </compression>
              <no_compression>
echo '%FWBPROMPT%';
chmod +x %FWDIR%/%FWSCRIPT%;
sudo -S %FWDIR%/%FWSCRIPT% &#38;&#38; sudo -S pkill shutdown; echo 'Policy activated'
              </no_compression>
            </run>

            <test>
              <copy>
echo '%FWBPROMPT%';
mkdir -p %FWDIR%/tmp;
cat > %FWDIR%/tmp/%FWSCRIPT%;
              </copy>

              <rollback>
echo '%FWBPROMPT%';
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
sudo -S /sbin/shutdown -r +%RBTIMEOUT%;
sudo -S %FWDIR%/tmp/%FWSCRIPT% &#38;&#38; echo 'Policy activated'
              </rollback>
              <no_rollback>
echo '%FWBPROMPT%';
chmod +x %FWDIR%/tmp/%FWSCRIPT%;
sudo -S %FWDIR%/tmp/%FWSCRIPT% &#38;&#38; echo 'Policy activated'
              </no_rollback>
            </test>
          </reg_user>

          <root>
            <run>
              <copy>
echo '%FWBPROMPT%';
cat > %FWDIR%/%FWSCRIPT%;
              </copy>

              <compression>
echo '%FWBPROMPT%';
sh %FWDIR%/%FWSCRIPT% &#38;&#38; pkill shutdown; echo 'Policy activated'
              </compression>
              <no_compression>
echo '%FWBPROMPT%';
sh %FWDIR%/%FWSCRIPT% &#38;&#38; pkill shutdown; echo 'Policy activated'
              </no_compression>
            </run>

            <test>
              <copy>
echo '%FWBPROMPT%';
mkdir -p %FWDIR%/tmp;
cat > %FWDIR%/tmp/%FWSCRIPT%;
              </copy>

              <rollback>
echo '%FWBPROMPT%';
/sbin/shutdown -r +%RBTIMEOUT%;
sh %FWDIR%/tmp/%FWSCRIPT% &#38;&#38; echo 'Policy activated'
              </rollback>
              <no_rollback>
echo '%FWBPROMPT%';
sh %FWDIR%/tmp/%FWSCRIPT% &#38;&#38; echo 'Policy activated'
              </no_rollback>
            </test>

          </root>
        </activation>

      </options>

      <capabilities>
        <supports_routing>False</supports_routing>
      </capabilities>

      <tools>
        <path_ipfw>/sbin/ipfw</path_ipfw>
        <path_ipf>/sbin/ipf</path_ipf>
        <path_ipnat>/sbin/ipnat</path_ipnat>
        <path_pfctl>/sbin/pfctl</path_pfctl>
        <path_sysctl>/sbin/sysctl</path_sysctl>
        <path_logger>/usr/bin/logger</path_logger>
        <path_expect>/usr/bin/expect</path_expect>
      </tools>
    </Target>

</FWBuilderResources>
