Re: sed/awk, instead of Perl

2008-08-22 Thread Peter Boosten
Walt Pawley wrote:
> At 9:59 AM +0200 8/22/08, Oliver Fromme wrote:
> 
 > wump$ ls -l Desktop/klog
> -rw-r--r--  1 wump  1001  52753322 22 Aug 16:37 Desktop/klog
> wump$ time sed "s/ .*//" Desktop/klog > kadr1
> 
> real0m10.800s
> user0m10.580s
> sys 0m0.250s
> wump$ time perl -pe 's/ .*//' Desktop/klog > kadr2
> 
> real0m0.975s
> user0m0.700s
> sys 0m0.270s
> wump$ cmp kadr1 kadr2
> wump$
> 
> Why disparity in execution speed? Beats me, but my G5's fans
> started to take off running the sed command. I don't think the
> Perl command took long enough to register thermally. Curious.

sed outputs constantly, while perl does its output at the end at once.

Try:

time awk '{print $1}' Desktop/klog > kadr3

awk also outputs at the end, however is much smaller than perl (and
therefore much quicker).

Peter
-- 
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: OT: most "universal" file system for 1TB external USB2 hard drive

2008-08-22 Thread RW
On Fri, 22 Aug 2008 13:13:29 -0500
"Andrew Gould" <[EMAIL PROTECTED]> wrote:

> I couldn't help myself.  During lunch, I found a 3.5" 1TB SATA
> internal HD **and** a USB2 HD enclosure for SATA drives on sale at
> large % discounts. It was more than I could resist.
> 
> The operating systems in my home include FreeBSD, NetBSD, Mac OS X and
> Windows XP Pro.  If I want all of these systems to be able to read
> and write to the drive, what file system should I use?  I know fat32
> is pretty universal, but is it advisable?

There is also NTFS through ntfs-3g ,which is available for all of the
above (sysutils/fusefs-ntfs on FreeBSD). Having a native Windows
filesystem is sensible on a portable drive, and fat32 is not a great
filesystem.

http://www.ntfs-3g.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sed/awk, instead of Perl

2008-08-22 Thread Walt Pawley
At 9:59 AM +0200 8/22/08, Oliver Fromme wrote:

> - The perl command you wrote above is pretty much a sed
>   command anyway (except you incorrectly used non-portable
>   regular expression syntax).  Why use perl to execute a
>   sed command?

At the risk of beating this to death, I just happened to
stumble on a real world example of why one might want to use
Perl for sed-ly stuff. I wanted to pull off the accessor's
address from each line of an Apache access log file. So, I
figured after this discussion that sed was the way to go. Then
I got curious and did the following:

wump$ ls -l Desktop/klog
-rw-r--r--  1 wump  1001  52753322 22 Aug 16:37 Desktop/klog
wump$ time sed "s/ .*//" Desktop/klog > kadr1

real0m10.800s
user0m10.580s
sys 0m0.250s
wump$ time perl -pe 's/ .*//' Desktop/klog > kadr2

real0m0.975s
user0m0.700s
sys 0m0.270s
wump$ cmp kadr1 kadr2
wump$

Why disparity in execution speed? Beats me, but my G5's fans
started to take off running the sed command. I don't think the
Perl command took long enough to register thermally. Curious.

FWIW: I did this with an older version of Mac OS X, rather
FreeBSD so it could easily not show the same results if I moved
the log file to a FreeBSD box and did it there.
-- 

Walter M. Pawley <[EMAIL PROTECTED]>
Wump Research & Company
676 River Bend Road, Roseburg, OR 97470
 541-672-8975
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: airport express disk (on router)

2008-08-22 Thread Kevin Smith
I was mistaken, I have the airport extreme which is currently sharing a hard
disk not the airport express. (I have 2 of those as well for streaming
audio, but that's not the one's I am talking about).
Why is this the wrong list?. The question pertains to mounting the AP
extreme disk on a freebsd server ?.

On Fri, Aug 22, 2008 at 3:31 PM, assetburned <[EMAIL PROTECTED]> wrote:

> Hi
>
> first of all this looks like the wrong mailing list for it.
> anyway the AirPort Express is not able to share hard disks, only printer.
>
> cu assetburned
>
>
> On 22.08.2008, at 19:50, Kevin Smith wrote:
>
>  Does anyone know how I can mount an airport express disk connected via
>> USB to my airport express router ?   I believe the disk can be
>> advertised on the LAN with the "bonjour" service - if that helps any.
>> thanks in advance.
>> ___
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "
>> [EMAIL PROTECTED]"
>>
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ndis0 no link on 6.3-RELEASE

2008-08-22 Thread Glen Barber
Hi everyone.  Sorry to bump such an old post, but I have figured out a
'hack' to get this driver to work, and figured I'd post here, in case
it may help someone else.

Previously, I said the following, about a Broadcom 4318 chipset on a
Dell Inspiron b120:
"Upon 'kldunload bcmwl5.ko; kldload bcmwl5.ko', my ndis0 card looses all WPA
capabilities."

The fix is as follows, as I have been unable to find anything relevant
regarding netif, dhclient, wpa_supplicant or ndis:

Step 1: Create /etc/rc.local, with '/sbin/kldload /boot/modules/bcmwl5_sys.ko'

Step 2: Edit /etc/wpa_supplicant.conf as needed

Step 3: Echo 'ifconfig_ndis0="WPA DHCP"' to /etc/rc.conf

Outcome:
System boots, loading netif, dhclient, and wpa_supplicant.  Next,
after the other three are running, the rc.local script loads the ndis0
driver.  On my system (and surrounding networks) my system tries to
authenticate against any available network, but then finally reads
wpa_supplicant.conf, and uses my network.

As I said, sorry to bump an old thread, but hopefully this will help
someone else, regardless of how crude of a hack it is.

Regards,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: airport express disk (on router)

2008-08-22 Thread assetburned

Hi

first of all this looks like the wrong mailing list for it.
anyway the AirPort Express is not able to share hard disks, only  
printer.


cu assetburned

On 22.08.2008, at 19:50, Kevin Smith wrote:


Does anyone know how I can mount an airport express disk connected via
USB to my airport express router ?   I believe the disk can be
advertised on the LAN with the "bonjour" service - if that helps any.
thanks in advance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED] 
"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Kevin Monceaux


On Fri, 22 Aug 2008, Oliver Fromme wrote:


How would you like this one?

http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png

(It's work in progress.  See the latest FreeBSD Quarterly Status 
Report.)


When I recently came across info on the graphical boot loader project I 
secretly hoped that either the project would fail, or that at least the 
graphical boot loader would be optional.  The text based boot loader and 
text based installer are to of the things I really like about FreeBSD. 
But, after seeing the above screenshot I think I might be able to get used 
to the boot loader pictured in that screenshot.  The screenshot I came 
across with I first discovered the project recently:


http://www.secnetix.de/olli/FreeBSD/vloader/screenshot.png

looks nice, but is just a bit too modern for my tastes.  I know, I'm old 
fashioned.  I still prefer programs with text based user interfaces.  I'm 
typing this e-mail in Alpine and my editor of choice is vim.  Oh, and I 
work as an operator in an IBM mainframe shop where most of our "online" 
applications are still 3270 text terminal based.  Now days we use terminal 
emulator software on PCs instead of actual 3179 terminals, but the apps 
are still text based, and still work fine on the few 3179 terminals we 
have left.




Kevin
http://www.RawFedDogs.net
http://www.WacoAgilityGroup.org
Bruceville, TX

Si hoc legere scis nimium eruditionis habes.
Longum iter est per praecepta, breve et efficax per exempla!!!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Upgrading firmware/bios/boot on Areca ARC-1210

2008-08-22 Thread Dominik Meister
Hi Bob

Bob Willcox [Fri, Aug 22, 2008 at 07:41:52AM -0500]:
> I posted this same question on freebsd-scsi a few days ago but got no
> response there so I thought I try here.
> 

Can't really answer your question but I've found the Areca support to be
very responsive and helpful. Just fill out the form on 
http://www.areca.com.tw/support/ask_a_question.htm. They usually answer
within a few hours.

hope to help,
Dominik

-- 
Dominik Meister
My public GnuPG key is available at http://www.meisternet.ch/gpg.txt


pgpfXEp27IDaM.pgp
Description: PGP signature


Re: OT: most "universal" file system for 1TB external USB2 hard drive

2008-08-22 Thread Wojciech Puchar

Windows XP Pro.  If I want all of these systems to be able to read and write
to the drive, what file system should I use?  I know fat32 is pretty
universal, but is it advisable?


yes, just don't put too many small files on it as it's wasteful.
and don't put too big files (in order of many GB) too, because it gets 
slow then.


but yes - it's the only FS really portable. not because it's good (exactly 
opposite) but because it's very simple to implement and it's common, so 
every OS has fat16/32 support.



the other solution is to use unix UFS, and install UFS driver for windoze, 
which exist AFAIK (at least i had this for win98 some time ago).

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Changing the default colors in the console

2008-08-22 Thread Polytropon
On Fri, 22 Aug 2008 15:05:02 -0500, Robe <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> I'm trying to change the default color for the directories using the
> following command to see them with purple color
> 
> setenv LS_COLORS "di=01;35"
> 
> but when I use the following command
> 
> ls -G
> 
> I still see the default color.
> 
> What's wrong?

Try to put this into your /etc/csh.cshrc for global or ~/.cshrc for
local effect:

setenv  LSCOLORSExGxdxdxCxDxDxBxBxegeg
alias   ls  'ls -FG'
alias   ll  'ls -laFG'

