I need to find a way to add a line to the /usr/local/etc/ipfw.conf file.
What I thought would be an easy script is giving me headaches and I am hoping one of you can point me in the right direction?
This is what I want it to do:
sudo vi ipfw.conf
add 00050 allow udp from any to any src-port 67 dist-port 68 in
This is the script I've written.....
do shell script "cd /usr/local/etc/; vi ipfw.conf; i; 'add 00050 allow udp from any to any src-port 67 dist-port 68 in'; ^V ESC; :wq" with administrator privileges
It seems to be hanging on the ^V ESC
Would there be a better way to accomplish this task?