Eric F Crist wrote:
What is the point of the { } around some variables?
It's not strictly necessary, except in some cases. i.e:
m=34
echo $m
You don't need it there.
But you would want it here:
f=/var/filename
fname=${f//name/name2}
It's when you need to differentiate the variable name from
On 2005-01-07 09:36, Tom Vilot [EMAIL PROTECTED] wrote:
Eric F Crist wrote:
What is the point of the { } around some variables?
It's not strictly necessary, except in some cases. i.e:
m=34
echo $m
You don't need it there.
But you would want it here:
f=/var/filename
Ok all.
First off, thanks again for all the help you've offered thus far. That
being said, I'm having a problem with variables in a function. The
code I'm having a problem with is:
setup_loopback () {
${fwcmd} add ${rulenum1} pass all from any to any via lo0;
${rulenum1}=`expr
Eric F Crist wrote:
First off, thanks again for all the help you've offered thus far.
That being said, I'm having a problem with variables in a function.
The code I'm having a problem with is:
setup_loopback () {
${fwcmd} add ${rulenum1} pass all from any to any via lo0;
On Jan 6, 2005, at 7:28 PM, Tom Vilot wrote:
Eric F Crist wrote:
First off, thanks again for all the help you've offered thus far.
That being said, I'm having a problem with variables in a function.
The code I'm having a problem with is:
setup_loopback () {
${fwcmd} add ${rulenum1}
Eric F Crist wrote:
What is the point of the { } around some variables?
It's not strictly necessary, except in some cases. i.e:
m=34
echo $m
You don't need it there.
But you would want it here:
f=/var/filename
fname=${f//name/name2}
It's when you need to differentiate the variable name from
On Jan 6, 2005, at 11:00 PM, Tom Vilot wrote:
Eric F Crist wrote:
What is the point of the { } around some variables?
It's not strictly necessary, except in some cases. i.e:
m=34
echo $m
You don't need it there.
But you would want it here:
f=/var/filename
fname=${f//name/name2}
It's when you need
Eric F Crist wrote:
Sorry for the double reply, but I forgot to respond to the top half of
this email. By including /etc/rc.subr, what exactly do I gain? There
are already built-in means to execute a custom firewall script:
I would assume that the system would institute my firewall rules at
On Jan 3 at 13:44, Timothy Luoma launched this into the bitstream:
On Jan 3, 2005, at 1:19 PM, Eric F Crist wrote:
I'm trying to create a shell script for firewalling. What I'm hoping to do
is create a generic script that looks for variables in /etc/rc.conf. I've
tried looking at other scripts
On Mon, Jan 03, 2005 at 05:28:56PM -0600, Eric F Crist wrote:
A couple more questions, then I'm done. Promise.
I need to verify whether or not there is an entry for grog_firewall_oif
and grog_firewall_iif in /etc/rc.conf. If not, I want to exit with an
error.
Read /etc/rc.conf into your
Hello all,
I'm trying to create a shell script for firewalling. What I'm hoping
to do is create a generic script that looks for variables in
/etc/rc.conf. I've tried looking at other scripts that use variables
placed there, but don't understand how to pull the information from the
file.
EFC Hello all,
EFC I'm trying to create a shell script for firewalling. What I'm hoping
EFC to do is create a generic script that looks for variables in
EFC /etc/rc.conf. I've tried looking at other scripts that use variables
EFC placed there, but don't understand how to pull the information
On Jan 3, 2005, at 1:19 PM, Eric F Crist wrote:
I'm trying to create a shell script for firewalling. What I'm hoping
to do is create a generic script that looks for variables in
/etc/rc.conf. I've tried looking at other scripts that use variables
placed there, but don't understand how to pull
On Jan 3, 2005, at 12:44 PM, Timothy Luoma wrote:
On Jan 3, 2005, at 1:19 PM, Eric F Crist wrote:
I'm trying to create a shell script for firewalling. What I'm hoping
to do is create a generic script that looks for variables in
/etc/rc.conf. I've tried looking at other scripts that use
On Jan 3, 2005, at 1:38 PM, Hexren wrote:
I am not that great at bash but look in /etc/rc.firewall for the line
where it says: . /etc/defaults/rc.conf I think this line includes
/etc/rc.conf into the running script and as code in rc.conf is
evaluated at the time it is included, all the variables
On Jan 3, 2005, at 2:30 PM, Timothy Luoma wrote:
On Jan 3, 2005, at 1:38 PM, Hexren wrote:
I am not that great at bash but look in /etc/rc.firewall for the line
where it says: . /etc/defaults/rc.conf I think this line includes
/etc/rc.conf into the running script and as code in rc.conf is
[Eric: sorry if you see this twice. Resending online. hit REPLY
instead of REPLY ALL by accident]
On Jan 3, 2005, at 3:49 PM, Eric F Crist wrote:
First off, let me thank you very much for the massive amount of
information you've given me thus far.
I am a commandline geek from way back, so
Eric F Crist wrote:
elif [ $grog_firewall_enable YES or NO ]
then
echo Syntax error in /etc/rc.conf file. grog_firewall_enable
must be YES or NO
fi
I don't know if you're on 5.x, nor whether you use ipfw, ipfilter or pf
- I wrote a replacement for ipfilter as I got dizzy trying to
On Jan 3, 2005, at 4:27 PM, Eric F Crist wrote:
Good to know. If I want to validate, like my first example, against
some variables, how would I do that best. Say, for example, I have 4
possible entries for grog_firewall_enable but I want to single out
three of them:
if [ $grog_firewall_enable
On Jan 3, 2005, at 3:34 PM, Erik Norgaard wrote:
Eric F Crist wrote:
elif [ $grog_firewall_enable YES or NO ]
then
echo Syntax error in /etc/rc.conf file. grog_firewall_enable
must be YES or NO
fi
I don't know if you're on 5.x, nor whether you use ipfw, ipfilter or
pf - I wrote a
On Jan 3, 2005, at 4:34 PM, Erik Norgaard wrote:
Eric F Crist wrote:
elif [ $grog_firewall_enable YES or NO ]
then
echo Syntax error in /etc/rc.conf file. grog_firewall_enable
must be YES or NO
fi
I don't know if you're on 5.x, nor whether you use ipfw, ipfilter or
pf - I wrote a
On Jan 3, 2005, at 3:34 PM, Erik Norgaard wrote:
Eric F Crist wrote:
elif [ $grog_firewall_enable YES or NO ]
then
echo Syntax error in /etc/rc.conf file. grog_firewall_enable
must be YES or NO
fi
I don't know if you're on 5.x, nor whether you use ipfw, ipfilter or
pf - I wrote a
On Jan 3, 2005, at 4:52 PM, Eric F Crist wrote:
In regards to the = or -eq, I can't discern a difference in output when
I use them. Can you explain further their differences?
I think they are different ways of saying the same thing. Personal
preference only as to which is better.
What would
I believe this is my last question. I need to do some math. Anyone
familiar with ipfw knows that you can add a rule with:
ipfw add [num] my firewall rule
What I'm trying to do is have that number auto-computed. So, my
command *should* look something like:
$ipfwcmd add [rulenum1 + 50] my
On Jan 3, 2005, at 4:16 PM, Timothy Luoma wrote:
On Jan 3, 2005, at 4:52 PM, Eric F Crist wrote:
In regards to the = or -eq, I can't discern a difference in output
when
I use them. Can you explain further their differences?
I think they are different ways of saying the same thing. Personal
--On Monday, January 03, 2005 04:21:41 PM -0600 Eric F Crist
[EMAIL PROTECTED] wrote:
I believe this is my last question. I need to do some math. Anyone
familiar with ipfw knows that you can add a rule with:
ipfw add [num] my firewall rule
What I'm trying to do is have that number
On Jan 3, 2005, at 4:40 PM, Paul Schmehl wrote:
--On Monday, January 03, 2005 04:21:41 PM -0600 Eric F Crist
[EMAIL PROTECTED] wrote:
I believe this is my last question. I need to do some math. Anyone
familiar with ipfw knows that you can add a rule with:
ipfw add [num] my firewall rule
What
--On Monday, January 03, 2005 04:49:04 PM -0600 Eric F Crist
[EMAIL PROTECTED] wrote:
By on-the-fly, I meant by manually typing in a new rule on the command
line. From there, I'd take the output of ipfw show and figure out where
I want that rule placed. So, for the purposes of this script, I
A couple more questions, then I'm done. Promise.
I need to verify whether or not there is an entry for grog_firewall_oif
and grog_firewall_iif in /etc/rc.conf. If not, I want to exit with an
error.
Also, a little more advanced, I need to pull information from an
ifconfig output. I need to
On Jan 3, 2005, at 6:28 PM, Eric F Crist wrote:
A couple more questions, then I'm done. Promise.
I need to verify whether or not there is an entry for grog_firewall_oif
and grog_firewall_iif in /etc/rc.conf. If not, I want to exit with an
error.
You want to check for either grog_firewall_oif or
On Mon, 3 Jan 2005 16:22:45 -0500 Timothy Luoma [EMAIL PROTECTED]
wrote:
On Jan 3, 2005, at 3:49 PM, Eric F Crist wrote:
First off, let me thank you very much for the massive amount of
information you've given me thus far.
I am a commandline geek from way back, so you're welcome.
My
On Mon, 3 Jan 2005 20:41:21 -0600 (CST) I wrote:
On Mon, 3 Jan 2005 16:22:45 -0500 Timothy Luoma [EMAIL PROTECTED]
wrote:
On Jan 3, 2005, at 3:49 PM, Eric F Crist wrote:
First off, let me thank you very much for the massive amount of
information you've given me thus far.
I am a
On Jan 3, 2005, at 8:21 PM, Timothy Luoma wrote:
On Jan 3, 2005, at 6:28 PM, Eric F Crist wrote:
A couple more questions, then I'm done. Promise.
I need to verify whether or not there is an entry for
grog_firewall_oif
and grog_firewall_iif in /etc/rc.conf. If not, I want to exit with an
error.
On Jan 3, 2005, at 11:22 PM, Eric F Crist wrote:
On Jan 3, 2005, at 8:21 PM, Timothy Luoma wrote:
On Jan 3, 2005, at 6:28 PM, Eric F Crist wrote:
A couple more questions, then I'm done. Promise.
I need to verify whether or not there is an entry for
grog_firewall_oif and grog_firewall_iif in
34 matches
Mail list logo