Read "man ls" for the colour description. Make sure your terminal
emulation supports color; xterm and cons25l1 do.



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Changing the default colors in the console

2008-08-22 Thread Dan Nelson
In the last episode (Aug 22), Robe said:
> Hi there,
> 
> I'm trying to change the default color for the directories using the
> following command to see them with purple color
> 
> setenv LS_COLORS "di=01;35"
> 
> but when I use the following command
> 
> ls -G

I think you want LSCOLORS instead.  See the ls manpage.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: OT: most "universal" file system for 1TB external USB2 hard drive

2008-08-22 Thread Polytropon
On Fri, 22 Aug 2008 13:13:29 -0500, "Andrew Gould" <[EMAIL PROTECTED]> wrote:
> I couldn't help myself.  During lunch, I found a 3.5" 1TB SATA internal HD
> **and** a USB2 HD enclosure for SATA drives on sale at large % discounts.
> It was more than I could resist.
> 
> The operating systems in my home include FreeBSD, NetBSD, Mac OS X and
> Windows XP Pro.  If I want all of these systems to be able to read and write
> to the drive, what file system should I use?  I know fat32 is pretty
> universal, but is it advisable?

Well, the filesystem with the most interchange quality isn't a
real file system - it's tar. Inside the UNIX world, it's very
welcome if you need to exchange data from, let's say, Sun, SGI
and x86 UNIX systems using a physical device.

Because "Windows" is intendedly not able to access file systems
that are not made by MICROS~1, UFS (which you could access from
Mac OS X as well as from the BSDs) would be a good choice, but it
can't be chose due to your requirements in this setting.

Something like an MS-DOS filesystem would be accessible from
all the systems you mentioned, but it doesn't bring you much
comfort (for example no user management, no access rights).



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Changing the default colors in the console

2008-08-22 Thread Robe
Hi there,

I'm trying to change the default color for the directories using the
following command to see them with purple color

setenv LS_COLORS "di=01;35"

but when I use the following command

ls -G

I still see the default color.

What's wrong?

I'm using the default shell *tcsh* and FreeBSD v7.0

Thanks,


-- 
Robe.

Si deseas que tus sueños se hagan realidad ¡despierta!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Polytropon
On Fri, 22 Aug 2008 13:58:04 +0200 (CEST), Oliver Fromme <[EMAIL PROTECTED]> 
wrote:
> There are more screen shots in the same directory:
> 
> http://www.secnetix.de/olli/FreeBSD/vloader/
> 
> I'm sure you'll find one that is sufficiently less
> conservative, whatever that means.   ;-)
> 
> It is intended that the user (or vendor) will be able
> to use his own background image, so you can supply
> your own.

I hope there will be a german laguage variant so I don't
need to hear this repeating "But it's in English, I want
in German!" moaning anymore. :-)

Great invention! Really!


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Michael Powell
Oliver Fromme wrote:
[snip] 
>  > Its good to see my old friend back where he belongs
> 
> How would you like this one?
> 
> http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png
> 
> (It's work in progress.  See the latest FreeBSD Quarterly
> Status Report.)
> 
> Best regards
>Oliver
> 

That's great! I like it. I was never enamored of the "sex toy"
variant. "Chuckie" has always been my favorite. Thanks.

-Mike


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: /etc/groups gone

2008-08-22 Thread Polytropon
Just an addition:

On Fri, 22 Aug 2008 09:14:39 +0200, "DA Forsyth" <[EMAIL PROTECTED]> wrote:
> you want to do
> man rcs
> and start using RCS to track changes to your important system files.
> That way, if you delete one you can just check it out of the RCS 
> store.  'backups with history'

You can use CVS (comes with the FreeBSD system), too:

% man cvs

I found it to be a very comfortable system to manage file
changes on the path of my own software development (document
progress, undo "bad" inventions, checkin and checkout even
with multiple contributors).

Using CVS to manage self made system configuration files
is, by the way, a very good idea I never thought of. I'll
see if I like this concept.



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


airport express disk (on router)

2008-08-22 Thread Kevin Smith
Does anyone know how I can mount an airport express disk connected via
USB to my airport express router ?   I believe the disk can be
advertised on the LAN with the "bonjour" service - if that helps any.
thanks in advance.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Again: fsck_ffs memory requirements

2008-08-22 Thread Polytropon
On Fri, 22 Aug 2008 10:29:05 +0200 (CEST), Oliver Fromme <[EMAIL PROTECTED]> 
wrote:
> Unfortunately fsck isn't able to cope with any arbitrary
> level of damage.  If certain kinds of unexpected problems
> occur, it throws in the towel.  In theory it might be
> possible to deal with your particular problem, but nobody
> has implemented it in fsck yet.

I've examined some of the data contained in the error
message, I inserted some "pretty printing code" to see
which condition was present at abort time:

--- condition: inumber > lastvalidinum
--- inumber=306176 lastvalidinum=306175, lastinum=306176
fsck_ffs: bad inode number 306176 to nextinode

I commented out this errx() block and found out:

--- condition: inum > maxino
--- inum=6545 maxino=6544
fsck_ffs: inoinfo: inumber 6545 out of range

It seems that some values (lastvalidinum, maxino) are retrieved
incorrectly, given the assumption that one inode is needed per
file (and directory). Conslusion: Too few of them.




> Someone with intimate knowledge of UFS2 might be able to
> help you, possibly using fsdb(8), [...]

Yes, fsdb is a very good tool. I did dive into the filesystem and
found out that many files are still there. I'll take some time
to learn more about UFS and fsdb. Maybe there's a way to restore
files - as I mentioned, "Windows" recovery software is able to
retrieve arbitrary files and subtrees from the dd image. So should
BSD, too.



> [...] but this requires direct
> access to the file system image and is beyond what can be
> done through a mailing list. 

If I found enough information, I'll ask again, with more substance
and less assumptions.



> Usually such services cost
> money.  (The price to pay for not having backups.)

In Germany, this is called "Lehrgeld". :-) But as I found
out by calling some recovery services, they've got no big
clue about BSD file systems, their main business is FAT and
NTFS stuff, along with disassembling drives in cleanrooms.



> You might also have success using one of the various
> recovery or forensic toolkits out there, e.g. sleuthkit
> (it's in ports).

Tools like dls, ils and fls (from The Sleuth Kit) are very
promising. Maybe they can help. Other tools that allow to
create images from defective media (e. g. ddrescue) are nice,
too, but don't help here because image retrieval has been no
problem.



> Well, there's nothing an OS can do against hardware failure
> (such as a crash because of power loss). 

It hasn't been a power loss. At some point in ordinary working,
I think I'd been surfing the Web at this time, the machine
stopped, stood still for approx. 5 seconds, then dropped to
the console /dev/ttyv0, put an error message and rebooted.
After this, fsck_ffs found many errors on /, /var and /usr
(e. g. /usr/X11R6/ had disappeared and was restored in pieces
into lost+found/), the system didn't boot anymore. So I took
another system to copy important data from the drive, which
worked for everything except _my_ home directory.

I have _no_ clue what happened... and I think all I need to
do is to have fsck_ffs iterate on all the inodes that are not
connected to my home directory anymore, or, create a new inode
that connects to all these inodes that had been the content
of my home directory. I hope there is a way to do this.



> Such failures can
> cause arbitrary damage to mass storage, especially if the
> power failure happens in the middle of writing a track, and
> especially when using "consumer grade" disks.

People want cheap, they get cheap. You can't imagine how I
hate this crappy cheap stuff...

Except of an power outage, there could be other things imaginable
that could leat to the destruction of an inode. Writing processes
are "more dangerous" than reading processes. BUT DID IT HAVE TO
BE _MY_ HOME DIRECTORY?! :-) Yes, it had to, because I relied to
much on the fact that FreeBSD served me well for more than 5 years
so I didn't see a neccessartity for backups ("I'll do them next
week."), and that's the revenge.



> Disks are cheap these days.  Cheaper than your valuable
> data. 

That's why I bought 2 x 500 GB WD drives to make a copy pf
everything I still have, and I put them onto the shelf.



> So, a simple way to make backups is to buy an
> external disk (USB2, Firewire/IEEE1394, eSATA, or even
> a hot-swappable PATA drive tray), sync your system to it
> once per week, and store it in a safe place.

I have an USB 2.0 carrier where I'll put an PATA disk in.
At the moment, I'm doing the backups by putting the drive
directly into the machine (ATA-100 cable).



> If you're paranoid, then use two such disks alternating,
> so you have one good (safe, i.e. disconnected) copy at
> every point in time.  If you're even more paranoid, store
> multiple backup disks in different places (e.g. one at
> home at one at your office, or at a friend's place, or
> even in a safe deposit box at your bank company), so you
> still have a good backu

Re: Is the list getting my e-mails?

2008-08-22 Thread Al Plant

Mario Lobo wrote:

   Hi;
   Forgive for this test.
   Recently I changed my domain to another ISP.
   Since then, I have been unable to post to the lists I'm subscribed to.
   I created a gmail account, switched to it and nothing. Now I switched
   back to [EMAIL PROTECTED] and nothing.
   I can get into the management page, I marked to receive my own posts
   and nothing.
   I get all the posts to all the lists except mine.
   Am i being blocked?
   Could anyone just simply reply this post?
   Thanks,
   Mario Lobo




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Aloha Mario,

Read your post here in Hawaii...

Does the isp give you a fixed address? Or maybe blocks mail port.

