import NetBSD rc system

2001-06-11 Thread David Xu

Hello,

Is there any plan to import NetBSD rc system,
I am willing to see it appears in FreeBSD 5.0.

-- 
David Xu



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Doug Barton

David Xu wrote:
> 
> Hello,
> 
> Is there any plan to import NetBSD rc system,
> I am willing to see it appears in FreeBSD 5.0.

Yes. Several of us have started work on it. Personally, the last two times
I carved time out to work on it I got bombed by unstable -current.

Doug
-- 
If you're never wrong, you're not trying hard enough.

 Do YOU Yahoo!?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Perl module for periodic scripts

2001-06-11 Thread Matthew Seaman

Dear all,

I've slung together a tiny little perl module to enable
periodic(8) scripts to access periodic.conf(5) settings without having
to use sh(1).  I thought it might be useful to some, so I tidied it up
and made it available for download at:

http://www.plasm.demon.co.uk/FreeBSD-Periodic-0.1.tar.gz 

This all came about when I foolishly started porting some of the
periodic scripts over to a Solaris8 box.  Particularly
470.status-named.  Solaris `date' doesn't support the `-v' flag, so:

date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'

becomes

perl -MPOSIX "print strftime "%b %e", localtime (time - 24 * 60 * 60);"

and then Solaris `uniq' doesn't support the `-i' flag so:

sort -f | uniq -ic |

becomes:

perl -ne '$s{lc $_}++; \
  END { for (sort { $s{$a} cmp $s{$b} } keys %s) { \
printf "%4d $_", $s{$_} } }'

by which time the script might just as well be pure perl anyhow...

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.  26 The Paddocks
 Savill Way
 Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: oct() doesn't handle binary strings

2001-06-11 Thread Peter Pentchev

On Sat, Jun 09, 2001 at 08:12:48PM -, [EMAIL PROTECTED] wrote:
> 
> This is a bug report for perl from [EMAIL PROTECTED],
> generated with the help of perlbug 1.26 running under perl 5.00503.
> 
> 
> -
> [Please enter your report here]
> 
> From perlfunc(1):
> 
>   oct EXPR...
>   (If EXPR happens to start off with 0x, interprets
>   it as a hex string.  If EXPR starts off with 0b,
>   it is interpreted as a binary string.)
> 
> But the binary string conversion doesn't seem to work:
> 
>   natto% perl -e 'print oct("0b11000110")."\n"'
>   0
> 
> This is otherwise a valid binary string:
> 
>   natto% perl -e 'print unpack('C', (pack("B8", "11000110")))."\n"'
>   198
> 
> The hex string conversion function does work:
> 
>   natto% perl -e 'print oct("0xC6")."\n"'
>   198

The following comments pertain to the version of Perl used in FreeBSD,
since this was cited as a FreeBSD 4.0 problem.

This is still true for Perl 5.005_03 in -stable, but it seems to have
been fixed in Perl 5.6.0 in -current.  I believe this will be fixed
when Perl 5.6 is MFC'd (btw, FreeBSD developers, FreeBSD Perl gurus,
when/if shall Perl 5.6 be MFC'd? :)

Thus, I believe this is not (anymore) a Perl problem per se, since it
is fixed in the newer versions.

G'luck,
Peter

-- 
If I had finished this sentence,

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: signal(SIGCHLD, SIG_IGN) patch solving SUSv2 compatibility issue

2001-06-11 Thread David Malone

On Sun, Jun 10, 2001 at 05:20:50PM -0700, Peter Wemm wrote:
> I agree totally.  This should have been done ages ago, I've been burned on
> it a few times, but never badly enough to go fix it.

I've committed this - I'll let Matt do the MFC when he feels ready.

David.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: nsswitch dynamically loadable modules

2001-06-11 Thread Jacques A. Vidrine

On Sun, Jun 10, 2001 at 08:14:57PM +0200, Gyori Sandor wrote:
[snip]
> By applying these patches (nsswitch & nss_ldap) did you get a proper
> working authentication via LDAP? I applied them, but system doesn't know
> LDAP's user names. This is my fault or I should even not try this way?

I didn't `apply'  these patches -- I generated the  patches.  And yes,
it worked for me at the time.   However, as I already stated, that was
a  throw-away implementation  and I  did not  keep them  in sync  with
FreeBSD.  So perhaps they are broken with regards to -STABLE today, or
perhaps you have something misconfigured in LDAP.

> May I see this code anywhere? I can't find info about above way on your
> homepage.

I have not made  it publicly available.  It would not  do you any good
anyway, as it is not complete.

