Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 16 Mar 2011 03:55:10 +0300
From: Solar Designer <solar@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: VLANs in Owl way?

On Wed, Mar 16, 2011 at 01:29:41AM +0100, Piotr Meyer wrote:
> I just wrote two small patches for very basic vlan support. So far
> changes works for me, but they aren't well tested.

By "just wrote", do you mean you wrote them tonight?

> I took some code 
> from RHEL4 but, in principle, I tried to mimic actual style, rid
> off all automation (module loading, interface renaming) and use
> the same tools as main script (ifconfig over ip).

This is right for now, thanks!

> I will be glad for corrections and suggestions about style, tools
> and other things (for example: "'-q' should be used rather '>/dev/null'
> in grep") preferred by Owl team in system scripts.

Yes, we prefer "-q" over ">/dev/null", so you did the right thing here.

We don't currently have a convention to use LANG=C before every single
invocation of grep/sed, although it makes sense to me.  So I am OK with
that, and we might arrive at a better approach later.

What are you trying to achieve by using egrep in
LANG=C egrep -v '(:)'

Isn't it the same as
LANG=C fgrep -v ':'

In fact, can't you embed that check into the following grep?  Replace
this one:

LANG=C egrep -q '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?'

with:

LANG=C egrep -q '(eth|bond)[0-9]+\.[0-9]{1,4}($|[^:])'

(if I got your intent right).

> http://smutek.pl/owl/ifup.diff
> http://smutek.pl/owl/ifdown.diff

These are patches against files on an installed system.  It's fine for
the discussion, but when you're done revising the changes and actually
contribute them, please do so in the form of a patch ready for commit.
That is, it should be something like initscripts-5.00-owl-vlan.diff and
a patch to owl-startup.spec.  For a one-time contribution this does not
matter much, but I hope that you'll continue contributing, hence I
propose that you make it simple for us to include your contributions.
Also, please see "(Re-)generating patch files." in Owl/doc/CONVENTIONS.

Besides changes to the scripts, maybe you need to add documentation?

Thank you!

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