~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
  + http://hawaiidakine.com + http://freebsdinfo.org +
  + http://aloha50.net   - Supporting - FreeBSD 6.* - 7.* - 8.* +
  < email: [EMAIL PROTECTED] >
"All that's really worth doing is what we do for others."- Lewis Carrol

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tailing logs

2008-08-22 Thread DAve

DAve wrote:
I would love to have a way to tail a log, like piping to grep, except I 
see every line and the lines I would normally grep for are highlighted. 
That would be cool. Anyone know of a bash command or tool that will do 
this?


Side note, I am tailing sendmail after changes to my outbound queue 
runners. I want to highlight my sm-mta-out lines but still see all lines.


DAve


Thank you all, I got what I needed!

DAve

--
Don't tell me I'm driving the cart!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


OT: most "universal" file system for 1TB external USB2 hard drive

2008-08-22 Thread Andrew Gould
I couldn't help myself.  During lunch, I found a 3.5" 1TB SATA internal HD
**and** a USB2 HD enclosure for SATA drives on sale at large % discounts.
It was more than I could resist.

The operating systems in my home include FreeBSD, NetBSD, Mac OS X and
Windows XP Pro.  If I want all of these systems to be able to read and write
to the drive, what file system should I use?  I know fat32 is pretty
universal, but is it advisable?

Thanks,

Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


PF traffic management on two devices + VPN

2008-08-22 Thread assetburned

Hi,

I use PF to manage the traffic going through a VPN connection (ng0 to  
ng1). I am also able to manage the traffic on the device where I  
expect the VPN traffic (ed1 and ed2).
But now my problems starts I also want to manage the outgoing traffic  
on ed0 to the WAN side.


On my router s Squid installed, so I thought that all packages  
generated by my FreeBSD machine could be put into a queue for ed0.
If i check the settings with pftop than everything looks fine. But it  
looks like the limits for the upper limit are totally ignored.


So I did a check from the other side. I installed an Apache on that  
server and tried to download a file from that server. And hey there is  
my bandwidth management.


So I am confused. How can I handle the traffic generated by the squid  
on the router on the WAN interface?


cu assetburned

 my pf.config 

#
# Version 2008-08-22-014
# based on https://calomel.org/pf_config.html
# manual at: http://www.openbsd.org/faq/pf/

### some basics ###
# following line is onlz possible if the two variables are defined  
before these line!

# IntIF = "{" $IntIF1 $IntIF2 "}"
#
# following line is not possible. there have to be at least two  
variables!

# ExtIF = "{" $ExtIF1 "}"
#
# following line is not possible because there would be {something  
{something, something}}

# Whatever = "{" $ExtIF1 $IntIF "}"


# Interfaces #

 ExtIF1   = "ed0"# this is the WAN connection
 IntIF1   = "ed1"# this is the real connection to all  
192.168.4.x
 IntIF2   = "ed2"# this is the real connection to all  
192.168.3.x

 LocIF= "lo0"
 ExtIF= "ed0"
 IntIF= "{" $IntIF1 $IntIF2 "}"
 VPNIF0   = "ng0"
 VPNIF1   = "ng1"

# keep in mind this is only usable for nat and rdr and not for the  
pass rules because of the different queues!

 VPNIF= "{" $VPNIF0 $VPNIF1 "}"

# Speeds 
### Interface ###

 E1_speed = "1Mb"
 IntIF1_speed = "10Mb"
 IntIF2_speed = "10Mb"
 VPN_speed= "3Mb"

### Protocol ###
 VPN_green= "1Mb"
 VPN_yello= "512Kb"
 VPN_red  = "256Kb"

# Hosts #
# for the case there are internel servers
 H_squid  = "192.168.5.5"
 H_sshd   = "192.168.4.5"
 H_vpnd   = "192.168.4.5"
 H_apache = "192.168.4.5"
 H_apacheV= "192.168.5.5"  # the proxy where the PAC file is  
hosted inside the VPN
 H_mail   = "10.10.98.217" # have to check that, this is  
another lab computer!


# spechial LSBU server (green listed)
 H_LOVE_MA= "10.10.60.60"# mail.
 H_LOVE_BB= "10.10.76.13"#
 H_LOVE_EC= "10.10.98.146"   #
 H_LOVE_PB= "10.10.109.128"  #
 H_LOVE_WW= "10.10.109.120"  #
 H_LOVE_LB= "10.10.109.180"  #
 H_LOVE_LP= "10.10.109.178"  #
 H_LOVE_LR= "10.10.109.181"  #
 H_LOVE_DH= "any"  # the DHCP server
 H_LOVE   = "{" $H_LOVE_MA $H_LOVE_BB $H_LOVE_EC $H_LOVE_PB  
$H_LOVE_WW $H_LOVE_LB $H_LOVE_LP $H_LOVE_LR "}"


 Protocols 
# Well known ports
 P_squid  = "3128"
 P_msproxy= "8080"
 P_proxy  = "{" $P_squid $P_msproxy "}"
 P_http   = "80"
 P_https  = "443"
 P_brows  = "{" $P_http $P_https "}"
 P_pop3   = "110"
 P_pop3s  = "995"
 P_imaps  = "993"
 P_imap   = "143"
 P_smtp   = "25"
 P_smtps  = "465"
 P_mail   = "{" $P_pop3 $P_pop3s $P_imaps $P_imap $P_smtp  
$P_smtps "}"

 P_ssh= "22"
 P_dns= "53"
 P_vpnd   = "1723"
 P_samba  = "{ 137, 138, 139 }"

 ## Low Priority Squid ##
 P_LPS= "31280"

 Host & Port combinations 
 HP_squid = $H_squid  " port " $P_squid
 HP_LPS   = $H_squid  " port " $P_LPS
 HP_apache= $H_apache " port " $P_http
 HP_apacheV   = $H_apacheV " port " $P_http
 HP_vpnd  = $H_vpnd   " port " $P_vpnd
 HP_mail  = $H_mail   " port {" $P_pop3 $P_pop3s $P_imaps $P_imap  
$P_smtp $P_smtps "}"


 Networks 
 N_ExtIF1 = "10.10.0.0/16"
 N_IntIF1 = "192.168.4.0/24"
 N_IntIF2 = "192.168.3.0/24"
 N_VPN= "192.168.5.0/24"
# I don't know why it isn't possible to use the variables from above.
 N_intern = "{ 192.168.4.0/24 , 192.168.3.0/24 }"

 N_priv1  = "127.0.0.0/8"
 N_priv2  = "172.16.0.0/12"
 N_priv3  = "169.254.0.0/16"
 N_priv4  = "192.168.0.0/16"
 N_privat = "{ 127.0.0.0/8 , 172.16.0.0/12 , 169.254.0.0/16 ,  
192.168.0.0/16 }"


### States & Queues ###
 SynState = "flags S/SAFR synproxy state"
 TcpState = "flags S/SAFR modulate state"
 UdpState = "keep state"

### Stateful Tracking Options ###
 ExtIfSTO = "(max 9000, source-track rule, max-src-conn   2000,  
max-src-nodes 254)"
 IntIfSTO = "(max 250,  source-track rule, max-src-conn   100,   
max-src-nodes 254, max-src-conn-rate 75/20)"


### Options ###
 set optimization aggressive
 set block-policy drop
 set ruleset-optimization basic

# Normalization #
# to hide what is going on in the LAN
# and to be sure that an optimum of payload is send by each packet.
 scrub lo

Re: Security questions, seeing more then one dhcp client.

2008-08-22 Thread Jeffrey Goldberg

On Aug 21, 2008, at 10:38 PM, Christopher Joyner wrote:

I am seeing two dhcp clients connected to my wireless router.  Does  
that mean someone other then me is on it?


Do you have a Wii?  Or maybe an iPhone or other similar device?  Or a  
network printer?  There is a fair chance that the other client is  
something that should be there that you've just forgotten about.  
However, there is also also a reasonable chance that it is a security  
breach if you are running an unsecured wireless network.


What I would recommend is that you probe the unknown device with  
something like nmap (available from ports security/nmap) with  
something like


  nmap -O -sV IP-ADDRESS-OF-MYSTERY-DEVICE

That should give you a fair amount of information about the device.

Cheers,

-j


--
Jeffrey Goldberghttp://www.goldmark.org/jeff/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is the list getting my e-mails?

2008-08-22 Thread Mario Lobo
On Friday 22 August 2008 14:17:00 Gerard wrote:
> On Fri, 22 Aug 2008 13:20:22 -0300 (ART)
>
> Mario Lobo <[EMAIL PROTECTED]> wrote:
> > From: Mario Lobo <[EMAIL PROTECTED]>
> > Subject: Is the list getting my e-mails?
> >
> >
> >Hi;
> >Forgive for this test.
> >Recently I changed my domain to another ISP.
> >Since then, I have been unable to post to the lists I'm subscribed
> > to. I created a gmail account, switched to it and nothing. Now I
> > switched back to [EMAIL PROTECTED] and nothing.
> >I can get into the management page, I marked to receive my own
> > posts and nothing.
> >I get all the posts to all the lists except mine.
> >Am i being blocked?
> >Could anyone just simply reply this post?
>
> You will never receive a message you send to a list via 'GMail' back.
> It is one of many serious 'GMail' deficiencies. They are aware of it;
> however, they also refuse to correct the problem.

Ok.

I am not using my gmail address any more.

Thanks

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio YET!!] (99,7% winedows FREE)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is the list getting my e-mails?

2008-08-22 Thread Gerard
On Fri, 22 Aug 2008 13:20:22 -0300 (ART)
Mario Lobo <[EMAIL PROTECTED]> wrote:

