| 1 |
## -*- mode: shell-script; -*- |
| 2 |
## |
| 3 |
## Lines that start with "##" will be removed before this code is |
| 4 |
## added to the generated script. Regular shell comments can be added |
| 5 |
## using single "#", these will appear in the script. |
| 6 |
## |
| 7 |
## |
| 8 |
## These are commands built-in policy installer runs on the firewall if |
| 9 |
## installation is performed using root account for authentication |
| 10 |
## |
| 11 |
## Variables: |
| 12 |
## |
| 13 |
## {{$fwbpromp}} -- "magic" prompt that installer uses to detect when it is logged in |
| 14 |
## {{$fwdir}} -- directory on the firewall |
| 15 |
## {{$fwscript}} -- script name on the firewall |
| 16 |
## {{$rbtimeout}} -- rollback timeout |
| 17 |
## |
| 18 |
## {{$firewall_name}} -- the name of the firewall object |
| 19 |
## |
| 20 |
|
| 21 |
|
| 22 |
{{if run}} |
| 23 |
echo '{{$fwbprompt}}'; |
| 24 |
chmod +x {{$fwdir}}/{{$fwscript}}; |
| 25 |
/usr/sbin/nvram unset rc_firewall; |
| 26 |
/usr/sbin/nvram set rc_firewall="{{$fwdir}}/{{$fwscript}}"; |
| 27 |
/usr/sbin/nvram commit; |
| 28 |
sh {{$fwdir}}/{{$fwscript}} && echo 'Policy activated' |
| 29 |
{{endif}} |
| 30 |
|