Cheers,
-- 
Jacques Vidrine / [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: nsswitch dynamically loadable modules

2001-06-11 Thread Jacques A. Vidrine

On Sun, Jun 10, 2001 at 05:17:23PM -0700, Peter Wemm wrote:
> This is probably why it wont be committed.  If it uses dlopen() then it
> cannot work for the statically linked /bin/ls, /bin/sh, etc.  Anything in /
> sbin or /bin will never be able to see the usernames.  If you built the
> entire system with NOSHARED=NO, then /bin/ls, /bin/sh etc will be dynamically
> linked and the patches will probably work.  However, you had better have
> /usr on your root (/) file system or you wont be able to boot.  Linux's
> solution is to put the ld.so and libc.so onto the / partition in /lib.

This is the evolution I have in mind:

   nsswitch static only (FreeBSD-CURRENT today)
|
V
   nsswitch w/static support for files, dns, nis; modules can be added
   for other sources;  these modules may be compiled statically as part
   of libc, but would generally be loaded dynamically (this is roughly
   the stage the prototype was at)
|
V
   `module' implementing stubs to communicate with an external process;
   the external process itself can dynamically load other modules (this
   is my target before my next commit to -CURRENT)
|
V
   (finished) the stub/external process module is a standard way of
   providing additional sources, giving three ways to `link' in modules:
   static, dynamic, stub

The static  & stub  cases would support  all executables;  the dynamic
case  of  course  would   only  be  available  for  dynamically-linked
executables.

Supporting the `stub'  case was the primary cause for  designing a new
nsdispatch() API.

Cheers,
-- 
Jacques Vidrine / [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Peter Wemm

Brian Somers wrote:
> > I went ahead and nuked the auto-creation and -D flag in favor of plumb
> > and unplumb in the patch at:
> > 
> > http://www.one-eyed-alien.net/~brooks/FreeBSD/gif.diff
> > 
> > This version includes a change to rc.network to plumb gif interfaces
> > before calling gifcreate.  This will still trip up users who build
> > static gif tunnels from hosts with dynamic addresses since they can't
> > run gifconfig yet, but we don't really have any means of supporting that
> > in the rc files yet anyway.
> > 
> > -- Brooks
> 
> This looks good to me.  I've cc'd freebsd-arch to see if anyone else 
> wants to comment.  If there are no objections, I'll test & commit it 
> in about a week.

Personally, I'd prefer create/destroy instead of plumb/unplumb.  The Solaris
plumb command is for doing 'STREAMS plumbing' - ie: connecting all the
streams pipes and modules together.  Creating/deleting interfaces on
BSD systems IMHO has nothing in common with that concept.  We are
creating/destroying interfaces, not connecting/disconnecting streams
nodes (plumbing).

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: oct() doesn't handle binary strings

2001-06-11 Thread Doug Barton

Peter Pentchev wrote:

> (btw, FreeBSD developers, FreeBSD Perl gurus,
> when/if shall Perl 5.6 be MFC'd? :)

First perl 5.6.1 has to be imported to -current, then shaken out, then
_possibly_ it will be MFC'ed, but it's also quite possible that it won't be
MFC'ed at all. 

Doug
-- 
If you're never wrong, you're not trying hard enough.

 Do YOU Yahoo!?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Brooks Davis

On Mon, Jun 11, 2001 at 08:27:37AM -0700, Peter Wemm wrote:
> Personally, I'd prefer create/destroy instead of plumb/unplumb.  The Solaris
> plumb command is for doing 'STREAMS plumbing' - ie: connecting all the
> streams pipes and modules together.  Creating/deleting interfaces on
> BSD systems IMHO has nothing in common with that concept.  We are
> creating/destroying interfaces, not connecting/disconnecting streams
> nodes (plumbing).

I've made create/destory the default names with plumb and unplumb
standing in as SysV compatability parameters because that seems to be
the ifconfig way.  The diff at:

http://www.one-eyed-alien.net/~brooks/FreeBSD/gif.diff

has been updated.  I'm still thinking about adopting the NetBSD
SIOIF{CREATE,DESTORY} interface.

-- Brooks

Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

 PGP signature


Re: import NetBSD rc system

2001-06-11 Thread Mark Santcroos

What is the difference between the present rc scheme and the NetBSD one?

Mark

On Mon, Jun 11, 2001 at 01:44:26AM -0700, Doug Barton wrote:
> David Xu wrote:
> > 
> > Hello,
> > 
> > Is there any plan to import NetBSD rc system,
> > I am willing to see it appears in FreeBSD 5.0.
> 
>   Yes. Several of us have started work on it. Personally, the last two times
> I carved time out to work on it I got bombed by unstable -current.
> 
> Doug
> -- 
> If you're never wrong, you're not trying hard enough.
> 
>  Do YOU Yahoo!?
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message

-- 
Mark Santcroos  RIPE Network Coordination Centre
http://www.ripe.net/home/mark/  New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Mark Santcroos writes:
: What is the difference between the present rc scheme and the NetBSD one?

The NetBSD rc scheme, in a nutshell, put each thing into its own file
and does order dependencies automatically.  Ours is one big monolithic
beast that kinda can do extra things, but only if their order can be
coerced into being right.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Mark Santcroos

Can it be called SysV style? Or not seperated in that way?
(I must say, the big ugly rc thing is the only thing I don't like about
FreeBSD, I'm very much in favor of the SysV style init. But thats another
war ;)

Mark

On Mon, Jun 11, 2001 at 12:00:43PM -0600, Warner Losh wrote:
> In message <[EMAIL PROTECTED]> Mark Santcroos writes:
> : What is the difference between the present rc scheme and the NetBSD one?
> 
> The NetBSD rc scheme, in a nutshell, put each thing into its own file
> and does order dependencies automatically.  Ours is one big monolithic
> beast that kinda can do extra things, but only if their order can be
> coerced into being right.
> 
> Warner

-- 
Mark Santcroos  RIPE Network Coordination Centre
http://www.ripe.net/home/mark/  New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Doug Barton

On Mon, 11 Jun 2001, Mark Santcroos wrote:

> Can it be called SysV style?

No, for two reasons. First, System V style rc structure relies on
transitions between run levels to do its work. FreeBSD does not plan to
implement run levels, and NetBSD's code does not depend on this. The other
reason is that when you say "System V" anything, people have immediate
negative reactions that are based purely on emotion.

Doug
-- 
If you're never wrong, you're not trying hard enough.

 Do YOU Yahoo!?



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Mark Santcroos writes:
: Can it be called SysV style? Or not seperated in that way?
: (I must say, the big ugly rc thing is the only thing I don't like about
: FreeBSD, I'm very much in favor of the SysV style init. But thats another
: war ;)

It specifically isn't SysV style.  It works.  SysV style encodes the
startup order in the file NAMES.  The NetBSD rc system encodes it in
the files themselves.  A big improvement.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Doug Barton writes:
: reason is that when you say "System V" anything, people have immediate
: negative reactions that are based purely on emotion.

S01My S02reactions S03to S04system S05V S06is S07not S08based
S09purely S10on S11a S12pruely S13emotional S14reaction.

S99Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Robert Watson


On Mon, 11 Jun 2001, Brooks Davis wrote:

> On Mon, Jun 11, 2001 at 08:27:37AM -0700, Peter Wemm wrote:
> > Personally, I'd prefer create/destroy instead of plumb/unplumb.  The Solaris
> > plumb command is for doing 'STREAMS plumbing' - ie: connecting all the
> > streams pipes and modules together.  Creating/deleting interfaces on
> > BSD systems IMHO has nothing in common with that concept.  We are
> > creating/destroying interfaces, not connecting/disconnecting streams
> > nodes (plumbing).
> 
> I've made create/destory the default names with plumb and unplumb
> standing in as SysV compatability parameters because that seems to be
> the ifconfig way.  The diff at:
> 
> http://www.one-eyed-alien.net/~brooks/FreeBSD/gif.diff
> 
> has been updated.  I'm still thinking about adopting the NetBSD
> SIOIF{CREATE,DESTORY} interface.

An advantage to also supporting the ioctl interface is that it permits
interface cloning to be used on systems where devfs is not used, or where
there are parts of the system where devfs is unavailable (i.e., various
forms of chroots).  I think devfs is cool and all, but given the existance
of fairly sensical non-devfs ways to do things, I'm tempted suggest
supporting them also.

Robert N M Watson FreeBSD Core Team, TrustedBSD Project
[EMAIL PROTECTED]  NAI Labs, Safeport Network Services



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread scanner

On Mon, 11 Jun 2001, Warner Losh wrote:

> In message <[EMAIL PROTECTED]> Doug Barton writes:
> : reason is that when you say "System V" anything, people have immediate
> : negative reactions that are based purely on emotion.
> 
> S01My S02reactions S03to S04system S05V S06is S07not S08based
> S09purely S10on S11a S12pruely S13emotional S14reaction.
> 
> S99Warner

S100Amen!

=
-Chris Watson (316) 326-3862 | Sr. Unix Administrator 
Work:   [EMAIL PROTECTED] | Trans World Airlines, Kansas City, MO
Home:  [EMAIL PROTECTED] | http://www.twa.com
=
WINDOWS: "Where do you want to go today?"
LINUX: "Where do you want to go tomorrow?"
BSD: "Are you guys coming or what?"
=
irc.openprojects.net #FreeBSD -Join the revolution!
ICQ: 20016186


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Brooks Davis

On Mon, Jun 11, 2001 at 02:40:54PM -0400, Robert Watson wrote:
> An advantage to also supporting the ioctl interface is that it permits
> interface cloning to be used on systems where devfs is not used, or where
> there are parts of the system where devfs is unavailable (i.e., various
> forms of chroots).  I think devfs is cool and all, but given the existance
> of fairly sensical non-devfs ways to do things, I'm tempted suggest
> supporting them also.

Actually, the currently implemented method doesn't required devfs.  It's
just somewhat easier to use in the devfs case because it doesn't require
a mknod then.  I think there are enough good reasons for following the
NetBSD example that's I'll probalby do it.  I'm currently trying to
figure out how they implemented it.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

 PGP signature


Re: import NetBSD rc system

2001-06-11 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, scanner
@jurai.net writes:
>On Mon, 11 Jun 2001, Warner Losh wrote:
>
>> In message <[EMAIL PROTECTED]> Doug Barton writes:
>> : reason is that when you say "System V" anything, people have immediate
>> : negative reactions that are based purely on emotion.
>> 
>> S01My S02reactions S03to S04system S05V S06is S07not S08based
>> S09purely S10on S11a S12pruely S13emotional S14reaction.
>> 
>> S99Warner
>
>S100Amen!

Which, maybe not by design, shows how butt-ugly the SVID /etc/rc
system is...

SVID /etc/rc, from the people who brought you the 32 bit namespace
of SVID IPC...

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Poul-Henning Kamp

In message <[EMAIL PROTECTED]>, Robe
rt Watson writes:


>> http://www.one-eyed-alien.net/~brooks/FreeBSD/gif.diff
>> 
>> has been updated.  I'm still thinking about adopting the NetBSD
>> SIOIF{CREATE,DESTORY} interface.
>
>An advantage to also supporting the ioctl interface is that it permits
>interface cloning to be used on systems where devfs is not used, or where
>there are parts of the system where devfs is unavailable (i.e., various
>forms of chroots).  I think devfs is cool and all, but given the existance
>of fairly sensical non-devfs ways to do things, I'm tempted suggest
>supporting them also.

As I already said: a device with no other precense in /dev has only
"quick&dirty" reasons for using DEVFS cloning.

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Matt Dillon


:In message <[EMAIL PROTECTED]> Mark Santcroos writes:
:: What is the difference between the present rc scheme and the NetBSD one?
:
:The NetBSD rc scheme, in a nutshell, put each thing into its own file
:and does order dependencies automatically.  Ours is one big monolithic
:beast that kinda can do extra things, but only if their order can be
:coerced into being right.
:
:Warner

I kinda like our scheme... at least I like the single monolithic
/etc/rc.conf file.  It makes maintaining and installing machines 
utterly trivial whereas having a billion little files each with
one or two options in them makes maintaining and installing machines
rather difficult.  I sure hope nobody is advocating doing away with
the monolithic capabilities of /etc/rc.conf!

-Matt

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Matt Dillon writes:
: I kinda like our scheme... at least I like the single monolithic
: /etc/rc.conf file.  It makes maintaining and installing machines 
: utterly trivial whereas having a billion little files each with
: one or two options in them makes maintaining and installing machines
: rather difficult.  I sure hope nobody is advocating doing away with
: the monolithic capabilities of /etc/rc.conf!

While it has been a few months since I looked at the NetBSD stuff, it
too has a single rc.conf-like file to control things.  Its main
feature is that you can add new "modules" easily.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Nathan Ahlstrom


> I kinda like our scheme... at least I like the single monolithic
> /etc/rc.conf file.  It makes maintaining and installing machines 
> utterly trivial whereas having a billion little files each with
> one or two options in them makes maintaining and installing machines
> rather difficult.  I sure hope nobody is advocating doing away with
> the monolithic capabilities of /etc/rc.conf!

NetBSD has /etc/rc.conf and /etc/defaults/rc.conf too.

-- 
Nathan Ahlstrom / [EMAIL PROTECTED] / [EMAIL PROTECTED] / GPG: 0x67BC9D19

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: cloning network interfaces

2001-06-11 Thread Brooks Davis

On Sun, Jun 10, 2001 at 11:29:07PM +0900, Hajimu UMEMOTO wrote:
> I think it is not BSD network way.  Recent NetBSD has network
> interface cloning.  It uses SIOCIFCREATE and SIOCIFDESTROY.  It may
> good to port it to FreeBSD.

I've looked it over and I generally like it.  There is one problem
though.  That's the requirement that you use static units.  The problem
with this is that it forces you to implement free unit scanning in
userland if you just want to create a unit and don't care what it is.
If you have to do this, and things are being changed at any kind of
significant rate, you have race condition between scanning the
interface list for a free unit and trying to allocate it.  This race can
theoreticaly lead to starvation.

My proposed solution is threefold.  First, change the ifc_create pointer's
type to:

int (*ifc_create)(struct if_clone *, int *);

so you can return a unit if the caller requests a wildcard unit (by
passing -1).  Second, move unit management in to the driver rather then
just using ifunit in if_clone_create.  Drivers could choose to implement
wildcarding or not and if not could simply use ifunit for their test.
Third, make if_clone_lookup treat names like "gif#" as a wildcard
request and set unit to -1 as appropriate.  These changes break
compatability with NetBSD slightly, but it's just a few lines to convert
an existing NetBSD clone_create handler to this style and it could
easily be handled with #ifdef's.

Thoughts, comments, objections?

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

 PGP signature


Re: import NetBSD rc system

2001-06-11 Thread void

On Mon, Jun 11, 2001 at 11:54:33AM -0700, Matt Dillon wrote:
> 
> I kinda like our scheme... at least I like the single monolithic
> /etc/rc.conf file.  It makes maintaining and installing machines 
> utterly trivial whereas having a billion little files each with
> one or two options in them makes maintaining and installing machines
> rather difficult.  I sure hope nobody is advocating doing away with
> the monolithic capabilities of /etc/rc.conf!

The NetBSD scheme puts code, not configuration, into separate files.
It uses rc.conf.

-- 
 Ben

"An art scene of delight
 I created this to be ..."  -- Sun Ra

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Patented algorithm in FreeBSD

2001-06-11 Thread Mikulas Patocka

Hi

Go to http://www.uspto.gov/patft/, search for patent number 5873127, and
you will find the description of mapping page table entries into virtual
memory via one page directory entry pointing to the page directory itself
- exactly what FreeBSD does with PTDPTDI and APTDPTDI entries on i386.
(including using alternate space as in get_ptbase() in i386/pmap.c to
access page table entries of different processes).

Mikulas


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Mike Smith

> Hi
> 
> Go to http://www.uspto.gov/patft/, search for patent number 5873127, and
> you will find the description of mapping page table entries into virtual
> memory via one page directory entry pointing to the page directory itself
> - exactly what FreeBSD does with PTDPTDI and APTDPTDI entries on i386.
> (including using alternate space as in get_ptbase() in i386/pmap.c to
> access page table entries of different processes).

It'd be hard to build a case on this patent, though; since it was granted 
in 1996, and the technique is as old as the hills, proving prior art 
would probably be relatively straightforward.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Jonathan Lemon

In article 
[EMAIL PROTECTED]>
 you write:
>Hi
>
>Go to http://www.uspto.gov/patft/, search for patent number 5873127, and
>you will find the description of mapping page table entries into virtual
>memory via one page directory entry pointing to the page directory itself
>- exactly what FreeBSD does with PTDPTDI and APTDPTDI entries on i386.
>(including using alternate space as in get_ptbase() in i386/pmap.c to
>access page table entries of different processes).

Hmm, let's see:

Assignee: Digital Equipment Corporation (Maynard, MA) 
Appl. No.: 646734
Filed: May 3, 1996

Versus:

 * Derived from hp300 version by Mike Hibler, this version by William
 * Jolitz uses a recursive map [a pde points to the page directory] to
 * map the page tables using the pagetables themselves. This is done to
 * reduce the impact on kernel virtual memory for lots of sparse address
 * space, and to reduce the cost of memory to each process.
 *
 *  from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
 *  from: @(#)pmap.h7.4 (Berkeley) 5/12/91


So it looks like we have prior art by around 6 years, which would
invalidate the patent iff it was the same thing.

(Not that I've read the patent, but typically the invention must meet
 *ALL* the claims being described; one small deviation and it is
 considered to be different.)
-- 
Jonathan




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Matt Dillon


:Hi
:
:Go to http://www.uspto.gov/patft/, search for patent number 5873127, and
:you will find the description of mapping page table entries into virtual
:memory via one page directory entry pointing to the page directory itself
:- exactly what FreeBSD does with PTDPTDI and APTDPTDI entries on i386.
:(including using alternate space as in get_ptbase() in i386/pmap.c to
:access page table entries of different processes).
:
:Mikulas

hahahahahahaaThe patent was filed in 1996. In the 90's the patent
office starting granting patents for everything under the sun without
doing real prior art searches.  I'm sure even just going to the candy
store these days is patented by someone... it's meaningless unless
someone decides to challenge and in this case there is so much prior art
(just in our own CVS tree, not to mention other sources) that they
would lose fairly quickly.

I wouldn't worry about it too much.  It isn't a problem unless it
becomes one.

-Matt

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Mikulas Patocka

> So it looks like we have prior art by around 6 years, which would
> invalidate the patent iff it was the same thing.

Does it mean that the algorithm is free to use by everyone or free to use
only in freebsd? I would like to implemet these page table back pointers
too and I'm scared by the patent... I don't know how US patent system
works. 

Mikulas


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Matt Dillon

:Hmm, let's see:
:
:   Assignee: Digital Equipment Corporation (Maynard, MA) 
:   Appl. No.: 646734
:   Filed: May 3, 1996
:
:Versus:
:
: * Derived from hp300 version by Mike Hibler, this version by William
: * Jolitz uses a recursive map [a pde points to the page directory] to
: * map the page tables using the pagetables themselves. This is done to
: * reduce the impact on kernel virtual memory for lots of sparse address
: * space, and to reduce the cost of memory to each process.
: *
: *  from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
: *  from: @(#)pmap.h7.4 (Berkeley) 5/12/91
:
:
:So it looks like we have prior art by around 6 years, which would
:invalidate the patent iff it was the same thing.
:
:(Not that I've read the patent, but typically the invention must meet
: *ALL* the claims being described; one small deviation and it is
: considered to be different.)
:-- 
:Jonathan

I read it.  It's chock full of the normal patent garbage.  The abstract
basically is exactly what's been done in BSD from the early 90's (and 
maybe even earlier, but I wasn't into VM in the CSRG kernels so I
don't know for sure, maybe Bruce does?).  Some of the claims match up
fairly well.  The patent also has all sorts of other crap in it, most 
of it pretty basic.  The patent examiner obviously had no clue as to
what he was examining but that's pretty much SOP these days.

Remember the idiot who patented the +/-50 2-digit year rule?

Again, nothing to worry about here.

-Matt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Mike Smith

> hahahahahahaaThe patent was filed in 1996. In the 90's the patent
> office starting granting patents for everything under the sun without
> doing real prior art searches.  I'm sure even just going to the candy
> store these days is patented by someone... 

Every time I tease my housemate's cat with a laser pointer, I am 
violating a US patent.  (No, really.)

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Mike Smith

> > So it looks like we have prior art by around 6 years, which would
> > invalidate the patent iff it was the same thing.
> 
> Does it mean that the algorithm is free to use by everyone or free to use
> only in freebsd? I would like to implemet these page table back pointers
> too and I'm scared by the patent... I don't know how US patent system
> works. 

The existence of prior art invalidates the patent entirely, not just in 
the case of prior art.

If that wasn't the case, it would be possible to patent an existing 
technique and prevent anyone new from starting to use it, which would be 
even more absurd than the current situation.

So, you are very safe in using this technique, for a variety of reasons:

 - The patent is almost certainly invalid, and proving this in court 
   would be straightforward.
 - Compaq (owner of the Digital patents now) is not in the business of 
   patent litigation, nor do they typically sell their patents to other
   companies that are, so the chances of you being forced to defend your 
   use of a similar algorithm in court in the first place are very small.

The usual disclaimers (eg. I am Not a Lawyer) apply, of course.  

Good luck with your project!

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Matt Dillon


:> So it looks like we have prior art by around 6 years, which would
:> invalidate the patent iff it was the same thing.
:
:Does it mean that the algorithm is free to use by everyone or free to use
:only in freebsd? I would like to implemet these page table back pointers
:too and I'm scared by the patent... I don't know how US patent system
:works. 
:
:Mikulas

It is free for use by anyone.  You always have to worry about auxilary
claims, though... for example, if there are 20 claims and 10 of them
have prior art, then anyone can use the algorithms that have prior art
but *might* *not* be able to modify them if the modifications match 
a claim that does not have prior art.  On the whole, however, if the
primary claims in a patent have prior art, the whole patent has a good
chance of being invalidated if the patent holders challenge.

The key thing with patents is that they are meaningless until the
patent holder decides to protect them in court by challenging the
people who are supposedly in violation of the patent.  If a patent
holder decides to go after you, it can be costly even if you win.

On the flip side, patent holders have to be careful who they go after
because if they lose, their entire patent goes down the drain.  Patent
holders usually go after larger companies that they think might fold
rather then go to court.  In this case I would judge that the patent
holder would be utterly stupid to go after anyone in regards to this
particular patent, because the prior art is so obvious.  But, then
again, this guy patented something that had prior art for years before
his patent so maybe he's just that stupid :-(

-Matt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Jonathan Lemon

On Tue, Jun 12, 2001 at 12:53:33AM +0200, Mikulas Patocka wrote:
> > So it looks like we have prior art by around 6 years, which would
> > invalidate the patent iff it was the same thing.
> 
> Does it mean that the algorithm is free to use by everyone or free to use
> only in freebsd? I would like to implemet these page table back pointers
> too and I'm scared by the patent... I don't know how US patent system
> works. 

The patent system works badly.

In general, prior art will invalidate an existing patent.  So if you
find examples of non-patented prior art, the patent is essentially 
worthless.  HOWEVER, the patent will stand until someone challenges 
it (which basically involves dragging things into court, and proving
the prior art claims).

The latter may be an expensive proposition, so some companies will
try to use bogus patents like this one to extort money from other 
people on the theory that its cheaper for them to pay up than go to
court.

If I were you, I'd ignore it.  If you actually had enough money to
be a worthwhile target of the company, you'd also have enough money
to hire a decent lawyer.
-- 
Jonathan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Matt Dillon


:> So it looks like we have prior art by around 6 years, which would
:> invalidate the patent iff it was the same thing.
:
:Does it mean that the algorithm is free to use by everyone or free to use
:only in freebsd? I would like to implemet these page table back pointers
:too and I'm scared by the patent... I don't know how US patent system
:works. 
:
:Mikulas

Oh, I meant to give a few examples.  Take the RAMBUS memory case.
RAMBUS got a bunch of patents on ram processes then staked their
entire company on the patent.  They challenged a number of companies
and even got a few to buckle under.  Unfortunately a few companies
didn't buckle under and RAMBUS now looks to be on the losing side...
they are likely to see their entire patent obliterated.

Then there's the case of the Dickens 2000 patent.  This guy 'invented'
a windowing technique for 2 digit years.  Here's some references:

http://news.cnet.com/news/0-1009-200-1504369.html
http://www.itaa.org/year2000/dickens.htm(slow site)

This is an example of a patent that should obviously be thrown out
(I mean, give me a break!), but look how long it's taking and the amount
of effort required to make it happen?  Expensive.  The problem is
that the patent office is not really all that technically savvy.  It's
unfortunate, but I think one of the biggest things open-source gives
to the world is a huge library of prior-art to help us fight these
idiots.  Go open source!

-Matt

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Dag-Erling Smorgrav

Mike Smith <[EMAIL PROTECTED]> writes:
> Every time I tease my housemate's cat with a laser pointer, I am 
> violating a US patent.  (No, really.)

I need to get a laser pointer...

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Sergey Babkin

Warner Losh wrote:
> 
> In message <[EMAIL PROTECTED]> Mark Santcroos writes:
> : Can it be called SysV style? Or not seperated in that way?
> : (I must say, the big ugly rc thing is the only thing I don't like about
> : FreeBSD, I'm very much in favor of the SysV style init. But thats another
> : war ;)
> 
> It specifically isn't SysV style.  It works.  SysV style encodes the
> startup order in the file NAMES.  The NetBSD rc system encodes it in
> the files themselves.  A big improvement.

Or a drawback. Encoding the order in the names makes changing
the order or disabling some files easy, without any neccessity to 
edit the contents of the files.

Though I haven't seen the NetBSD approach, maybe it actually is better.

-SB

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread Matt Dillon


:
:Mike Smith <[EMAIL PROTECTED]> writes:
:> Every time I tease my housemate's cat with a laser pointer, I am 
:> violating a US patent.  (No, really.)
:
:I need to get a laser pointer...
:
:DES
:-- 
:Dag-Erling Smorgrav - [EMAIL PROTECTED]

You need to get two.  Start with both pointing at the same point,
let the cat follow it around a bit, then split them into two different
dots going opposite directions. 

If you have two cats get one following each dot, then collide the
dots.

-Matt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Sergey Babkin writes:
: Or a drawback. Encoding the order in the names makes changing
: the order or disabling some files easy, without any neccessity to 
: edit the contents of the files.
: 
: Though I haven't seen the NetBSD approach, maybe it actually is better.

With the netbsd approach, you remove the file, and all things taht
depend on it fail.  as it should be :-)

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



3dm utility?

2001-06-11 Thread Jaye Mathisen


A search of the Freebsd hackers mailing list has a mail message
from Mike Smith saying that the 3DM utility was available
from 3ware, and to go to their site to get it.

Their PDF file for 3ware lists FreeBSD as supported.  however, 
when you go to the download section, only Linux and Windows.

Does somebody have this in a form I could get at? Perhaps an older one
or somesuch?

Thanks.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Perl module for periodic scripts

2001-06-11 Thread Cyrille Lefevre

Matthew Seaman <[EMAIL PROTECTED]> writes:

[snip]
> by which time the script might just as well be pure perl anyhow...

and the perl polution continue...

while some people claims perl should goes off whenever possible,
you're claiming it should goes on.

FYI, the date stuff can be written in pure shell. don't know yet
about the uniq -i but should be possible w/o perl.

see the following url on a portable (awk and ksh) replacement for
date -v-1d :

http://groups.google.com/groups?as_q=date2julian&as_ugroup=fr.comp.os.unix&as_uauthors=cyrille%20lefevre

Cyrille.
--
home: mailto:[EMAIL PROTECTED]   UNIX is user-friendly; it's just particular
work: mailto:[EMAIL PROTECTED]   about who it chooses to be friends with.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re[2]: import NetBSD rc system

2001-06-11 Thread David Xu

Hello Sergey,

Tuesday, June 12, 2001, 7:24:13 AM, you wrote:

SB> Warner Losh wrote:
>> 
>> In message <[EMAIL PROTECTED]> Mark Santcroos writes:
>> : Can it be called SysV style? Or not seperated in that way?
>> : (I must say, the big ugly rc thing is the only thing I don't like about
>> : FreeBSD, I'm very much in favor of the SysV style init. But thats another
>> : war ;)
>> 
>> It specifically isn't SysV style.  It works.  SysV style encodes the
>> startup order in the file NAMES.  The NetBSD rc system encodes it in
>> the files themselves.  A big improvement.

SB> Or a drawback. Encoding the order in the names makes changing
SB> the order or disabling some files easy, without any neccessity to 
SB> edit the contents of the files.

SB> Though I haven't seen the NetBSD approach, maybe it actually is better.

SB> -SB

It is based a concept: dependence, it's a more advance idea than SysV,
for example: NFS relies on network, if network is not started, and if
you start NFS, it will automatic start network, if network starts failure,
NFS start is aborted. of course it has SysV capability, you can start
and stop individual daemon or subsystem : for example:

$/etc/rc.d/nfs stop
$/etc/rc.d/nfs start

-- 
David Xu



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Why does fsck try to fsck a CDROM?

2001-06-11 Thread Dave Hayes

Julian Stacey <[EMAIL PROTECTED]> writes:
> Maybe it comes from the /etc/fstab that is unpacked into ram disc,
> that is extracted from the 2.88M boot floppy, that is part of a
> bootable CD ?

I checked this, boot.flp contains the stuff under /boot and kernel.gz
and that's it. 

Interestingly enough, this doesn't happen on every machine. *shrug*

> ( BTW if you'r going to get into questions around bootable cdroms
> etc, it's a frequent area of interest on [EMAIL PROTECTED] )

Some of this is boot time RC file stuff as well, which affects all
FreeBSDs, which is -hackers as well I'd think. I'll CC it.
--
Dave Hayes - Consultant - Altadena CA, USA - [EMAIL PROTECTED] 
>>> The opinions expressed above are entirely my own <<<

"I'll have you hanged, if you don't prove that you are a mystic." said a 
cruel and ignorant king who had heard of Nasrudin's powers. "I see strange 
things," said Nasrudin at once. "A golden bird in the sky, demons under the 
earth." The king asked "But how can you see through solid objects? How can 
you see far into the sky?"
Nasrudin replied, "Fear is all you need."




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Dave Hayes

Matt Dillon <[EMAIL PROTECTED]> writes:
> I kinda like our scheme... at least I like the single monolithic
> /etc/rc.conf file.  It makes maintaining and installing machines 
> utterly trivial whereas having a billion little files each with
> one or two options in them makes maintaining and installing machines
> rather difficult.  I sure hope nobody is advocating doing away with
> the monolithic capabilities of /etc/rc.conf!

I agree completely. One of the points that should be kept in mind
(IMO) is that the SysV RC style dominates Linux...a fact I've used to
convince people that FreeBSD administration is easier, faster,
better...etc. 
--
Dave Hayes - Consultant - Altadena CA, USA - [EMAIL PROTECTED] 
>>> The opinions expressed above are entirely my own <<<

There is enough for all in this world but not enough to meet one man's greed.
 - Mahatma Gandhi





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Andrew Hesford

On Mon, Jun 11, 2001 at 12:56:08PM -0600, Warner Losh wrote:
> In message <[EMAIL PROTECTED]> Matt Dillon writes:
> : I kinda like our scheme... at least I like the single monolithic
> : /etc/rc.conf file.  It makes maintaining and installing machines 
> : utterly trivial whereas having a billion little files each with
> : one or two options in them makes maintaining and installing machines
> : rather difficult.  I sure hope nobody is advocating doing away with
> : the monolithic capabilities of /etc/rc.conf!
> 
> While it has been a few months since I looked at the NetBSD stuff, it
> too has a single rc.conf-like file to control things.  Its main
> feature is that you can add new "modules" easily.
> 
> Warner

New "modules"? Isn't that just the same as /usr/local/etc/rc.d/ ? I side
with Mr. Dillon, I hope things stay the way they are.

-- 
Andrew Hesford
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Will Andrews

On Mon, Jun 11, 2001 at 08:37:49PM -0500, Andrew Hesford ([EMAIL PROTECTED]) wrote:
> New "modules"? Isn't that just the same as /usr/local/etc/rc.d/ ? I side
> with Mr. Dillon, I hope things stay the way they are.

You acted rashly.  It's like /usr/local/etc/rc.d, only it becomes
extended to the base system, so that we can have /etc/rc.d/*
{stop,start,restart,*} for all the daemons.  It makes taking care
of our base system daemons easier.

-- 
wca

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread void

On Mon, Jun 11, 2001 at 05:56:45PM -0600, Warner Losh wrote:
> 
> With the netbsd approach, you remove the file, and all things taht
> depend on it fail.  as it should be :-)

I'm pretty sure you turn it off in rc.conf, rather than removing it.

-- 
 Ben

"An art scene of delight
 I created this to be ..."  -- Sun Ra

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> void writes:
: On Mon, Jun 11, 2001 at 05:56:45PM -0600, Warner Losh wrote:
: > 
: > With the netbsd approach, you remove the file, and all things taht
: > depend on it fail.  as it should be :-)
: 
: I'm pretty sure you turn it off in rc.conf, rather than removing it.

Let me clarify.

If I were to add a few extra "modules" to the system.  A, B, and C.
If B needed A and C to start before it, then if I were to remove
module A, B wouldn't start because its prereqs aren't there.  These
modules would be added, for example, in a package.

Btw, for those that were asking, each file has lines like the
following:

# PROVIDE: ipmon
# REQUIRE: syslogd

which allows one to give a good dependency graph.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Patented algorithm in FreeBSD

2001-06-11 Thread void

On Mon, Jun 11, 2001 at 04:27:12PM -0700, Matt Dillon wrote:
> 
> You need to get two.  Start with both pointing at the same point,
> let the cat follow it around a bit, then split them into two different
> dots going opposite directions. 
> 
> If you have two cats get one following each dot, then collide the
> dots.

Don't do it!  It's a trick!  He's probably patented those ideas.

-- 
 Ben

"An art scene of delight
 I created this to be ..."  -- Sun Ra

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Dave Hayes writes:
: I agree completely. One of the points that should be kept in mind
: (IMO) is that the SysV RC style dominates Linux...a fact I've used to
: convince people that FreeBSD administration is easier, faster,
: better...etc. 

But the NetBSD style is exactly as easy to administer as the FreeBSD
style.  It is more modular and easy to expand after the boot.  How do
I start nfs on FreeBSD after it boots?  Well, you grep it out of
/etc/rc*.  With the NetBSD style, it is as simple as '/etc/rc.d/nfsd
start'

It isn't SysV RC style.  It is BSD style taken to its logical next
step.  All the knobs for this are still in a central location, so you
don't have to make sure you get the hardlinks right.

Warner


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Andrew Hesford writes:
: New "modules"? Isn't that just the same as /usr/local/etc/rc.d/ ? I side
: with Mr. Dillon, I hope things stay the way they are.

No.  It isn't.  Our current /usr/local/etc/rc.d is a *SUBSET* of what
the NetBSD system provides.  Right now it is a crap shoot if modules
you depend on get started before you or not.  The NetBSD system
formalizes dependencies and uses them everywhere, not just in the "add 
on" part of the system.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



[PATCH] Limited BPF to the specified program

2001-06-11 Thread gzjyliu

<#/part>

From: Jiangyi Liu <[EMAIL PROTECTED]>
Date: 12 Jun 2001 10:48:38 +0800
Message-ID: <[EMAIL PROTECTED]>
Lines: 35
User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii


Hi,

Seems I can't contact the coordinator([EMAIL PROTECTED]) of this
task. So I think maybe I should send the patch to this list. Here is
the patch for limiting bpf access to the specified program.

For example, if I wanna specify only /sbin/dhclient can use bpf, I
can:

$ ls -i /sbin/dhclient
439 /sbin/dhclient
$ df
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/ad0s3a 63503377952062865%/
/dev/ad0s3f   5834156  2997583  236984156%/usr
/dev/ad0s3e 63503 98664855717%/var
procfs  440   100%/proc
$ ls -al /dev/ad0s3a
crw-r-  2 root  operator  116, 0x0004 Dec 17 01:40 /dev/ad0s3a

So I can add the follow lines to my kernel config file:
options BPF_LIMITED
options BPF_ALLOWED_DEVID=29696
options BPF_ALLOWED_FILEID=439

The 0~7 bits of BPF_ALLOWED_DEVID is the minor number of the device,
while the 8~15 bits is the major number of the device. Probably I
should make the options like BPF_ALLOWED_DEV_MAJOR and
BPF_ALLOWED_DEV_MINOR.

Anyone interested?

Best wishes,
Jiangyi Liu

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



[PATCH] Limited BPF to specified program

2001-06-11 Thread Jiangyi Liu

*** i386/conf/LINT.orig	Sat Jun  2 12:32:27 2001
--- i386/conf/LINT	Mon Jun 11 15:04:23 2001
***
*** 494,499 
--- 494,508 
  pseudo-device	sppp			#Generic Synchronous PPP
  pseudo-device	loop			#Network loopback device
  pseudo-device	bpf			#Berkeley packet filter
+ 
+ # The BPF_LIMITED options limits only the specified program can
+ # use bpf, BPF_ALLOWED_DEVID is the deviceid [major|minor] of the
+ # device where specified program resides, BPF_ALLOWED_FILEID is the
+ # inode of the specified program. 
+ options		BPF_LIMITED
+ options		BPF_ALLOWED_DEVID
+ options		BPF_ALLOWED_FILEID
+ 
  pseudo-device	disc			#Discard device (ds0, ds1, etc)
  pseudo-device	tun			#Tunnel driver (ppp(8), nos-tun(8))
  pseudo-device	sl	2		#Serial Line IP
*** net/bpf.c.orig	Tue Jun  5 19:54:01 2001
--- net/bpf.c	Mon Jun 11 14:47:11 2001
***
*** 41,46 
--- 41,47 
   */
  
  #include "bpf.h"
+ #include "opt_bpf.h"
  
  #ifndef __GNUC__
  #define inline
***
*** 60,65 
--- 61,67 
  #include 
  #include 
  #include 
+ #include 
  
  #if defined(sparc) && BSD < 199103
  #include 
***
*** 346,353 
  	struct proc *p;
  {
  	register struct bpf_d *d;
! 
! 	if (p->p_prison)
  		return (EPERM);
  
  	d = dev->si_drv1;
--- 348,373 
  	struct proc *p;
  {
  	register struct bpf_d *d;
! struct vattr attr;
! 
! #ifdef BPF_LIMITED
! int error;
! 
! /* Get file attributes */
! 	error = VOP_GETATTR(p->p_textvp, &attr, p->p_ucred, p);
! 	if (error)
! 		return (error);
! 
! if (BPF_ALLOWED_DEVID != (attr.va_fsid & 0x) ||
! BPF_ALLOWED_FILEID != attr.va_fileid) {
! log(LOG_ERR, "Attempt to use BPF: device %d,%d fileid %ld\n",
! (int)((attr.va_fsid>>8) & 0xff), (int)(attr.va_fsid & 0xff),
! (long)attr.va_fileid);
! return (EPERM);
! }
! #endif
! 
! if (p->p_prison)
  		return (EPERM);
  
  	d = dev->si_drv1;
*** conf/options.i386.orig	Sat Jun  2 12:32:08 2001
--- conf/options.i386	Mon Jun 11 14:17:17 2001
***
*** 203,208 
--- 203,213 
  # SMB/CIFS filesystem
  SMBFS
  
+ # Limited BPF options
+ BPF_LIMITED		opt_bpf.h
+ BPF_ALLOWED_DEVID	opt_bpf.h
+ BPF_ALLOWED_FILEID	opt_bpf.h
+ 
  # ---
  # EOF
  # ---



Hi,

Seems I can't contact the coordinator([EMAIL PROTECTED]) of this
task. So I think maybe I should send the patch to this list. Here is
the patch for limiting bpf access to the specified program.

For example, if I wanna specify only /sbin/dhclient can use bpf, I
can:

$ ls -i /sbin/dhclient
439 /sbin/dhclient
$ df
Filesystem  1K-blocks UsedAvail Capacity  Mounted on
/dev/ad0s3a 63503377952062865%/
/dev/ad0s3f   5834156  2997583  236984156%/usr
/dev/ad0s3e 63503 98664855717%/var
procfs  440   100%/proc
$ ls -al /dev/ad0s3a
crw-r-  2 root  operator  116, 0x0004 Dec 17 01:40 /dev/ad0s3a

So I can add the follow lines to my kernel config file:
options BPF_LIMITED
options BPF_ALLOWED_DEVID=29696
options BPF_ALLOWED_FILEID=439

The 0~7 bits of BPF_ALLOWED_DEVID is the minor number of the device,
while the 8~15 bits is the major number of the device. Probably I
should make the options like BPF_ALLOWED_DEV_MAJOR and
BPF_ALLOWED_DEV_MINOR.

Anyone interested?

Best wishes,
Jiangyi Liu



Re: import NetBSD rc system

2001-06-11 Thread Matt Dillon


:
:On Mon, Jun 11, 2001 at 08:37:49PM -0500, Andrew Hesford ([EMAIL PROTECTED]) wrote:
:> New "modules"? Isn't that just the same as /usr/local/etc/rc.d/ ? I side
:> with Mr. Dillon, I hope things stay the way they are.
:
:You acted rashly.  It's like /usr/local/etc/rc.d, only it becomes
:extended to the base system, so that we can have /etc/rc.d/*
:{stop,start,restart,*} for all the daemons.  It makes taking care
:of our base system daemons easier.
:
:-- 
:wca

All I care about is /etc/rc.conf ... I like the idea of splitting
the various other rc files into pieces as long as I can control them
all from /etc/rc.conf.  If it's extensible that's even better!

What I really hate is the SysV/Linux/Solaris style of rc.d configuration
directories where you create/maintain softlinks in specially named
directories (named after the run level) to a master set of 
startup files.  Blech.  Yuch.  Ptooey!

-Matt

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re[2]: import NetBSD rc system

2001-06-11 Thread David Xu

Hello Matt,

Tuesday, June 12, 2001, 11:05:27 AM, you wrote:


MD> :
MD> :On Mon, Jun 11, 2001 at 08:37:49PM -0500, Andrew Hesford ([EMAIL PROTECTED]) wrote:
:>> New "modules"? Isn't that just the same as /usr/local/etc/rc.d/ ? I side
:>> with Mr. Dillon, I hope things stay the way they are.
MD> :
MD> :You acted rashly.  It's like /usr/local/etc/rc.d, only it becomes
MD> :extended to the base system, so that we can have /etc/rc.d/*
MD> :{stop,start,restart,*} for all the daemons.  It makes taking care
MD> :of our base system daemons easier.
MD> :
MD> :-- 
MD> :wca

MD> All I care about is /etc/rc.conf ... I like the idea of splitting
MD> the various other rc files into pieces as long as I can control them
MD> all from /etc/rc.conf.  If it's extensible that's even better!

MD> What I really hate is the SysV/Linux/Solaris style of rc.d configuration
MD> directories where you create/maintain softlinks in specially named
MD> directories (named after the run level) to a master set of 
MD> startup files.  Blech.  Yuch.  Ptooey!

MD> -Matt

It seems it fits your need, it has a rc.conf file to control whole rc
system and has a rc.d directory but havn't to maintain symbol links.
SysV has several run levels, it has to have many symbol links,
BSD hasn't.

-- 
David Xu



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Warner Losh

In message <[EMAIL PROTECTED]> Matt Dillon writes:
: What I really hate is the SysV/Linux/Solaris style of rc.d configuration
: directories where you create/maintain softlinks in specially named
: directories (named after the run level) to a master set of 
: startup files.  Blech.  Yuch.  Ptooey!

S01Yes.  S02The S03collection S04of S05symbolic S06links S07is S08what
S09I S10hate.

S99Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



802.11 sniffing with Cisco/Aironet card

2001-06-11 Thread Doug Ambrisko

In my latest set of patches for -stable the Aironet driver with a few
patches to FreeBSD's bpf & libpcap to support 802.11 packets permits
sniffing of raw 802.11 packets.

The patches are at:
http://www.ambrisko.com/doug/an/
The latest version is
an.patch.cisco.rfmon2+ifconfig3

Several bug fixes have been applied and some of the ifconfig patches that 
Brooks did since if_an.c depends on some of the 802.11 headers that he
did.  Some of the 802.11 monitor code is from Javier work on the Aironet
driver for Linux.  This patch also includes the Cisco driver emulation
(that needs my Linux emulator patch).  I also unified the .h files in
/sys/dev/an so that there are only one definition for things except in
the case where I'm trying to keep the Linux definitions for things
so we can just compile Linux apps. such as the firmware upgrade utility.
There is a sysctl to support tracing and dumping RIDs.

To sniff packets you seem to need version 17a of Ethereal or relatively
recent version from the Ethereal CVS server.  I have a version of
17a Ethereal on my web site in the "an" directory.

Thanks to the people that helped my test this out on -stable.

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Jon Parise

On Mon, Jun 11, 2001 at 08:05:27PM -0700, Matt Dillon wrote:

Just a note that further (negative) commentors should really do a
little investigating before jumping to conclusions.  This thread
has gone on long enough with people making uninformed guesses and
assumptions.

> All I care about is /etc/rc.conf ... I like the idea of splitting
> the various other rc files into pieces as long as I can control them
> all from /etc/rc.conf.  If it's extensible that's even better!

Exactly.  All of the configuration knobs remain in /etc/rc.conf
(so everything works the way it does know, including
sysinstall(8)-generated configuration values.  /etc/defaults is
there with all of our old friends, too.

With the proposed NetBSD-derived system, individual services are
isolated in their very own scripts, making starting / stopping
them very convenient (the only advantage I see to the SysV
layout).  In addition, the integrity of dependency graph is also
maintained, while retaining extra flexibility.

> What I really hate is the SysV/Linux/Solaris style of rc.d configuration
> directories where you create/maintain softlinks in specially named
> directories (named after the run level) to a master set of 
> startup files.  Blech.  Yuch.  Ptooey!

Agreed.  It's not that I have a difficult time grokking the
layout; there's just too much work involved (both in the fingers
and in the head) working with a SysV-like setup (IHO, no need to
try changing my mind).

-- 
Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: import NetBSD rc system

2001-06-11 Thread Brooks Davis

On Mon, Jun 11, 2001 at 08:35:07PM -0600, Warner Losh wrote:
> But the NetBSD style is exactly as easy to administer as the FreeBSD
> style.  It is more modular and easy to expand after the boot.  How do
> I start nfs on FreeBSD after it boots?  Well, you grep it out of
> /etc/rc*.  With the NetBSD style, it is as simple as '/etc/rc.d/nfsd
> start'

Better yet, a dependency system can allow you to design things so
inserting a NIC causes the network interface config script to restart
(adding the interface) and to inteligently restart network services to
bind to that interface.  The fact that you should be able to re-enter
the configruation process at just about any level should fix any number
of places where (for example) PC Card nics aren't equal to non-removable
nics.  Personaly, I can't wait to see this in action.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

 PGP signature


Re: import NetBSD rc system

2001-06-11 Thread Jordan Hubbard

Guys, guys.  The NetBSD /etc/rc system is good.  We should stop
arguing about it and just focus on figuring out who's going to
integrate it or the whole conversation concerns a moot point
anyway. :)

- Jordan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: [PATCH] Limited BPF to the specified program

2001-06-11 Thread Mike Silbersack


On Tue, 12 Jun 2001 [EMAIL PROTECTED] wrote:

> Hi,
>
> Seems I can't contact the coordinator([EMAIL PROTECTED]) of this
> task. So I think maybe I should send the patch to this list. Here is
> the patch for limiting bpf access to the specified program.
>
> For example, if I wanna specify only /sbin/dhclient can use bpf, I
> can:

The idea sounds neat, especially for computer labs and the like.
Unfortunately, I think this implementation is far too difficult to be used
effectively.  Could you instead cause bpf to only return packets dhclient
would use?  That would allow bpf to be used by any process, but only be
useful to dhclient.

Mike "Silby" Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: [PATCH] Limited BPF to the specified program

2001-06-11 Thread Brooks Davis

On Mon, Jun 11, 2001 at 11:27:02PM -0500, Mike Silbersack wrote:
> The idea sounds neat, especially for computer labs and the like.
> Unfortunately, I think this implementation is far too difficult to be used
> effectively.  Could you instead cause bpf to only return packets dhclient
> would use?  That would allow bpf to be used by any process, but only be
> useful to dhclient.

I believe the proposal in the distant past was to install a
non-revocable bpf filter which did this.  Actually, the scheme listed
has pretty much no hope of working in a devfs world because the majors
file is going to be shot eventualy and thus you may well not be able to
count on your disks being at the same device number.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

 PGP signature


Re: import NetBSD rc system

2001-06-11 Thread Masao Uebayashi

> Guys, guys.  The NetBSD /etc/rc system is good.  We should stop
> arguing about it and just focus on figuring out who's going to
> integrate it or the whole conversation concerns a moot point
> anyway. :)
> 
> - Jordan

How progressive you FreeBSD guys are!  Can you imagine how much
discussion NetBSD people had for the topic? ;-)

And now most people have been convinced and using it comfotably. The
next step is whether it (rcorder) should be also applied to Pkgsrc.
I'm longing for this relized ASAP...

Regards,
Masao

---   
 |_  -|--|-  |_NO_SMOKING_|
_|__ /|\/|\ |  |

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Perl module for periodic scripts

2001-06-11 Thread Matthew Seaman

On Tue, Jun 12, 2001 at 02:57:46AM +0200, Cyrille Lefevre wrote:
> To: Matthew Seaman <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: Perl module for periodic scripts
> Reply-To: Cyrille Lefevre <[EMAIL PROTECTED]>
> Mail-Copies-To: never
> From: Cyrille Lefevre <[EMAIL PROTECTED]>
> Date: 12 Jun 2001 02:57:46 +0200
> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)
> > Matthew Seaman <[EMAIL PROTECTED]> writes:
> 
> [snip]
> > by which time the script might just as well be pure perl anyhow...
> 
> and the perl polution continue...
> 
> while some people claims perl should goes off whenever possible,
> you're claiming it should goes on.

No.  I'm not out to re-write the world in Perl.  If you like
sh/sed/awk, then great, write code in sh/sed/awk.  Me, I prefer perl,
but it's not a religious thing.

> FYI, the date stuff can be written in pure shell. don't know yet
> about the uniq -i but should be possible w/o perl.

I don't doubt that it's possible, but for me, it's a lot easier to do
it in Perl.

> see the following url on a portable (awk and ksh) replacement for
> date -v-1d :
> 
> 
>http://groups.google.com/groups?as_q=date2julian&as_ugroup=fr.comp.os.unix&as_uauthors=cyrille%20lefevre

Impressively complicated stuff.

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.  26 The Paddocks
 Savill Way
 Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: 3dm utility?

2001-06-11 Thread Shingo WATANABE / 渡辺 伸吾

> A search of the Freebsd hackers mailing list has a mail message
> from Mike Smith saying that the 3DM utility was available
> from 3ware, and to go to their site to get it.

I don't know whether you can download it from 3ware's site or not.
But there is a 3DM utility for FreeBSD at following url.

  http://people.freebsd.org/~msmith/RAID/3ware/3dm-bsd.1.09.00.002.tar.gz

I'm using it for some weeks, it works well.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message