> From: Mario Lobo <[EMAIL PROTECTED]>
> Subject: Is the list getting my e-mails?
> 
> 
>Hi;
>Forgive for this test.
>Recently I changed my domain to another ISP.
>Since then, I have been unable to post to the lists I'm subscribed
> to. I created a gmail account, switched to it and nothing. Now I
> switched back to [EMAIL PROTECTED] and nothing.
>I can get into the management page, I marked to receive my own
> posts and nothing.
>I get all the posts to all the lists except mine.
>Am i being blocked?
>Could anyone just simply reply this post?

You will never receive a message you send to a list via 'GMail' back.
It is one of many serious 'GMail' deficiencies. They are aware of it;
however, they also refuse to correct the problem.

-- 
Gerard
[EMAIL PROTECTED]

The past always looks better than it was.
It's only pleasant because it isn't here.

Finley Peter Dunne (Mr. Dooley)


signature.asc
Description: PGP signature


Re: rtprio + su - doesn't work

2008-08-22 Thread Chuck Swiger

On Aug 22, 2008, at 6:28 AM, Wojciech Puchar wrote:
tu run (at startup) asterisk PBX as user centrala with realtime  
priority.

asterisk is started, but without realtime priority.


Yes, you'd be running the su process with realtime priority.  :-)


and su forks shell and asterisk - isn't it?


That's right.  RT priority isn't inherited by children processes, or  
so it seems.


[ ... ]
Well, you have to run rtprio as root, or else make it setuid-root  
(which probably isn't a great idea).  Presumably this thing has a  
startup script which runs it, and it probably creates a PID file  
under /var/run which you could use to adjust the priority during  
system startup via:


rtprio 31 -`cat /var/run/asterix.pid`


did this

/usr/bin/su centrala -c \
"/usr/local/sbin/asterisk -C /centrala/etc/asterisk.conf"
/bin/sleep 5
/usr/sbin/rtprio 31 -`cat /centrala/run/asterisk.pid`

works fine, but looks like workaround for me not proper solution?
am i wrong? thank you for explanation why it doesn't work directly


Very few people do anything with RT priorities, in part because Unix  
was designed to maximize workload throughput originally in a batch- 
processing context.  People who need hard realtime tend to use more  
specialized systems and hardware designed for realtime tasks (ie,  
bounded interrupt service times and the like)...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Problems with make install in kde4

2008-08-22 Thread Matthias Apitz
El día Friday, August 22, 2008 a las 11:36:53AM -0300, Mario Lobo escribió:

> 
>Hi;
>I think i had a problem with my last e-mail so I'm reposting.
>This all after csup, portsnap, etc...
>The 'make' of /usr/ports/= x11/kd4 went fine.
>When I 'make install', i get this:
>(snip)<= br>===>   kdegraphics-4.1.0 depends on shared library:
>qimage= blitz.4 - found
>===>   kdegraphics-4.1.0 depends on shared= library: spectre.1 -
>not found
>===>Verifying ins= tall for spectre.1 in
>/usr/ports/print/libspectre
>===>   l= ibspectre-0.2.0 depends on file:
>/usr/local/bin/libtool - found
>=== =>   libspectre-0.2.0 depends on executable: gs - found
>=== =>   libspectre-0.2.0 depends on shared library: cairo.2 -
>found<= br>===>  Configuring for libspectre-0.2.0
>pkg_info: no pac= kages match pattern(s)
>configure: WARNING: you should use --build, --hos= t, --target
>checking for a BSD-compatible install... /usr/bin/install -c= -o root
>-g wheel
>checking whether build environment is sane... yes
>(= snip)
>checking for gsapi_new_instance in -lgs... no
>configure: error:= You need libgs in order to compile libspectre
>===>  Scrip= t "configure" failed unexpectedly.
>I found on the net that ghostscri= p7 would have libgs. I built and
>installed it
>but the error persists.
>Would any one have any advice for this?
>thanks

Hi Mario,

Yes, two I have:

1) better ask such questions in <[EMAIL PROTECTED]>
2) all my problems with the port x11/kde4 went away after doing (please
   read carefully the man pages before):

# portsnap fetch
# portsnap extract
# portupgrade --batch -a

The 3rd is a long run, depends on what you have installed; but after
this

# cd /usr/ports/x11/kde4
# make install clean BATCH=yes

runs fine

matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <[EMAIL PROTECTED]> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
We should all learn from the peoples of The Netherlands, France and Ireland.
Aprendamos todos de los pueblos de Holanda, Francia e Irlanda.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Problems with make install in kde4

2008-08-22 Thread Mario Lobo

   Hi;
   I think i had a problem with my last e-mail so I'm reposting.
   This all after csup, portsnap, etc...
   The 'make' of /usr/ports/= x11/kd4 went fine.
   When I 'make install', i get this:
   (snip)<= br>===>   kdegraphics-4.1.0 depends on shared library:
   qimage= blitz.4 - found
   ===>   kdegraphics-4.1.0 depends on shared= library: spectre.1 -
   not found
   ===>Verifying ins= tall for spectre.1 in
   /usr/ports/print/libspectre
   ===>   l= ibspectre-0.2.0 depends on file:
   /usr/local/bin/libtool - found
   === =>   libspectre-0.2.0 depends on executable: gs - found
   === =>   libspectre-0.2.0 depends on shared library: cairo.2 -
   found<= br>===>  Configuring for libspectre-0.2.0
   pkg_info: no pac= kages match pattern(s)
   configure: WARNING: you should use --build, --hos= t, --target
   checking for a BSD-compatible install... /usr/bin/install -c= -o root
   -g wheel
   checking whether build environment is sane... yes
   (= snip)
   checking for gsapi_new_instance in -lgs... no
   configure: error:= You need libgs in order to compile libspectre
   ===>  Scrip= t "configure" failed unexpectedly.
   I found on the net that ghostscri= p7 would have libgs. I built and
   installed it
   but the error persists.
   Would any one have any advice for this?
   thanks
   --
   Mario= Lobo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

RE: Is the list getting my e-mails?

2008-08-22 Thread Bob McConnell
The spam filters my employer uses will discard any email arriving with
our domain in the From line. So I cannot see my own mail from any
listserve that keeps the originator's address as the source. There is a
way to fix that, but it exempts the listserve's domain from the filters.
In addition, there are too many people and listserves involved, so it is
not manageable.

Bob McConnell

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gonzalo Nemmi
Sent: Friday, August 22, 2008 12:36 PM
To: freebsd-questions@freebsd.org
Subject: Re: Is the list getting my e-mails?

On Friday 22 August 2008 1:20:22 pm Mario Lobo wrote:
>Hi;
>Forgive for this test.
>Recently I changed my domain to another ISP.
>Since then, I have been unable to post to the lists I'm subscribed
to.
>I created a gmail account, switched to it and nothing. Now I
switched
>back to [EMAIL PROTECTED] and nothing.
>I can get into the management page, I marked to receive my own
posts
>and nothing.
>I get all the posts to all the lists except mine.
>Am i being blocked?
>Could anyone just simply reply this post?
>Thanks,
>Mario Lobo

Don't think so ... I have marked the option to receive my own posts but
I 
never get them .. and if I remember correctly, some else has noticed
that too 
and made a comment about it on this list some time ago ...

As far as your mail goes: they do make their way into the list :)

Regards
-- 
Blessings
Gonzalo Nemmi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Is the list getting my e-mails?

2008-08-22 Thread Gonzalo Nemmi
On Friday 22 August 2008 1:20:22 pm Mario Lobo wrote:
>Hi;
>Forgive for this test.
>Recently I changed my domain to another ISP.
>Since then, I have been unable to post to the lists I'm subscribed to.
>I created a gmail account, switched to it and nothing. Now I switched
>back to [EMAIL PROTECTED] and nothing.
>I can get into the management page, I marked to receive my own posts
>and nothing.
>I get all the posts to all the lists except mine.
>Am i being blocked?
>Could anyone just simply reply this post?
>Thanks,
>Mario Lobo

Don't think so ... I have marked the option to receive my own posts but I 
never get them .. and if I remember correctly, some else has noticed that too 
and made a comment about it on this list some time ago ...

As far as your mail goes: they do make their way into the list :)

Regards
-- 
Blessings
Gonzalo Nemmi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Is the list getting my e-mails?

2008-08-22 Thread Mario Lobo

   Hi;
   Forgive for this test.
   Recently I changed my domain to another ISP.
   Since then, I have been unable to post to the lists I'm subscribed to.
   I created a gmail account, switched to it and nothing. Now I switched
   back to [EMAIL PROTECTED] and nothing.
   I can get into the management page, I marked to receive my own posts
   and nothing.
   I get all the posts to all the lists except mine.
   Am i being blocked?
   Could anyone just simply reply this post?
   Thanks,
   Mario Lobo
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Kernel Panic help.

2008-08-22 Thread Kris Kennaway

Eric Crist wrote:

Hey folks,

First, please 'reply-all' as I'm not on the list.

I've got a backup server that, every night, offloads things to a 
secondary, USB attached hard disk.  We've got two of these disks, which 
we rotate so as to have a fairly recent off-site version, in the event 
of a disaster.  One of the two drives has start to cause the backup 
server to core dump and reboot.  The other works fine.  I tried taking 
the problematic drive and repartitioning and reformatting it, but the 
problems persist.


Here is what I get from a kgdb:

[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC-> sudo kgdb kernel.debug 
/var/crash/vmcore.17
[GDB will not be able to debug user-mode threads: 
/usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
panic: softdep_deallocate_dependencies: dangling deps
cpuid = 0
Uptime: 11d20h37m38s
Physical memory: 1011 MB
Dumping 201 MB: 186 170 154 138 122 106 90 74 58 42 26 10

#0  doadump () at pcpu.h:195
195__asm __volatile("movl %%fs:0,%0" : "=r" (td));


Any insight is appreciated.  uname -a is:

FreeBSD hostname 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #1: Tue Jul 15 
13:53:28 CDT 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386


See the developers handbook for more details on how to report panics 
(you also need the backtrace, and it may help to catch the problem 
earlier if you turn on debugging).


However, this kind of panic can happen if the drive is marginal.  e.g. 
if it loses or corrupts I/O in transit.  Try compiling e.g. the 
/usr/src/tools/regression/fsx tool and running that against the problem 
disk for a few days, or even multiple instances on different files at 
once to really stress it.  It will do lots of I/O to a file and verify 
that the file remains consistent throughout.  It won't touch the whole 
drive though, so if only parts of the disk are bad it won't catch it.


For that you could try generating a large random file on another disk, 
keeping the md5 checksum, then writing lots of copies of it to the bad 
disk to fill or almost fill it, then read back the md5 checksums of each 
to compare.  A small script could run this in a loop.


Yet another option would be to configure the disk as a geli or zfs 
volume, since that will validate checksums with each read and will catch 
data corruption anywhere on the disk.


I'd validate those things before proceeding with the existing panic.

Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tailing logs

2008-08-22 Thread Oliver Fromme
DAve <> wrote:
 > I would love to have a way to tail a log, like piping to grep, except I 
 > see every line and the lines I would normally grep for are highlighted. 
 > That would be cool. Anyone know of a bash command or tool that will do this?
 > 
 > Side note, I am tailing sendmail after changes to my outbound queue 
 > runners. I want to highlight my sm-mta-out lines but still see all lines.

You could use this script:

http://www.secnetix.de/olli/scripts/bold

It's a filter that works like similar to grep, but it
highlights the parts that match your regular expression.
The script contains usage information.

So you can do things like this:

$ tail -f /var/log/maillog | bold -l myhost.mydomain

(The -l option specifies to highlight the whole line,
not just the part that matches.)

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"C++ is over-complicated nonsense. And Bjorn Shoestrap's book
a danger to public health. I tried reading it once, I was in
recovery for months."
-- Cliff Sarginson
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tailing logs

2008-08-22 Thread Steve Bertrand

DAve wrote:
I would love to have a way to tail a log, like piping to grep, except I 
see every line and the lines I would normally grep for are highlighted. 
That would be cool. Anyone know of a bash command or tool that will do 
this?


Side note, I am tailing sendmail after changes to my outbound queue 
runners. I want to highlight my sm-mta-out lines but still see all lines.


A little late to the party now, but the following Perl script will 
'highlight' the lines containing $pattern with a blank line above and 
below, surrounded by . The lines not matching will be printed 
normally. Note, File::Tail must be installed:


#!/usr/bin/perl
# grep.pl

use warnings;
use strict;
use File::Tail;

my $pattern = "submission";
my $log = "/var/log/maillog";
my $ref=tie *FH,"File::Tail",(name=>$log, maxinterval=>3);

while () {

if ($_ =~ /$pattern/) {
chop ($_);
print "\n $_ \n\n";
} else {
print "$_";
}
}


pearl# ./grep.pl

 Aug 22 11:30:45 pearl vpopmail[65893]: vchkpw-submission: 
(CRAM-MD5) login 
 success [EMAIL PROTECTED]:2607_f118__5 


Aug 22 11:31:19 pearl spamd[32860]: spamd: connection from localhost 
[127.0.0.1] 
at port 57092
Aug 22 11:31:19 pearl spamd[32860]: spamd: processing message 
<6e3e383b080822071 
  [EMAIL PROTECTED]> for 
[EMAIL PROTECTED]:58



 Aug 22 11:31:46 pearl vpopmail[66048]: vchkpw-submission: 
(CRAM-MD5) login success [EMAIL PROTECTED]:2607_f118__5 


Aug 22 11:31:56 pearl spamd[95770]: prefork: child states: II

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: rtprio + su - doesn't work

2008-08-22 Thread Wojciech Puchar


I'm not sure what's wrong, but it works fine for me:

# rtprio 31 su -m nobody -c 'id; /usr/sbin/rtprio'
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
rtprio: realtime priority 31
#

This is on 7-stable (a few months old, though).


i have 7 stable too. no idea :)

maybe asterisk have something in it's code that drops that privilege.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tailing logs

2008-08-22 Thread Vincent Hoffman
DAve wrote:
> I would love to have a way to tail a log, like piping to grep, except
> I see every line and the lines I would normally grep for are
> highlighted. That would be cool. Anyone know of a bash command or tool
> that will do this?
>
> Side note, I am tailing sendmail after changes to my outbound queue
> runners. I want to highlight my sm-mta-out lines but still see all lines.
>
> DAve
If you dont mind installing a few perl modules, try textproc/p5-ack
then just tail -f /var/log/LOGNAME | ack --color --passthru STRING



Vince


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Dual booting FreeBSD and Linux using GRUB fails

2008-08-22 Thread Mark Ovens
I have an all-SCSI system with FreeBSD 6.3 on one disk and 7.0 on the 
other. It booted using GRUB and worked OK.


I installed Mandriva Linux on the disk that had 7.0 on it (replacing 7.0)

The setup now is:

SCSI ID 15 73GB /dev/sda - running FreeBSD
SCSI ID 14 36GB /dev/sdb - Mandriva

The device names above are as reported by Mandriva when doing the install.

Mandriva installed OK onto the 36GB HDD and wrote this menu.lst:

Code:
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux 
root=UUID=77a15e0a-b9f5-46ab-8236-886418dbbfd8  resume=/dev/sdb5 
splash=silent vga=788

initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb 
root=UUID=77a15e0a-b9f5-46ab-8236-886418dbbfd8  resume=/dev/sdb5

initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe 
root=UUID=77a15e0a-b9f5-46ab-8236-886418dbbfd8  failsafe

initrd (hd0,0)/boot/initrd.img


Note that it has used hd0 even though the disk is /dev/sdb (which 
implies the second disk).


The problem is that when it boots the Adaptec SCSI BIOS searches for 
bootable drives from the highest SCSI ID downwards. Since the 73GB 
(FreeBSD) disk is id 15 it boots from that. That disk also has GRUB 
installed with an entry for FreeBSD which is also hd0. The FreeBSD entry 
works.


Because the disks are seen by the SCSI BIOS as id 15 first, id 14 
second, id 14 - the disk with Mandriva installed, is hd1 so I copied the 
Mandriva menu.lst file into the one on the FreeBSD partition and edited 
hd0 to hd1 (for both the lernel and initrd lines) but Mandriva won't 
boot, I get


Error 2: Bad File or Directory type

In fact, the FreeBSD GRUB seems unable to read the Linux disk - it knows 
it's there, but can't access anything on it.


I've tried numerous things as suggested on the Mandriva forums but 
nothing works:


grub> root (hd0,0,a)

  Filesystem type is ufs2, partition type is 0xa5

grub> cat /boot/grub/device.map

  (fd0)  /dev/fd0
  (hd0)  /dev/da0
  (hd1)  /dev/da1

grub> root (hd1,0)

  Filesystem type is ext2, partition type is 0x83

grub> cat /boot/grub/device.map

  Error 2: Bad file or directory type

grub> root (hd 
  Possible disks are: hd0 hd1

grub> root (hd1, 
  Possible partitions are:
Partition num: 0, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type is unknown, partition type 0x82
Partition num: 5, Filesystem type is ext2fs, partition type 0x83

grub> root (hd0, 
  Possible partitions are:
Partition num: 0, [BSD sub-partitions immediately follow]
  BSD Partition num: 'a', Filesystem type is ufs2, partition type 0xa5
  BSD Partition num: 'b', Filesystem type is unknown, partition 
type 0xa5

  BSD Partition num: 'd', Filesystem type is ufs2, partition type 0xa5
  BSD Partition num: 'e', Filesystem type is ufs2, partition type 0xa5
  BSD Partition num: 'f', Filesystem type is ufs2, partition type 0xa5

Can anyone suggest how to make this work? The root of the problem is 
that both OSes think their disk is hd0.


Regards,

Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Kernel Panic help.

2008-08-22 Thread Eric Crist

Hey folks,

First, please 'reply-all' as I'm not on the list.

I've got a backup server that, every night, offloads things to a  
secondary, USB attached hard disk.  We've got two of these disks,  
which we rotate so as to have a fairly recent off-site version, in the  
event of a disaster.  One of the two drives has start to cause the  
backup server to core dump and reboot.  The other works fine.  I tried  
taking the problematic drive and repartitioning and reformatting it,  
but the problems persist.


Here is what I get from a kgdb:

[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC-> sudo kgdb kernel.debug / 
var/crash/vmcore.17
[GDB will not be able to debug user-mode threads: /usr/lib/ 
libthread_db.so: Undefined symbol "ps_pglobal_lookup"]

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.

This GDB was configured as "i386-marcel-freebsd".

Unread portion of the kernel message buffer:
panic: softdep_deallocate_dependencies: dangling deps
cpuid = 0
Uptime: 11d20h37m38s
Physical memory: 1011 MB
Dumping 201 MB: 186 170 154 138 122 106 90 74 58 42 26 10

#0  doadump () at pcpu.h:195
195 __asm __volatile("movl %%fs:0,%0" : "=r" (td));


Any insight is appreciated.  uname -a is:

FreeBSD hostname 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #1: Tue Jul 15  
13:53:28 CDT 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tailing logs

2008-08-22 Thread Jon Radel
DAve wrote:
> 
> I would love to have a way to tail a log, like piping to grep, except I
> see every line and the lines I would normally grep for are highlighted.
> That would be cool. Anyone know of a bash command or tool that will do
> this?
> 
> Side note, I am tailing sendmail after changes to my outbound queue
> runners. I want to highlight my sm-mta-out lines but still see all lines.


less 
/string you care about, regex works
F


If you do a search a file in less and then start tailing the file inside
less, it continues to highlight all matches for your last search.  While
I'm sure there are other ways of achieving this, this is the one I use
on a regular basis.

--Jon Radel


smime.p7s
Description: S/MIME Cryptographic Signature


Re: rtprio + su - doesn't work

2008-08-22 Thread Oliver Fromme
Wojciech Puchar <> wrote:
 > /usr/sbin/rtprio 31 /usr/bin/su centrala -c \
 > "/usr/local/bin/asterisk -C /centrala/etc/asterisk.conf"
 > 
 > asterisk is started, but without realtime priority.

I'm not sure what's wrong, but it works fine for me:

# rtprio 31 su -m nobody -c 'id; /usr/sbin/rtprio'
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
rtprio: realtime priority 31
# 

This is on 7-stable (a few months old, though).

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"I have stopped reading Stephen King novels.
Now I just read C code instead."
-- Richard A. O'Keefe
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Tailing logs

2008-08-22 Thread DAve
I would love to have a way to tail a log, like piping to grep, except I 
see every line and the lines I would normally grep for are highlighted. 
That would be cool. Anyone know of a bash command or tool that will do this?


Side note, I am tailing sendmail after changes to my outbound queue 
runners. I want to highlight my sm-mta-out lines but still see all lines.


DAve
--
Don't tell me I'm driving the cart!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Supported External SATA to USB Hard Drive Enclosures

2008-08-22 Thread Doug Poland
Hello,

Can anyone recommend a manufacturer and/or model of external SATA to
USB external hard drive enclosures?  I've not had luck with the
devices I pick up off-the-shelf at my local big-box consumer
electronics stores.

BTW, I'm running FreeBSD i386 7.x.


-- 
Regards,
Doug

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: rtprio + su - doesn't work

2008-08-22 Thread Wojciech Puchar

tu run (at startup) asterisk PBX as user centrala with realtime priority.

asterisk is started, but without realtime priority.


Yes, you'd be running the su process with realtime priority.  :-)


and su forks shell and asterisk - isn't it?




how to do this right?

i run asterisk as user (not root), but this server is used to other things, 
so asterisk must have absolute priority over other things.

now i have to do this manually by searching for asterisk's PID and doing




rtprio 31 -PID


Well, you have to run rtprio as root, or else make it setuid-root (which 
probably isn't a great idea).  Presumably this thing has a startup script 
which runs it, and it probably creates a PID file under /var/run which you 
could use to adjust the priority during system startup via:


rtprio 31 -`cat /var/run/asterix.pid`


did this

/usr/bin/su centrala -c \
"/usr/local/sbin/asterisk -C /centrala/etc/asterisk.conf"
/bin/sleep 5
/usr/sbin/rtprio 31 -`cat /centrala/run/asterisk.pid`


works fine, but looks like workaround for me not proper solution?
am i wrong? thank you for explanation why it doesn't work directly

Wojtek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Unable to access certain sites from FreeBSD 6.2

2008-08-22 Thread alasdair
Thanks Norberto,
Makes sense to do it the other way round.  If I could indulge your generosity
and knowledge, one thing is puzzling me, why do I not have this problem when
I am running Win XP on the same machine (dual boot with FreeBSD) using all
the same hardware. Or when running NetBSD on my desktop machine but with
the same network. Seems strange that FreeBSD, which generally works really
well out of the box, cannot 'just deal' with this problem. I realise that
it is not FreeBSD's problem per se, but a badly configured router somewhere
'out there', just seems that it must be common enough for some part of the
OS to handle it without needing any tweaking. FreeBSD seems great, I am in
the process of migrating from NetBSD so am quite used to configuring as 
necessary,
does FreeBSD 7 encounter this situation?

Regards,

Alasdair


>-- Original Message --
>Date: Fri, 22 Aug 2008 00:19:06 +1000
>From: Norberto Meijome <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Cc: freebsd-questions@freebsd.org
>Subject: Re: Unable to access certain sites from FreeBSD 6.2
>
>
>On Thu, 21 Aug 2008 23:18:26 +1000
>[EMAIL PROTECTED] wrote:
>
>> I realised I am not running ipfw my firewall is run from my Netggear router.
>> So I imagine I would set the divert rule there? (If that is possible).
>> So it would look like this
>>
>> Outside-> Modem -> Router (divert to ) -> tcpmssd on 
>
>i doubt v much u can do that on the netgear... you actually want to push
>traffic the other way around
>
>{your process} -> {your net stack} -> divert tcp/ -> tcpmssd -> original
>destination ...
>
>whether your router will like that, i have no idea. we used to run shdsl
>with the router in bridged mode
>
>B
>
>_
>{Beto|Norberto|Numard} Meijome
>
>He could be a poster child for retroactive birth control.
>
>I speak for myself, not my employer. Contents may be hot. Slippery when
wet.
>Reading disclaimers makes you go blind. Writing them is worse. You have
been
>Warned.
>___
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Upgrading firmware/bios/boot on Areca ARC-1210

2008-08-22 Thread Bob Willcox
I posted this same question on freebsd-scsi a few days ago but got no
response there so I thought I try here.

I want to update the firmware, bios, and boot code in my areca ARC-1210
raid controller and am a bit hesitant to do it for lack of any
experience updating this card. I want to use the areca-cli program to do
this and I see that the areca-cli looks like it supports updating the
firmware (via the "sys updatefw" command), but I don't know if I can use
this to update the bios and boot code as well or not. Can someone help
me out on this? Also, is it ok to do this update while the system is up
and using the card? I think this is the case (I suspect that the update
doesn't really take effect till reboot), but was hoping someone with
experience could comment.

I also read somewhere on the Areca web site that you should update all
three parts (firmware/bios/boot) prior to rebooting as otherwise the
card may fail to operate due to mis-match of the code.

Thanks,
Bob

-- 
Bob Willcox  If you try to please everybody, nobody will like it.
[EMAIL PROTECTED]
Austin, TX
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sed/awk, instead of Perl

2008-08-22 Thread Steve Bertrand

Oliver Fromme wrote:

Walt Pawley wrote:



 > I guess getting old, nearly blind and mind numbing close to
 > brain dead is better than the alternative. Try this (sooner or
 > later I've got to get it right)...
 > 
 > perl -pe 's/(.*?)\.(.*)\t.*/[EMAIL PROTECTED]/' input_file > output_file
 > 



I think your attempts show very well why Steve wanted to
avoid perl.  :-)


LOL...actually, I use Perl for almost everything, but I don't think I've 
ever used it on the command line.


For things that I need to do on a repeated basis where most of the 
variables are consistent, or for automation tasks I always use Perl.



 - tr, sed, awk etc. are part of the FreeBSD base system,
   while perl is not.


This is another reason. I do have a couple of machines that do not have 
Perl installed on them, so when I need to do a quick change to multiple 
entries in a file, I'm quite used to using sed/awk. It had just been a 
while since I've used it to make more than one change per entry (well, 
since my tcpdump file example).


Oliver posted yesterday three examples using sed, awk and tr.

The one that I will stick with and will not have any difficulty 
remembering was this one:


# tr '.\t' '_@' | sed 's/@.*/@example.com/'

I am the most familiar with that one as I use sed on almost an every day 
basis.


I appreciate all of the feedback. There have been some excellent methods 
that have been very wide ranging. As the saying goes, TIMTOWTDI ;)


Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Oliver Fromme
Ivan Voras wrote:
 > Oliver Fromme wrote:
 > > enom-FBSD1 <[EMAIL PROTECTED]> wrote:
 > > > beastie_disable="NO"  had no effect.
 > > 
 > > That's because "NO" is already the default.  Setting it
 > > to "YES" will completely disable the whole boot menu.
 > > 
 > > > All that was needed was loader_logo="beastie"
 > > > which produced beastie in color
 > > > 
 > > > Its good to see my old friend back where he belongs
 > > 
 > > How would you like this one?
 > > 
 > > http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png
 > > 
 > > (It's work in progress.  See the latest FreeBSD Quarterly
 > > Status Report.)
 > 
 > This is very good. I hope there will be less "conservative" variants :)

There are more screen shots in the same directory:

http://www.secnetix.de/olli/FreeBSD/vloader/

I'm sure you'll find one that is sufficiently less
conservative, whatever that means.   ;-)

It is intended that the user (or vendor) will be able
to use his own background image, so you can supply
your own.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"I made up the term 'object-oriented', and I can tell you
I didn't have C++ in mind."
-- Alan Kay, OOPSLA '97
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Ivan Voras
Oliver Fromme wrote:
> enom-FBSD1 <[EMAIL PROTECTED]> wrote:
>  > beastie_disable="NO"  had no effect.
> 
> That's because "NO" is already the default.  Setting it
> to "YES" will completely disable the whole boot menu.
> 
>  > All that was needed was loader_logo="beastie"
>  > which produced beastie in color
>  > 
>  > Its good to see my old friend back where he belongs
> 
> How would you like this one?
> 
> http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png
> 
> (It's work in progress.  See the latest FreeBSD Quarterly
> Status Report.)

This is very good. I hope there will be less "conservative" variants :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: X11 tunnel over ssh and then rsh

2008-08-22 Thread Oliver Fromme
Roberto Nunnari wrote:
 > Wait! I found a possible workaround.. it seams that setting
 > X11UseLocalhost = no
 > on sshd_config tell sshd to bind the X11 forwarding server
 > to the wildcard address..

You will still have to forward the X11 authentication to
the client machine with xauth(1) or xhost(1), I think.
Using xhost(1) is much easier, but it's insecure.  On the
other hand you're using rsh and a public network socket
to connect to, so everything you do is insecure anyway.

I hope you're going to make your users aware of that.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"If Java had true garbage collection, most programs
would delete themselves upon execution."
-- Robert Sewell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Bill Moran
In response to Oliver Fromme <[EMAIL PROTECTED]>:
> 
> How would you like this one?
> 
> http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png
> 
> (It's work in progress.  See the latest FreeBSD Quarterly
> Status Report.)

Oooohh ... spiffy!

-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread Oliver Fromme
enom-FBSD1 <[EMAIL PROTECTED]> wrote:
 > beastie_disable="NO"  had no effect.

That's because "NO" is already the default.  Setting it
to "YES" will completely disable the whole boot menu.

 > All that was needed was loader_logo="beastie"
 > which produced beastie in color
 > 
 > Its good to see my old friend back where he belongs

How would you like this one?

http://www.secnetix.de/olli/FreeBSD/vloader/screenshot5.png

(It's work in progress.  See the latest FreeBSD Quarterly
Status Report.)

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"[...]  one observation we can make here is that Python makes
an excellent pseudocoding language, with the wonderful attribute
that it can actually be executed."  --  Bruce Eckel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: X11 tunnel over ssh and then rsh

2008-08-22 Thread Nikos Vassiliadis
On Friday 22 August 2008 13:10:29 Roberto Nunnari wrote:
> >> Automatically? No.
> >> You can however use ssh to create generic TCP tunnels, using
> >> -R and -L. But this is much more complicated than remembering
> >> a DISPLAY variable.
>
> Wait! I found a possible workaround.. it seams that setting
> X11UseLocalhost = no
> on sshd_config tell sshd to bind the X11 forwarding server
> to the wildcard address..

Aha that seems to do the job.

Oddly enough OpenSSH supports selffootshooting :)
Didn't expect it to...

Cheers, Nikos
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


sysinstall install.cfg question

2008-08-22 Thread Matias Surdi

Hi,

I'm trying to figure out how could I tell sysinstall to let the user 
choose the disk he want to install into and then, based on that 
response, create automatically without any other question the 
partitions/labels that are required.


I've seen several examples but I can't find the way to do it.I've also 
noticed that the manpage isn't complete, as there are many variables 
defined in sysinstall.h that are not documented there.



Thanks for any help.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: X11 tunnel over ssh and then rsh

2008-08-22 Thread Nikos Vassiliadis
On Friday 22 August 2008 12:58:24 Roberto Nunnari wrote:
> Humm.. it's a pity that ssh -Y or -X will only listen on the
> loopback interface, but for sure there are good reasons it
> is done that way.

I guess -X achieves a particular goal, that is being
able to login to a remote box, run X11 apps and make
them use your local X11 display. Everything else is
beyond its scope...

You can however use your favorite NAT to translate
requests for, let's say:
192.168.0.1:6000 to 127.0.0.1:6000

and have the 127.0.0.1 bound socket exposed to the
network...

Nikos
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: turn on beastie beside the 'Welcome to FreeBSD' boot optionsmenu

2008-08-22 Thread enom-FBSD1
beastie_disable="NO"  had no effect.

All that was needed was loader_logo="beastie"   which produced beastie 
in
color

Its good to see my old friend back where he belongs

Thanks for your help.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Michael Powell
Sent: Friday, August 22, 2008 5:16 PM
To: freebsd-questions@freebsd.org
Subject: Re: turn on beastie beside the 'Welcome to FreeBSD' boot
optionsmenu

enom-FBSD1 wrote:

> Is there a way to reactivate the black and white beastie which used to
> display to the right of the   'Welcome to FreeBSD' boot options menu?
>

Look at /boot/defaults/loader.conf for the following:

#beastie_disable="NO"   # Turn the beastie boot menu on and off
#loader_logo="fbsdbw"   # Desired logo: fbsdbw, beastiebw, beastie,
none

As always, put your overrides in /boot/loader.conf and leave the defaults
alone.

-Mike



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: X11 tunnel over ssh and then rsh

2008-08-22 Thread Roberto Nunnari

Roberto Nunnari wrote:

Hello Nikos.

Thank you for your reply.
See my comments below.


Nikos Vassiliadis wrote:

On Thursday 21 August 2008 09:54:29 Roberto Nunnari wrote:

Anybody on this, please?

Roberto Nunnari wrote:

Hello list.

I have this scenario

1) host A with X server
2) host B with ssh server but without X server
3) host C with rsh server and X client programs but without X server
(on host C there's also an ssh server, but in our case, users
have to use rsh)


Why rsh? Isn't ssh a drop-in replacement for rsh?


The reason for using rsh instead of ssh is that
it's a computing cluster. Host B is the master node
and access point to the cluster, and host C is any
one of the computing nodes. The cluster resources are
managed by the Sun Grid Engine (SGE) and so users
obtain the computing resources using the SGE interface.
SGE under the cover uses rsh. I could search and see if it would
possible to configure SGE so that it uses ssh instead of rsh,
but then, you should take in accounting the cpu overhead of
using ssh (encryption/decryption), so unnecessarily using cpu
time, as the cluster is all in a private network.





now, I need to connect from host A to host B with:
A$ ssh -Y B (-Y or -X, to create a X tunnel)
and then from host B to host C with:
B$ rsh C
and on host C I need to run an X client like:
C$ xterm

Now, I would like the users not to have to set the
DISPLAY env var on host C, as they tend to forget
and also some user's X server don't accept plain
X connections..

Is there a way that I could configure host B to somehow
expose to host C the X tunnel to host A?


Automatically? No.
You can however use ssh to create generic TCP tunnels, using
-R and -L. But this is much more complicated than remembering
a DISPLAY variable.


Wait! I found a possible workaround.. it seams that setting
X11UseLocalhost = no
on sshd_config tell sshd to bind the X11 forwarding server
to the wildcard address..




Right. Also, it requires users to specify a port on host B,
and then the chosen port could already be taken, so returning
an error..
Too much hassle..




From host B I have access to the users' homes on host C and I could
place there some script to set the DISPLAY env var on user
login.

B$ echo $DISPLAY
on host B gives back something like localhost:16.0,
but if on host C I enter:
C$ export DISPLAY=B:16.0
C$ xterm
it doesn't work.. probably host C doesn't expose a
network socket but maybe a unix socket for the X tunnel..


This is probably because the listener (which proxies X11 to
host A) is bound to localhost(127.0.0.1) and not B(12.23.34.45).
You can overcome this, using manual forwarding(-R & -L).

HOST_A# ssh -R '*:6010:127.0.0.1:6000' HOST_B  # create a listener
on HOST_B listening on all interfaces and TCP port 6010
and tunnel everything from there to HOST_A's 127.0.0.1 6000


This is a possible solution, but as stated above, it requires the
user to specify the port number (6010 in the example above)..
Also, it requires GatewayPorts = yes in sshd_config..

Humm.. it's a pity that ssh -Y or -X will only listen on the
loopback interface, but for sure there are good reasons it
is done that way.

Thank you again and best regards.
Robi



Then every host which can connect to HOST_B can connect to HOST_A
X11 server. Using generic TCP port forwarding through ssh to forward
X11 has an other minus. You have to handle yourself the X11 
authorization(xauth, XAUTHORITY and friends)


You can of course use a second ssh session from HOST_B to HOST_C
to expose HOST_B's 127.0.0.1:6010 to HOST_C's 127.0.0.1:6010.
So, connecting from HOST_C to 127.0.0.1:6010 will be tunneled
to HOST_B's 127.0.0.1:6010, which will be tunneled to HOST_A's
127.0.0.1:6000 were your X11 display lives.

It's rather complicated, though...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
"[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: X11 tunnel over ssh and then rsh

2008-08-22 Thread Roberto Nunnari

Hello Nikos.

Thank you for your reply.
See my comments below.


Nikos Vassiliadis wrote:

On Thursday 21 August 2008 09:54:29 Roberto Nunnari wrote:

Anybody on this, please?

Roberto Nunnari wrote:

Hello list.

I have this scenario

1) host A with X server
2) host B with ssh server but without X server
3) host C with rsh server and X client programs but without X server
(on host C there's also an ssh server, but in our case, users
have to use rsh)


Why rsh? Isn't ssh a drop-in replacement for rsh?


The reason for using rsh instead of ssh is that
it's a computing cluster. Host B is the master node
and access point to the cluster, and host C is any
one of the computing nodes. The cluster resources are
managed by the Sun Grid Engine (SGE) and so users
obtain the computing resources using the SGE interface.
SGE under the cover uses rsh. I could search and see if it would
possible to configure SGE so that it uses ssh instead of rsh,
but then, you should take in accounting the cpu overhead of
using ssh (encryption/decryption), so unnecessarily using cpu
time, as the cluster is all in a private network.





now, I need to connect from host A to host B with:
A$ ssh -Y B (-Y or -X, to create a X tunnel)
and then from host B to host C with:
B$ rsh C
and on host C I need to run an X client like:
C$ xterm

Now, I would like the users not to have to set the
DISPLAY env var on host C, as they tend to forget
and also some user's X server don't accept plain
X connections..

Is there a way that I could configure host B to somehow
expose to host C the X tunnel to host A?


Automatically? No.
You can however use ssh to create generic TCP tunnels, using
-R and -L. But this is much more complicated than remembering
a DISPLAY variable.


Right. Also, it requires users to specify a port on host B,
and then the chosen port could already be taken, so returning
an error..
Too much hassle..



From host 
B I have access to the users' homes on host C and I could

place there some script to set the DISPLAY env var on user
login.

B$ echo $DISPLAY
on host B gives back something like localhost:16.0,
but if on host C I enter:
C$ export DISPLAY=B:16.0
C$ xterm
it doesn't work.. probably host C doesn't expose a
network socket but maybe a unix socket for the X tunnel..


This is probably because the listener (which proxies X11 to
host A) is bound to localhost(127.0.0.1) and not B(12.23.34.45).
You can overcome this, using manual forwarding(-R & -L).

HOST_A# ssh -R '*:6010:127.0.0.1:6000' HOST_B  # create a listener
on HOST_B listening on all interfaces and TCP port 6010
and tunnel everything from there to HOST_A's 127.0.0.1 6000


This is a possible solution, but as stated above, it requires the
user to specify the port number (6010 in the example above)..
Also, it requires GatewayPorts = yes in sshd_config..

Humm.. it's a pity that ssh -Y or -X will only listen on the
loopback interface, but for sure there are good reasons it
is done that way.

Thank you again and best regards.
Robi



Then every host which can connect to HOST_B can connect to HOST_A
X11 server. Using generic TCP port forwarding through ssh to forward
X11 has an other minus. You have to handle yourself the X11 
authorization(xauth, XAUTHORITY and friends)


You can of course use a second ssh session from HOST_B to HOST_C
to expose HOST_B's 127.0.0.1:6010 to HOST_C's 127.0.0.1:6010.
So, connecting from HOST_C to 127.0.0.1:6010 will be tunneled
to HOST_B's 127.0.0.1:6010, which will be tunneled to HOST_A's
127.0.0.1:6000 were your X11 display lives.

It's rather complicated, though...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot options menu

2008-08-22 Thread Tom Van Looy
see man loader.conf

Kind regards,

Tom


>- Oorspronkelijk bericht -
>Van: enom-FBSD1 [mailto:[EMAIL PROTECTED]
>Verzonden: vrijdag, augustus 22, 2008 10:44 AM
>Aan: [EMAIL PROTECTED] ORG
>Onderwerp: turn on beastie beside the 'Welcome to FreeBSD' boot options menu
>
>Is there a way to reactivate the black and white beastie which used to
>display to the right of the   'Welcome to FreeBSD' boot options menu?
>
>___
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>
>
>


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot options menu

2008-08-22 Thread Michael Powell
enom-FBSD1 wrote:

> Is there a way to reactivate the black and white beastie which used to
> display to the right of the   'Welcome to FreeBSD' boot options menu?
> 

Look at /boot/defaults/loader.conf for the following:

#beastie_disable="NO"   # Turn the beastie boot menu on and off
#loader_logo="fbsdbw"   # Desired logo: fbsdbw, beastiebw, beastie, none

As always, put your overrides in /boot/loader.conf and leave the defaults
alone.

-Mike



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot options menu

2008-08-22 Thread Vincent Hoffman
enom-FBSD1 wrote:
> Is there a way to reactivate the black and white beastie which used to
> display to the right of the   'Welcome to FreeBSD' boot options menu?
>
>   
Yes add
beastie_disable="NO"
in /boot/loader.conf


> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>   

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: turn on beastie beside the 'Welcome to FreeBSD' boot options menu

2008-08-22 Thread Manolis Kiagias

enom-FBSD1 wrote:

Is there a way to reactivate the black and white beastie which used to
display to the right of the   'Welcome to FreeBSD' boot options menu?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

  

Even a colored one, if you would like! Just add

loader_logo="beastie" to /boot/loader.conf

There are other options too, /boot/defaults/loader.conf lists:

#loader_logo="fbsdbw"   # Desired logo: fbsdbw, beastiebw, 
beastie, none


beastiebw is the black/white one.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


turn on beastie beside the 'Welcome to FreeBSD' boot options menu

2008-08-22 Thread enom-FBSD1
Is there a way to reactivate the black and white beastie which used to
display to the right of the   'Welcome to FreeBSD' boot options menu?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Again: fsck_ffs memory requirements

2008-08-22 Thread Oliver Fromme
Polytropon <[EMAIL PROTECTED]> wrote:
 > Allthough fsck_ffs 5 does seem to be able to calloc() the needed
 > memory, it fails with the same message as fsck_ffs 7:
 > 
 > fsck_ffs: bad inode number 306176 to nextinode
 > 
 > Don't know what to do next. I may gather all information I
 > have, write al little "story" and bring this topic up here
 > next week. Maybe someone has better ideas than me.

Unfortunately fsck isn't able to cope with any arbitrary
level of damage.  If certain kinds of unexpected problems
occur, it throws in the towel.  In theory it might be
possible to deal with your particular problem, but nobody
has implemented it in fsck yet.

Someone with intimate knowledge of UFS2 might be able to
help you, possibly using fsdb(8), but this requires direct
access to the file system image and is beyond what can be
done through a mailing list.  Usually such services cost
money.  (The price to pay for not having backups.)

You might also have success using one of the various
recovery or forensic toolkits out there, e.g. sleuthkit
(it's in ports).

 > > PS:  Better make good backups next time.
 > 
 > More precise: Better make _at least any_ backups. :-) More than
 > 5 years without any (!) problem with FreeBSD and now this stupid
 > problem... :-(

Well, there's nothing an OS can do against hardware failure
(such as a crash because of power loss).  Such failures can
cause arbitrary damage to mass storage, especially if the
power failure happens in the middle of writing a track, and
especially when using "consumer grade" disks.

Disks are cheap these days.  Cheaper than your valuable
data.  So, a simple way to make backups is to buy an
external disk (USB2, Firewire/IEEE1394, eSATA, or even
a hot-swappable PATA drive tray), sync your system to it
once per week, and store it in a safe place.

If you're paranoid, then use two such disks alternating,
so you have one good (safe, i.e. disconnected) copy at
every point in time.  If you're even more paranoid, store
multiple backup disks in different places (e.g. one at
home at one at your office, or at a friend's place, or
even in a safe deposit box at your bank company), so you
still have a good backup if your house burns down or an
alien space ship crashes on it.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

Python is executable pseudocode.  Perl is executable line noise.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: sed/awk, instead of Perl

2008-08-22 Thread Oliver Fromme
Walt Pawley wrote:
 > Walt Pawley wrote:
 > > Walt Pawley wrote:
 > > > Steve Bertrand wrote:
 > > > > - read email addresses from a file in the format:
 > > > > 
 > > > > user.name TAB domain.tld
 > > > > 
 > > > > - convert it to:
 > > > > 
 > > > > [EMAIL PROTECTED]
 > > > > 
 > > > > - write it back to either a new file, the original file, or to STDOUT
 > > > 
 > > > I'm curious why Perl isn't a decent choice. I think I'd do something like
 > > > 
 > > > perl -pe 's/(.*?)\.(.*)\t.*/[EMAIL PROTECTED]/' input_file > output_file
 > > 
 > > Which is also wrong. It gets a bit closer to Steve's desires I
 > > suspect if one adds the appropriate backslash ...
 > > 
 > > perl -pe 's/(.*?)\.(.*)\t.*/[EMAIL PROTECTED]/' input_file > output_file
 > > 
 > > Sorry...
 > 
 > I guess getting old, nearly blind and mind numbing close to
 > brain dead is better than the alternative. Try this (sooner or
 > later I've got to get it right)...
 > 
 > perl -pe 's/(.*?)\.(.*)\t.*/[EMAIL PROTECTED]/' input_file > output_file
 > 
 > Sorrier.

I think your attempts show very well why Steve wanted to
avoid perl.  :-)

But seriously, a few other reasons might include:

 - tr, sed, awk etc. are part of the FreeBSD base system,
   while perl is not.

 - The perl command you wrote above is pretty much a sed
   command anyway (except you incorrectly used non-portable
   regular expression syntax).  Why use perl to execute a
   sed command?

 - It is generally advisable to use the smallest, most
   light-weight tool that gets thew job done.  In this case
   that's clearly not perl:

   Size of sed:  27 KB.
   Size of perl + libperl:  1126 KB

   Thats more than 40 times bigger.

Of course, YMMV.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"It combines all the worst aspects of C and Lisp:  a billion different
sublanguages in one monolithic executable.  It combines the power of C
with the readability of PostScript."
-- Jamie Zawinski, when asked: "What's wrong with perl?"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: /etc/groups gone

2008-08-22 Thread DA Forsyth
On 22 Aug 2008 , [EMAIL PROTECTED] entreated 
about
 "freebsd-questions Digest, Vol 229, Issue 13":

> Hi,
> 
> Yesterday night at 1 a.m. I have managed to remove /etc/groups (rm instead of
> vi, was already sleepying). Luckily only a few groups (2-3) was created
> earlier. No backup, "of course".

you want to do
man rcs
and start using RCS to track changes to your important system files.
That way, if you delete one you can just check it out of the RCS 
store.  'backups with history'


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"