Re: for awk experts only.

2008-11-29 Thread Gary Kline
On Sun, Nov 30, 2008 at 08:07:21AM +0100, Polytropon wrote:
> On Sat, 29 Nov 2008 22:52:10 -0800, Gary Kline <[EMAIL PROTECTED]> wrote:
> > What you have above prints:
> > 
> > foot 1  // noun
> > foot 0  // verb
> >
> > so doesn't work entirely, but is a good start. 
> 
> I'm so stupid. gsub() does not return the result of the
> substitution (as, for example, sprintf() would return the
> string), but the success of the substitution, 1 or 0.
> 
> 
> 
> > (BTW, man gsub turned up
> > nothing, so I'm assuming thhat gsub it part of awk.
> 
> Yes, gsub is listed in "man awk" because it's a function from
> within awk.
> 
> I've just pkg_add'ed -r WordNet and tried:
> 
>   % wn foot -over | awk '/Overview/ { printf("%s %s\n", $4, ($3 == 
> "noun") ? "n." : ""); }'
>   foot n.
>   foot
> 
> Of couse, this handles only "noun". If you want to abbreviate
> other kinds of words (e. g. "verb" -> "v.", "adverb" -> "adv.",
> "adjective" -> "adj."), it would be better to implement a short
> awk script as a "wrapper" for the wn command. If you're only
> interested in the first result mentioned, you could test NR == 1.
> 
>   % wn foot -over | awk '/Overview/ && (NR == 2) { printf("%s %s\n", $4, 
> ($3 == "noun") ? "n." : ""); }'
>   foot n.
> 

Yeah, "noun" -> "n.", "verb" -> "v.", "adj." -> "a."  "adv" is all 
right.
Benn awhile since I wrote an awk script... but now's the time.

thanks much,

gary


> 
> 
> -- 
> Polytropon
> From Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  [EMAIL PROTECTED]  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org


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


Re: Temporarily blocking ports

2008-11-29 Thread Manolis Kiagias
Chris wrote:
>
> On Nov 29, 2008, at 1:11 PM, Jos Chrispijn wrote:
>
>>
>> From your reply on my message of 29-11-2008 21:47:
>>> An even tighter practice is to turn off all password logins and
>>> use only keyed connections. This is easier than it might seem
>>> though I'll admit I think of ssh as something only a select
>>> number of users may use and thus you know them by name
>>> and what IPs they are permitted to connect on.
>> I have been thinking of that as well, but don't think I should use
>> that yet with the knowledge I have on this.
>> Do you refer to manual of automatic key connections?
>>
> It's extremely easy.
>
> Generate your key and spread it to all systems you want
> to connect to. Have other users generate their key and do the
> same. After everyone is set, turn off password access in
> /etc/ssh/sshd_config, that file contains the docs in comments
> on how to do this. You change three parameters. Then sshd
> will need to be restarted. Be sure logins by key work first.
>
> This implies how to set up your keys. This was lifted from
> a helpful page on the net and modified but is pretty basic.
> Creates the keys in home directory of myuserid on system
> www.example.com, then moving the key to a second system
> called other.example.com such that myuserid can move
> between systems. The userid on the remote does not need
> to be the same string as on the local system though it's shown
> that way here.
>
> www$ cd # get to your home directory
> www$ ssh-keygen -t rsa
> Generating public/private rsa key pair.
> Enter file in which to save the key (/home/myuserid/.ssh/id_rsa):
> Enter passphrase (empty for no passphrase):
> Enter same passphrase again:
> Your identification has been saved in /home/myuserid/.ssh/id_rsa.
> Your public key has been saved in /home/myuserid/.ssh/id_rsa.pub.
> The key fingerprint is:
>  [EMAIL PROTECTED]
> www$ ssh [EMAIL PROTECTED] mkdir -p .ssh
> Password: 
> www$ cat .ssh/id_rsa.pub|ssh [EMAIL PROTECTED] 'cat >>
> .ssh/authorized_keys'
> Password:
>
> You are done setting up keys. Sample use of seamless login:
>
> www$ ssh other.example.com
> other$ host
> other.example.com
> other$ users
> myuserid  ttyp0Jul 14 05:28 (www.example.com)
> other$ exit
> www$
>
> I only use this on FreeBSD and OS-X. No idea on Putty and others.
>

Can be used on Putty too. There are some small helper programs you can
download along with Putty:

- Puttygen: This will convert your key to a format that can be used by putty
- Pageant: This works like  "ssh-agent". You simply supply the key, and
it is automatically used in your Putty connections

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


Re: for awk experts only.

2008-11-29 Thread Polytropon
On Sat, 29 Nov 2008 22:52:10 -0800, Gary Kline <[EMAIL PROTECTED]> wrote:
>   What you have above prints:
> 
>   foot 1  // noun
>   foot 0  // verb
>
>   so doesn't work entirely, but is a good start. 

I'm so stupid. gsub() does not return the result of the
substitution (as, for example, sprintf() would return the
string), but the success of the substitution, 1 or 0.



> (BTW, man gsub turned up
>   nothing, so I'm assuming thhat gsub it part of awk.

Yes, gsub is listed in "man awk" because it's a function from
within awk.

I've just pkg_add'ed -r WordNet and tried:

% wn foot -over | awk '/Overview/ { printf("%s %s\n", $4, ($3 == 
"noun") ? "n." : ""); }'
foot n.
foot

Of couse, this handles only "noun". If you want to abbreviate
other kinds of words (e. g. "verb" -> "v.", "adverb" -> "adv.",
"adjective" -> "adj."), it would be better to implement a short
awk script as a "wrapper" for the wn command. If you're only
interested in the first result mentioned, you could test NR == 1.

% wn foot -over | awk '/Overview/ && (NR == 2) { printf("%s %s\n", $4, 
($3 == "noun") ? "n." : ""); }'
foot n.



-- 
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: for awk experts only.

2008-11-29 Thread Gary Kline
On Sun, Nov 30, 2008 at 06:17:31AM +0100, Polytropon wrote:
> Replying to my own message: I found a point for improvement.
> Why use grep when awk can grep by itself?
> 
> % wn foot -over | awk '/Overview/ { printf("%s %s\n", $4, gsub("noun", "n.", 
> $3)); }'
> 
> Ah, much better. :-)
> 

Thanks for the clue[s], :)

$3 isn't only an lvalue, it's a constant.  My bad in my first try.  
What you have above prints:

foot 1  // noun
foot 0  // verb

so doesn't work entirely, but is a good start.  (BTW, man gsub turned up
nothing, so I'm assuming thhat gsub it part of awk.  And [gn]awk.)
Um, no, same with nawk, gawk, awk.

gary


> 
> -- 
> Polytropon
> From Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  [EMAIL PROTECTED]  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org


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


Pasting via ssh causes data loss

2008-11-29 Thread Eugene Pimenov

Hello everyone,

I'm not really sure weither it's related to freebsd or ssh.

When I paste a lot of data (6060 bytes, 60 lines 100 bytes each +  
‘\n’) via ssh into `cat > test.txt` or the small program, one freebsd  
receives 5181, another receives 3221 bytes.


The number of bytes freebsd receives are always the same.

I can't reproduce this on linux (OpenSSH 4.3p2 on debian and OpenSSH  
4.7p1 on 2 gentoo boxes). Also, I have one freebsd box without this  
problem (7.0-STABLE, openssh 4.5p1).


Source of the small program:

  #include 

  int main()
  {
  char buf[1];
  size_t readed = 0;
  while(!feof(stdin)) {
  readed+=fread(buf, 1, sizeof(buf), stdin);
  }

  printf("I've received %d bytes\n", readed);
  return 0;
  }

Versions of sshd are “OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.8e  
23 Feb 2007”. FreeBSD versions are FreeBSD 7.0-BETA4 and FreeBSD 7.0- 
RELEASE.


Why is it happening? What should I do to stop this? It's pretty  
annoying.


~


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


Re: FreeBSD 4.8: can't load kernel after doing "cp -R /" to another disk

2008-11-29 Thread admin


Hello, everyone. This is the problem: our SCSI disk with FreeBSD 4.8
on it has been failing recently, so I copied its root partition to a
fresh IDE disk with cp -pR and 


You should use dump and restore to copy the root partition, see:


I'd done that before trying cp -pR, as outlined by rse@:

dump -L -0 -f- /old | (cd /new && restore -r -v -f-)
http://people.freebsd.org/~rse/mirror/

which isn't too different. I think I know what the problem is: I made 
the new single slice and FreeBSD partition on it and ran newfs -U on it 
using the latest FreeBSD 5.x livecd toolkit, and later 4.8 can't even 
mount that partition (mount /dev/ad0s1a /mnt) failing with "incorrect 
superblock", so I think its /boot/loader can't load the kernel because 
of FS issues (but strangely enough pressing "?" at the boot loader 
prompt lists directory entries of the root FS just fine). It turns out 
UFS isn't upwards compatible from releases 4.8 -> 5.5. I'll try running 
newfs -U from 4.8. Last time I checked many 4.8 binaries couldn't run 
due to disk errors, I hope newfs runs ok...

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


Re: for awk experts only.

2008-11-29 Thread Polytropon
Replying to my own message: I found a point for improvement.
Why use grep when awk can grep by itself?

% wn foot -over | awk '/Overview/ { printf("%s %s\n", $4, gsub("noun", "n.", 
$3)); }'

Ah, much better. :-)


-- 
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: for awk experts only.

2008-11-29 Thread Polytropon
Good morning!

On Sat, 29 Nov 2008 20:59:51 -0800, Gary Kline <[EMAIL PROTECTED]> wrote:
>   wordnet/wn prints the string "noun" out whereas I'd rather it simply
>   printed "n."  Is there a way of making this substitution using awk?
>   (I've never used awk except as a cmdline filter.)
> 
>   The following fails:
> 
> wn foot -over |grep Overview |awk
> {if(!strcmp($3,"noun"))$3="n."; '{printf("%s %s\n", $4, $3);}}'

Of course. You cannot have $3 as a lvalue (read: You cannot
change its value).



>   If there are any shortcuts, please clue me in!

Don't make it more complicated than it is. :-)

% wn foot -over | grep "Overview" | awk \
'{ printf("%s %s\n", $4, gsub("noun", "n.", $3)); }'

And the more I think about it, the more I believe there are
much easier ways to do this. But I'm sure the magic of how it
works just opened up to you.



Sidenote: I wouldn't consider myself as an AWK expert allthough I
did abuse AWK lately to implement a stastistical evaluation program
for blood sugar data into a PDF file with diagrams a CVS file,
involving gnuplot and \LaTeX{}. =^_^=



-- 
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]"


for awk experts only.

2008-11-29 Thread Gary Kline

wordnet/wn prints the string "noun" out whereas I'd rather it simply
printed "n."  Is there a way of making this substitution using awk?
(I've never used awk except as a cmdline filter.)

The following fails:

wn foot -over |grep Overview |awk
{if(!strcmp($3,"noun"))$3="n."; '{printf("%s %s\n", $4, $3);}}'

If there are any shortcuts, please clue me in!


-- 
 Gary Kline  [EMAIL PROTECTED]  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org


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


Re: Temporarily blocking ports

2008-11-29 Thread andrew clarke
On Sat 2008-11-29 20:39:47 UTC+0100, Jos Chrispijn ([EMAIL PROTECTED]) wrote:

> Can someone hint me how I can block ports for let's say 30 minutes if  
> someone repeatedly tries to do a SSH login?
> I use ipfw as firewall...

security/sshguard-ipfw works well for me.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Anybody familiar with "publib"??

2008-11-29 Thread Gary Kline
On Sat, Nov 29, 2008 at 07:04:51PM -0600, Dan Nelson wrote:
> In the last episode (Nov 29), Gary Kline said:
> > I found a neat function in publib that should do what I want, but
> > adding either
> > 
> > #imclude   // as per man publib
> > 
> > OR
> > 
> > #include "/usr/local/include/publib.h"
> > 
> > fails.  Yes, I am adding "-lpub" to the enc of gcc.  Still bombs. 
> > Anybody know why?  Prev'ly when I've used the publib functions, I've
> > had to move/copy a slew of them into my private build.  Be nice if
> > this just-worked!
> 
> Try adding "-I /usr/local/include" to your compile line, and 
> "-L /usr/local/lib" to your link line.  Also, providing the error
> message instead of just saying "it fails" is helpful.


Yes; it took just what you [and Andrew Brampson] suggested.  The error
were a screen full of lines like:


/usr/local/include/publib.h:6:26: error: publib/alloc.h: No such file or
directory
/usr/local/include/publib.h:7:27: error: publib/base64.h: No such file 
or
directory
/usr/local/include/publib.h:8:27: error: publib/bitarr.h: No such file 
or
directory
/usr/local/include/publib.h:9:24: error: publib/cmp.h: No such file or
directory
/usr/local/include/publib.h:10:29: error: publib/errormsg.h: No such 
file
or directory


If I had ported publib, I would've stuck publib.h in /usr/include.  
Then 
Wirzenius' man page would have been correct, well, modulo the 
-L /usr/local/lib -lpub linkage.  But this is frowned upon in FreeBSD
land.  
> 
> -- 
>   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]"

-- 
 Gary Kline  [EMAIL PROTECTED]  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org


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


Re: shell scripting problems

2008-11-29 Thread Tim Judd
This seems to be the ticket.  I'll be watching it but now I have an example
on how to dual-quote a string.

Thanks very much, Perry

On Sat, Nov 29, 2008 at 1:37 AM, <[EMAIL PROTECTED]> wrote:

> > In the shell script, i have a
> >   pkg_info -qLx "^$PKG-[0-9,._]+$"
> > also tried (-X)tended regex instead of the standard rege(-x).
> >
> > sh keeps erroring out saying various $" isn't a valid variable
> > name ...
>
> Both sh and csh will try to treat $ inside of "" as a variable
> reference.  Does it work any better if you enclose the $ in ''
> instead?
>
> If you need the first $ to be a variable reference and the second
> to be used literally, you may need to do something like
>
>  "^$PKG-[0-9,._]+"'$'
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Anybody familiar with "publib"??

2008-11-29 Thread Dan Nelson
In the last episode (Nov 29), Gary Kline said:
> I found a neat function in publib that should do what I want, but
> adding either
> 
> #imclude   // as per man publib
> 
> OR
> 
> #include "/usr/local/include/publib.h"
> 
> fails.  Yes, I am adding "-lpub" to the enc of gcc.  Still bombs. 
> Anybody know why?  Prev'ly when I've used the publib functions, I've
> had to move/copy a slew of them into my private build.  Be nice if
> this just-worked!

Try adding "-I /usr/local/include" to your compile line, and 
"-L /usr/local/lib" to your link line.  Also, providing the error
message instead of just saying "it fails" is helpful.

-- 
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]"


The FreeBSD Diary: 2008-11-09 - 2008-11-29

2008-11-29 Thread Dan Langille
The FreeBSD Diary contains a large number of practical 
examples and how-to guides.  This message is posted weekly
to freebsd-questions@freebsd.org with the aim of letting people
know what's available on the website.  Before you post a question
here it might be a good idea to first search the mailing list 
archives  
and/or The FreeBSD Diary . 

These are the articles posted during this period:

29-Nov : OpenVPN - creating a routed VPN
 If you have multiple VPN clients, this is a practical solution. 
 http://freebsddiary.org/openvpn-routed.php?2

27-Nov : OpenVPN - getting it running
 Using OpenVPN to create a secure pathway between home and office 
 http://freebsddiary.org/openvpn.php?2

27-Nov : Creating your own Certificate Authority
 How to create a CA and generate your own SSL certificates
 http://freebsddiary.org/openvpn-easy-rsa.php?2


-- 
Dan Langille
BSDCan - http://www.BSDCan.org/ - BSD Conference

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


Re: FreeBSD 4.8: can't load kernel after doing "cp -R /" to another disk

2008-11-29 Thread Glen Barber
On Sat, Nov 29, 2008 at 11:37 AM, admin <[EMAIL PROTECTED]> wrote:
>
> Hello, everyone. This is the problem: our SCSI disk with FreeBSD 4.8 on it
> has been failing recently, so I copied its root partition to a fresh IDE
> disk with cp -pR and tried to boot from that. Unfortunately, loader gives me
> this:
> can't load 'kernel'
> can't load 'kernel.old'
> and offers prompt.
> I tried almost any combination of the loader command (like
> 0:ad0(0,a)/boot/loader) but still the same. The kernels are right there:
> /kernel and /kernel.old. Can't the root partition be copied this way? Should
> their location on disk be hardcoded somewhere? Please help me with
> bootblocks etc. as I'm desperately running out of time.


Short of using dump/restore, you should append the -p flag to `cp',
because it preserves permissions.  Follow the advice posted by RW,
however.


-- 
Glen Barber


"If you have any trouble sounding condescending, find a Unix user to
show you how it's done."
 --Scott Adams
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Anybody familiar with "publib"??

2008-11-29 Thread Gary Kline

People,

I found a neat function in publib that should do what I want, but adding either

#imclude   // as per man publib

OR

#include "/usr/local/include/publib.h"

fails.  Yes, I am adding "-lpub" to the enc of gcc.  Still bombs.  Anybody know
why?  Prev'ly when I've used the publib functions, I've had to move/copy a slew
of them into my private build.  Be nice if this just-worked!

thanks for any insights,

gary


-- 
 Gary Kline  [EMAIL PROTECTED]  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org


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


Re: FreeBSD 4.8: can't load kernel after doing "cp -R /" to another disk

2008-11-29 Thread RW
On Sat, 29 Nov 2008 20:37:09 +0400
"admin" <[EMAIL PROTECTED]> wrote:

> 
> Hello, everyone. This is the problem: our SCSI disk with FreeBSD 4.8
> on it has been failing recently, so I copied its root partition to a
> fresh IDE disk with cp -pR and 

You should use dump and restore to copy the root partition, see:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: nxserver/freenx

2008-11-29 Thread matt donovan
On Sat, Nov 29, 2008 at 7:42 AM, Pieter Donche <[EMAIL PROTECTED]>wrote:

> On Fri, 28 Nov 2008, matt donovan wrote:
>
>  On Fri, Nov 28, 2008 at 3:53 AM, Pieter Donche <[EMAIL PROTECTED]
>> >wrote:
>>
>>  I want my freeBSD-7.0-RELEASE server accessible via a FreeNX client
>>> from www.nomachine.com.
>>>
>>> I believe I should install both the ports nxserver and freenx:
>>>
>>>  From http://www.freebsdports.info/ports/net/nxserver.html I read:

  nxserver: this port provides only the NX core binaries and libraries as
>>>   were released by NoMachine as source code. To make them work and be
>>>   used as an NX server, you will need to:
>>> - either install FreeNX (net/freenx) additionally,
>>> - or install the commercial NoMachine server product (currently not
>>>available in native FreeBSD form)
>>>
>>> $ whereis nxserver
>>> nxserver: /usr/ports/net/nxserver
>>> $ whereis freenx
>>> freenx: /usr/ports/net/freenx
>>> # cd /usr/ports/net/nxserver
>>> # make install clean
>>> ===>  nxserver-1.4.0_1 is marked as broken: this port fails to build with
>>> xorg-7
>>> .2.
>>> *** Error code 1
>>>
>>> What's this?
>>>
>>> What are my alternatives to get a NX server running on FreeBSD?
>>>
>>> # pkg_add -r freenx
>>> isn't found ...
>>>
>>> ___
>>> freebsd-questions@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to "
>>> [EMAIL PROTECTED]"
>>>
>>
>>
>> well freenx now provides nxserver I tried updating the ports but the
>> freenx
>> tarball isn't very clear like it used to be since, since the files have
>> changed so much from what the old version used to be like. you could try
>> freenx and see if it will work or not. Since I m pretty sure the port is
>> old.
>>
>
> No help ... This ends up with the same problem ... :
>
> # cd /usr/ports/net/freenx
> # make install clean
> ===>  Vulnerability check disabled, database not found
> => freenx-0.4.4.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
> => Attempting to fetch from http://www.iem.pw.edu.pl/ftp/distfiles/.
> fetch: http://www.iem.pw.edu.pl/ftp/distfiles/freenx-0.4.4.tar.gz: Moved
> Temporarily
> => Attempting to fetch from
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
> freenx-0.4.4.tar.gz   100% of   45 kB   92 kBps
> ===>  Extracting for freenx-0.4.4_3
> => MD5 Checksum OK for freenx-0.4.4.tar.gz.
> => SHA256 Checksum OK for freenx-0.4.4.tar.gz.
> ===>  Patching for freenx-0.4.4_3
> ===>  Applying FreeBSD patches for freenx-0.4.4_3
> ===>   freenx-0.4.4_3 depends on file: /usr/local/libdata/xorg/libraries -
> found
> ===>  Configuring for freenx-0.4.4_3
> ===>  Installing for freenx-0.4.4_3
> ===>   freenx-0.4.4_3 depends on file: /usr/local/NX/bin/nxagent - not
> found
> ===>Verifying install for /usr/local/NX/bin/nxagent in
> /usr/ports/net/nxserver
> ===>  nxserver-1.4.0_1 is marked as broken: this port fails to build with
> xorg-7.2.
> *** Error code 1
>
> Stop in /usr/ports/net/nxserver.
> *** Error code 1
> Stop in /usr/ports/net/freenx.


pretty much you need to update the ports to even install freenx/nxserver, I
tried updating the freenx one but got a bit lost with the new freenx
tarballs that the developer provides. And I know these two ports are the
most wanted, for some people
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: dlsym can't use handle returned by dlopen?

2008-11-29 Thread Markus Hoenicka
Markus Hoenicka writes:
 > Don't mean to nag, but is there any news on this?
 > 

just for the record: turns out this was a bug that got fixed in
6.3. See

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/129031

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Problem with wireless network.

2008-11-29 Thread Wojciech Puchar

This same computer, using the same FreeBSD used to connect to the interent,
and I could go surfing.  Now it only times out.  I have a fresh install of
FreeBSD 7.0, and can not solve this problem.


probably nobody can solve your problem without ANY precise description.

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


Re: Temporarily blocking ports

2008-11-29 Thread Chris


On Nov 29, 2008, at 1:11 PM, Jos Chrispijn wrote:



From your reply on my message of 29-11-2008 21:47:

An even tighter practice is to turn off all password logins and
use only keyed connections. This is easier than it might seem
though I'll admit I think of ssh as something only a select
number of users may use and thus you know them by name
and what IPs they are permitted to connect on.
I have been thinking of that as well, but don't think I should use  
that yet with the knowledge I have on this.

Do you refer to manual of automatic key connections?


It's extremely easy.

Generate your key and spread it to all systems you want
to connect to. Have other users generate their key and do the
same. After everyone is set, turn off password access in
/etc/ssh/sshd_config, that file contains the docs in comments
on how to do this. You change three parameters. Then sshd
will need to be restarted. Be sure logins by key work first.

This implies how to set up your keys. This was lifted from
a helpful page on the net and modified but is pretty basic.
Creates the keys in home directory of myuserid on system
www.example.com, then moving the key to a second system
called other.example.com such that myuserid can move
between systems. The userid on the remote does not need
to be the same string as on the local system though it's shown
that way here.

www$ cd # get to your home directory
www$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/myuserid/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/myuserid/.ssh/id_rsa.
Your public key has been saved in /home/myuserid/.ssh/id_rsa.pub.
The key fingerprint is:
 [EMAIL PROTECTED]
www$ ssh [EMAIL PROTECTED] mkdir -p .ssh
Password: 
www$ cat .ssh/id_rsa.pub|ssh [EMAIL PROTECTED] 'cat >> .ssh/ 
authorized_keys'

Password:

You are done setting up keys. Sample use of seamless login:

www$ ssh other.example.com
other$ host
other.example.com
other$ users
myuserid  ttyp0Jul 14 05:28 (www.example.com)
other$ exit
www$

I only use this on FreeBSD and OS-X. No idea on Putty and others.


thanks for sharing,
Jos Chrispijn


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


Re: Temporarily blocking ports

2008-11-29 Thread Jos Chrispijn

From your reply on my message of 29-11-2008 21:47:


You could also take a look at sshguard.
  

Good suggestion, I will do that.

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


Re: Temporarily blocking ports

2008-11-29 Thread Jos Chrispijn


From your reply on my message of 29-11-2008 21:47:

An even tighter practice is to turn off all password logins and
use only keyed connections. This is easier than it might seem
though I'll admit I think of ssh as something only a select
number of users may use and thus you know them by name
and what IPs they are permitted to connect on.
I have been thinking of that as well, but don't think I should use that 
yet with the knowledge I have on this.

Do you refer to manual of automatic key connections?

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


Re: Temporarily blocking ports

2008-11-29 Thread Sahil Tandon
Jos Chrispijn <[EMAIL PROTECTED]> wrote:

> Can someone hint me how I can block ports for let's say 30 minutes if 
> someone repeatedly tries to do a SSH login?
> I use ipfw as firewall...

security/sshguard-ipfw

-- 
Sahil Tandon <[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: Temporarily blocking ports

2008-11-29 Thread Glen Barber
On Sat, Nov 29, 2008 at 2:39 PM, Jos Chrispijn <[EMAIL PROTECTED]> wrote:
> Can someone hint me how I can block ports for let's say 30 minutes if
> someone repeatedly tries to do a SSH login?
> I use ipfw as firewall...
>

You could also take a look at sshguard.

http://cvsweb.freebsd.org/ports/security/sshguard-ipfw


-- 
Glen Barber


"If you have any trouble sounding condescending, find a Unix user to
show you how it's done."
 --Scott Adams
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Yuri

Polytropon wrote:

Strange... are these definitely audio CD tracks? You could
  


They are definitely raw audio CD tracks.


use this form to explicitely tell sox how to interpret the
data (which is "headerless" on audio CDs, of course):

sox -r 14400 -c 2 -b -L -S -x track.cdr track_rev.cdr
  


This command fails:
$ sox sox: Bits value `-L' is not a positive integer

Also -L option seems to conflict with -x:
$ Failed: only one endian option per file is allowed

But this command works and again produces the errors:
$ sox -r 14400 -c 2 -b 16 -S -x track-03.cdr track-03.cdr.swp
$ sox mp3-duration: recoverable MAD error
$ sox mp3-duration: MAD lost sync
$ sox mp3-duration: recoverable MAD error
$ sox mp3-duration: recoverable MAD error




This looks like that sox reads / generates MP3 files...?
Are these definitely standard audio CD tracks (such as every
old fashioned CD player can play)?
  


No, it seems like sox is trying to interpret raw audio data as an mp3 
(and other) formats for some unknown reason.


It's silly but the only way I can think of to reliably do this (very 
slowly) in a command line is:

perl -pi -e "s/(.)(.)/\\2\\1/g" track.cdr

Yuri

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


Re: Temporarily blocking ports

2008-11-29 Thread Chris


On Nov 29, 2008, at 11:39 AM, Jos Chrispijn wrote:

Can someone hint me how I can block ports for let's say 30 minutes  
if someone repeatedly tries to do a SSH login?

I use ipfw as firewall...


If you mean the statement as entered while you are watching,
something like:

ipfw add 0922 deny tcp from nn.nn.nn.nn to me dst-port 22

where 922 is some line prior to your normal allow statements for ssh
nn.nn.nn.nn is the address you'd prefer to block.

If you mean an automated way, put this in a perl program,
sleep for 30 minutes and then do a ipfw delete 0922. Your
program will need to run as root of course.

Doing things like this tends to be risky if you aren't careful.
If you don't have anti-spoofing and perhaps even some
careful whitelisting rules, depending on how you identify
an attack, schemes such as this can be turned
against you once you automate it.

I think a better way is to allow only ip addresses you want to
connect on ssh to start a session with setup keep-state and
then include a specific deny for all ssh connections following that
statement. If you have connections coming in from certain
nets but dynamically assigned addresses, only allow those
ranges and block all others. That will dramatically reduce the
audience of casual brute force attackers.

An even tighter practice is to turn off all password logins and
use only keyed connections. This is easier than it might seem
though I'll admit I think of ssh as something only a select
number of users may use and thus you know them by name
and what IPs they are permitted to connect on.


regards,
Jos Chrispijn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions- 
[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: Temporarily blocking ports

2008-11-29 Thread Anthony M. Rasat
Jos Chrispijn wrote:
>Can someone hint me how I can >block ports for let's say 30 minutes if 
>someone repeatedly tries to do a SSH >login?
>I use ipfw as firewall...

I think I saw ssh-ipfw section in jail.conf file of fail2ban application 
(http://www.fail2ban.org). I believe fail2ban might be the one you looking for.

But I'm sorry I'm using fail2ban in Linux (which is using netfilter's iptables 
firewall, not IPFW). I'm not sure it will work on FreeBSD and I don't have 
FreeBSD server lying around outside my VMware environment here, so I wish you 
good luck trying.

-- 

Regards,

Anthony M. Rasat
Manager - Technical, Network and Support Division
PT. Jawa Pos National Network
Graha Pena Jawa Pos Group Building, 5th floor
Jln. Raya Kebayoran Lama 12, Jakarta Barat 12210
Indonesia.-
Phone 02132185562
Phone 081574217035
Fax 02153651465
Web http://www.jpnn.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Yuri

Joerg Schilling wrote:

Well, then the handbook is sub-optimal.

dd in general does not work at all to read CD-Audio;
FreeBSD is an exception with repect to the fact that you get data at all.

Here is a list of cons for dd even on FreeBSD:

-   dd may not work with all drives

-	Do you know what byteorder you get from a MMC CD-ROM drive 
	on FreeBSD/Sparc? You would need network byteorder on Sparc
	but the MMC CD-ROM drive delivers intel byteorder due to a 
	bug in the MMC standard


cdrecord always asumes network byte order for RAW audio data,
this is reasonable

-   Why would you deal with raw audio data at all if there are
audio file formats that include a notation for byte order and
sampling rates?

-   There is no jitter check and no quality control with dd on FreeBSD,
cdda2wav works on all OS and has jitter control and qualiti control
with e.g. libparanoia.

-   There is no way to get the correct CD structure back if you use dd.
Cdda2wav reads meta-data and puts them into *.inf files.

-	With dd, you cannot read intentionally defective media as sold by 
	the music mafia.


Allowing to read CD-DA using dd on FreeBSD is a nice gag but nothing I would
recommend in order to create a copy from an audio CD.
  


Thank you, good points.
This seems to be reflected in the Handbook.

I will file a PR for this.

Yuri

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


Temporarily blocking ports

2008-11-29 Thread Jos Chrispijn
Can someone hint me how I can block ports for let's say 30 minutes if 
someone repeatedly tries to do a SSH login?

I use ipfw as firewall...

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


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Joerg Schilling
Yuri <[EMAIL PROTECTED]> wrote:

> Joerg Schilling wrote:
> > Well, you should not expect to get a usable read
> > result from dd.
> >   
>
> Why?
> Handbook recommends the use of dd for audio CD ripping.

Well, then the handbook is sub-optimal.

dd in general does not work at all to read CD-Audio;
FreeBSD is an exception with repect to the fact that you get data at all.

Here is a list of cons for dd even on FreeBSD:

-   dd may not work with all drives

-   Do you know what byteorder you get from a MMC CD-ROM drive 
on FreeBSD/Sparc? You would need network byteorder on Sparc
but the MMC CD-ROM drive delivers intel byteorder due to a 
bug in the MMC standard

cdrecord always asumes network byte order for RAW audio data,
this is reasonable

-   Why would you deal with raw audio data at all if there are
audio file formats that include a notation for byte order and
sampling rates?

-   There is no jitter check and no quality control with dd on FreeBSD,
cdda2wav works on all OS and has jitter control and qualiti control
with e.g. libparanoia.

-   There is no way to get the correct CD structure back if you use dd.
Cdda2wav reads meta-data and puts them into *.inf files.

-   With dd, you cannot read intentionally defective media as sold by 
the music mafia.

Allowing to read CD-DA using dd on FreeBSD is a nice gag but nothing I would
recommend in order to create a copy from an audio CD.



Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
   [EMAIL PROTECTED](uni)  
   [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Yuri

Joerg Schilling wrote:

Well, you should not expect to get a usable read
result from dd.
  


Why?
Handbook recommends the use of dd for audio CD ripping.

Yuri

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


Re: Noisy mouse

2008-11-29 Thread Wojciech Puchar

or make a keystroke. Is this a bug, or a strange feature? How do i


bad hardware design - mouse data signals gets through to audio signal.

most of your computer's signal line are in megahertz range so you don't 
hear anything, PS/2 mouse has 40kbps data rate.

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


Re: shell scripting problems

2008-11-29 Thread Sahil Tandon
Tim Judd <[EMAIL PROTECTED]> wrote:

> I'm sure it's faulty
> 
> Which is why I'm asking for help
> 
> My regexes (in it's various forms) produce the output similar to:
>   xorg-fonts-75dpi
>   xorg-fonts
>   xorg-fonts-100dpi
>   ...
>   ...
>   ...
> 
> and I'm wanting my regex to return the 2nd value, in this example, in
> this list.

In your initial message, you wished to extract the first value; now it
is the second?

> The problem is the shell is taking the end anchor $ as the start of a
> variable, and no matter how I escape it, it seems to never work.
> 
> I'm sorry for not explaining properly.  Maybe the above would help.

It does not.  Explain exactly what you are trying to do and you will
receive more exact troubleshooting advice.  And please stop
top-posting.

-- 
Sahil Tandon <[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: Purchase of FreeBSD

2008-11-29 Thread Sahil Tandon
Masoom Shaikh <[EMAIL PROTECTED]> wrote:

> On Sat, Nov 29, 2008 at 6:14 AM, Sahil Tandon <[EMAIL PROTECTED]> wrote:
> 
> > Harry Veltman <[EMAIL PROTECTED]> wrote:
> >
> > > Where can I buy it on CD, and how do I know if it is compatible with
> > > my hardware?
> >
> > Did you try asking Google?
> >
> > http://www.google.com/search?hl=en&q=where+to+get+freebsd to:
> > http://www.freebsd.org/where.html
> >
> > http://www.google.com/search?hl=en&q=freebsd+hardware+compatibility to:
> > http://www.freebsd.org/doc/en/books/faq/hardware.html
> >
> > Also see: http://www.freebsd.org/doc/en/articles/freebsd-questions/
> >
>
> http://www.freebsdmall.com
> 
> this question is not even worth answering,  it is like

To which question are you referring?  Your Q&A makes little sense.

> Q: why didn't u tell us ?
> A: bcos it was impossible to hide

-- 
Sahil Tandon <[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: Problem with wireless network.

2008-11-29 Thread Mel
On Saturday 29 November 2008 17:40:18 Christopher Joyner wrote:

> On my windows OS I can connect to the router, and also get DHCP service.
> On the same computer, running FreeBSD 7.0 It will not get DHCP service.
> Sometimes it will connect to the router, but does not get DHCP service.
> Then it will not connect anymore.
>
> This same computer, using the same FreeBSD used to connect to the interent,
> and I could go surfing.  Now it only times out.  I have a fresh install of
> FreeBSD 7.0, and can not solve this problem.

Without either ifconfig -a output or a psychic, we can't either.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Unix program that sends email directly using MX record

2008-11-29 Thread Peter Boosten


Dan wrote:
> Peter Boosten([EMAIL PROTECTED])@2008.11.29 17:34:28 +0100:
>>> It's not prejudicial. I do not wish to start yet another MTA flamewar,
>>> but you can't deny Sendmail's poor security, design, performance, and
>>> complex configuration. The poor security history is there, the poor
>>> funnel design and conf files that require a scripting language are
>>> obviously ugly.
>> Yeah, in 1845 it was. Sendmail is as secure as any other mta. And using 
> 
> Simply not true. Sendmail has had TONS of remote vulnerabilities. Many
> people have fallen victims to exploits and had their servers rooted.
> 
> The recent one is of 20006.
> http://web.nvd.nist.gov/view/vuln/detail?execution=e2s1

Hmmm: ERROR, "null" is not valid. The CVE either does not exist or is
not in the format of CVE-XXX-.

The most recent vulnerabilities of Postfix are from August and September
2008, and I still use it. Also I use (with great happyness) Sendmail on
two machines, without any problems. The only problem ever caused was by
clamav.

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: Unix program that sends email directly using MX record

2008-11-29 Thread dick hoogendijk
On Sat, 29 Nov 2008 12:04:34 -0500
Dan <[EMAIL PROTECTED]> wrote:

> Peter Boosten([EMAIL PROTECTED])@2008.11.29 17:34:28 +0100:
> > Yeah, in 1845 it was. Sendmail is as secure as any other mta. And
> > using 
> 
> Simply not true. Sendmail has had TONS of remote vulnerabilities. Many
> people have fallen victims to exploits and had their servers rooted.

May be, but still, sendmail is -AS SECURE AS ANY OTHER MTA- now!
When do stop looking back to bitch on sendmail?
If you don't like it, don't use it.

> qmail has never had a remote root vulnerability or a similar flaw
> because it's designed with security in mind.

Not only with security. Also with lack of possiblities.

> Sendmail never was.

But it is still the most used mta worldwide.

-- 
Dick Hoogendijk -- PGP/GnuPG key: 01D2433D
+ http://nagual.nl/ | SunOS sxce snv103 ++
+ 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]"


Problem with wireless network.

2008-11-29 Thread Christopher Joyner
On my windows OS I can connect to the router, and also get DHCP service.
On the same computer, running FreeBSD 7.0 It will not get DHCP service.
Sometimes it will connect to the router, but does not get DHCP service.
Then it will not connect anymore.

This same computer, using the same FreeBSD used to connect to the interent,
and I could go surfing.  Now it only times out.  I have a fresh install of
FreeBSD 7.0, and can not solve this problem.

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


Re: Unix program that sends email directly using MX record

2008-11-29 Thread Dan
Peter Boosten([EMAIL PROTECTED])@2008.11.29 17:34:28 +0100:
>> It's not prejudicial. I do not wish to start yet another MTA flamewar,
>> but you can't deny Sendmail's poor security, design, performance, and
>> complex configuration. The poor security history is there, the poor
>> funnel design and conf files that require a scripting language are
>> obviously ugly.
>
> Yeah, in 1845 it was. Sendmail is as secure as any other mta. And using 

Simply not true. Sendmail has had TONS of remote vulnerabilities. Many
people have fallen victims to exploits and had their servers rooted.

The recent one is of 20006.
http://web.nvd.nist.gov/view/vuln/detail?execution=e2s1

qmail has never had a remote root vulnerability or a similar flaw
because it's designed with security in mind. Sendmail never was.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


FreeBSD 4.8: can't load kernel after doing "cp -R /" to another disk

2008-11-29 Thread admin


Hello, everyone. This is the problem: our SCSI disk with FreeBSD 4.8 on it 
has been failing recently, so I copied its root partition to a fresh IDE 
disk with cp -pR and tried to boot from that. Unfortunately, loader gives me 
this:

can't load 'kernel'
can't load 'kernel.old'
and offers prompt. 

I tried almost any combination of the loader command (like 
0:ad0(0,a)/boot/loader) but still the same. The kernels are right there: 
/kernel and /kernel.old. Can't the root partition be copied this way? Should 
their location on disk be hardcoded somewhere? Please help me with 
bootblocks etc. as I'm desperately running out of time.

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


Re: Unix program that sends email directly using MX record

2008-11-29 Thread Peter Boosten
On 29 nov 2008, at 17:03, Dan <[EMAIL PROTECTED]>  
wrote:








It's not prejudicial. I do not wish to start yet another MTA flamewar,
but you can't deny Sendmail's poor security, design, performance, and
complex configuration. The poor security history is there, the poor
funnel design and conf files that require a scripting language are
obviously ugly.


Yeah, in 1845 it was. Sendmail is as secure as any other mta. And  
using m4, configuring is poc.


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: "printer not found"... printing with LPRng and foomatic

2008-11-29 Thread luizbcampos
On 11/28/08, Lowell Gilbert <[EMAIL PROTECTED]> wrote:
> luizbcampos <[EMAIL PROTECTED]> writes:
>
>> I own a usb Canon Pixma iP 1600 printer and I use FBSD-7.0-R
>> amd64. I've choosen LPRng as printer spooler and foomatic-filters,
>> everything is OK in /etc/printcap but when I type "lpq" I get "printer
>> not found" as output.
>>
>>
>>
>>  # /etc/printcap
>>
>> ip2200_usb_ps: \
>>
>> :lp=/dev/ulpt0
>> :force_localhost: \
>> :if=/usr/local/bin/foomatic-rip: \
>> :ppd=/usr/local/libexec/cups/filter/canonip2200.ppd: \
>> :sd=/var/spool/lpd/ip2200_usb_ps: \
>> :mx#0:sh:
>>
>>
>>  I followed all the info contained in "openprinting" section lpd
>> and I chmoded 0755 lprng.sh
>
> How about "lpq -P ip2200_usb_ps"?
>
> --  printer has been detected but some problems come up:

   #lpq
Printer [EMAIL PROTECTED] (dest /dev/[EMAIL PROTECTED]
Quue: no printable jobs in queue
 Server: no server active
Status: job '[EMAIL PROTECTED]' saved at 12:52:09
error: [EMAIL PROTECTED]  : too many errors
Printer : /dev/[EMAIL PROTECTED] - ERROR: printer '/dev/ulpt0
has illegal char at ' /dev/ulpt0' in name

>> should I set up firstly lpd.perm in order to correct these errrors?

>> /etc/printcap

 ip2200_usb_ps: \

 :lp=/dev/[EMAIL PROTECTED]: \
 :force_localhost: \
 :if=/usr/local/bin/foomatic-rip: \
 :ppd=/usr/local/libexec/cups/filter/canonip2200.ppd: \
 :sd=/var/spool/lpd/ip2200_usb_ps: \
 :mx#0:sh:

>> /var/log/lpd.errs:

 Nov 28 19:25:44 localhost lpd[850]: lpd startup: logging=0

  such sentence repeat many times ...

> Lowell Gilbert, embedded/networking software engineer, Boston area
>   http://be-well.ilk.org/~lowell/
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Unix program that sends email directly using MX record

2008-11-29 Thread Dan
Jerry McAllister([EMAIL PROTECTED])@2008.11.24 14:38:19 -0500:
> On Mon, Nov 24, 2008 at 12:36:50PM -0500, Dan wrote:
> 
> > Kelly Jones([EMAIL PROTECTED])@2008.11.22 14:16:56 -0700:
> > > What Unix program sends email directly, using the MX record of the
> > > recipient, instead of using sendmail or an installed MTA?
> > 
> > Sendmail/Sendwhale sucks for just about anything. There are much better
> > MTAs out there. For your needs, I think 'nullmailer' from Bruce Guenter
> >  would fit the bill and so would qmail in nullmailer mode. Postfix as well.
> 
> Heavily prejudicial response.I haven't had any trouble using
> Sendmail for just about anything.But, whatever.

It's not prejudicial. I do not wish to start yet another MTA flamewar,
but you can't deny Sendmail's poor security, design, performance, and
complex configuration. The poor security history is there, the poor
funnel design and conf files that require a scripting language are
obviously ugly. Sendmail is often replaced due to performance concerns
alone. There are much better alternatives. qmail and Postfix.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: shell scripting problems

2008-11-29 Thread Mel
On Saturday 29 November 2008 05:58:44 Tim Judd wrote:

> In the shell script, i have a
>   pkg_info -qLx "^$PKG-[0-9,._]+$"
> also tried (-X)tended regex instead of the standard rege(-x).

pkg_info -qLx "^${PKG}-[0-9,\._]+\$"
-- 1--   -2-

@1: shell evaluates before regex. Use braces so that end of variable is 
explicit
@2: this shouldn't be evaluated by the shell, so escape it with a backslash. 
It's passed as dollar sign to the command.

Also, I'm relatively sure it needs -X for the + sign, but haven't tested.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Problem about ppp -nat

2008-11-29 Thread Ian Smith
On Wed, 26 Nov 2008, Pongthep Kulkrisada wrote:
[..]
 > read many docs. Yesterday I decided to re-install FBSD7.0R from CDs 
 > again. That causes late reply, I'm sorry. :-(

No worries .. it's not like we were just hanging out waiting :)

 > I now have gateway_enable="YES" and firewall_enable="YES" in my /etc/rc.conf.
 > I can then dial ISP again. Then the following steps were taken.
 > 
 > 1. I can ping any sites and very fast.
 > 2. # kldload ipfw (as I don't want to compile kernel anymore.)
 > 3. # kldload ipdivert

I was under the impression that divert had to be built into the kernel, 
but perhaps kldload ipdivert works allright with 7.x.

 > 4. I also have ``natd8668/divert'' in my /etc/services.
 > 5. # natd -interface tun0
 > 6. # /sbin/ipfw add 101 divert natd all from any to any via tun0
 > 7. # /sbin/ipfw add 102 pass all from any to any
 > (Note that my first ipfw rule is 100 check-state. So steps 6 and 7 
 > should be considered as the first two filtering rules.)

Just as an aside, as you're not using any keep-state rules: you should 
do NAT before a check-state, so packets match dynamic rules after NAT.

 > I do this way because I know from reading document that ppp must be 
 > run before natd. I always want to dial ppp by myself so I can't put 
 > natd in /etc/rc.conf. And doing it interactively is very easy to 
 > detect when something goes wrong and step 1 can proof my good 
 > connection.

More specifically the interface, here tun0, must exist before using 
divert sockets using that interface.  natd(8) says:

 3.   If you use the -interface option, make sure that your interface is
  already configured.  If, for example, you wish to specify `tun0' as
  your interface, and you are using ppp(8) on that interface, you must
  make sure that you start ppp prior to starting natd.

You've probably noticed that tun0 doesn't go away when you close ppp, so 
it's sufficient to have run ppp once before using the divert rule.  In 
any case I doubt this'd really do any harm (apart from not working :)

There's another way to bring up ppp (so creating tun0) without dialing 
out until you're ready; using ppp -auto, with a dial filter rule/s.  See 
ppp(8) and the examples in /usr/share/examples/ppp/ppp.conf.sample ..
maybe something like:

set filter dial  00 0 icmp src eq 8

which will only dial upon seeing an outbound ping packet.  You could 
specify some address rather than 0 0 if you want to be more specific.

 > After step 7 I switched to terminal, which keeping ping. 
 > I found that ping stalled. I tried re-connect many times, now I know 
 > that step 3 causes the problem. I have also tried putting 
 > ipfw_load="YES" and ipdivert_load="YES" in /boot/loader.conf. The 
 > problem persists. I'm quite sure that the module ipdivert has adverse 
 > effect to the connection through modem. Should I say a bug?!!! 

Perhaps others can say if it's ok to kldload ipdivert after ipfw these 
days?  In any case, this could mean coincidence rather than causation.
You've not shown error messages from ppp.log indicating disconnection?

Two things you should always check if there are problems passing traffic 
through an interface that's apparently 'UP':
# ifconfig  # make sure addresses, netmasks, etc make sense.
# netstat -finet -ran   # check the default and other routes make sense.

 > Without ipdivert I can not play NAT (I don't want to learn ``ipfw 
 > nat'' and ``ppp -nat'' for now). This was also the major problem when 

'ipfw nat' is as easy to setup as natd, using much the same semantics, 
and doesn't require the presence of ipdivert.  I can't say whether it 
would get upset if tun0 was specified and didn't yet exist, but expect 
it'll just ignore any packets that don't match the specified interface, 
though I can't test that here now.  Something like this should work:

# ipfw nat 123 config if tun0 log deny_in same_ports unreg_only reset
# ipfw add [number] nat 123 ip4 from any to any via tun0

where 123 is an arbitary number,and ip4 is more specific than 'all'
 
nat logging is likely intense, but useful until things are working. 
deny_in provides some protection till your ipfw is properly setup.
unreg_only means only traffic from your internal network (eg 192.168.*) 
is considered, not traffic from your router itself - maybe quicker.
reset clears the aliasing table if your IP address on tun0 changes.

You can study more about all NAT functionality in 'man 3 libalias'.

 > I recompiled kernel with options IPDIVERT few days ago. That caused 
 > me unable to connect ISP. One thing I should note here, always run 
 > ppp before natd. Last time when I was on GENERIC kernel, I couldn't 
 > connect ISP because my /etc/rc.conf contained natd. So natd ran 

Again, I kinda doubt this is cause and effect; I can't see how the mere 
presence of ipdivert could have any such effect.  Perhaps the extra 
logging in ppp.log suggested might help debug this (other) problem

Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Mel
On Saturday 29 November 2008 09:10:44 Yuri wrote:
> Polytropon wrote:
> > It sounds like "byte order reversal" which makes the typical noise.
> > In order to 1:1 copy a CD, I'd recommend the use of the cdrdao
> > tool - "cdrdao read-cd" and "cdrdao write" are the commands.
> > It's easy to use them in order to get a CD "at once" and then
> > reproduce it to blank media.
> >
> > If you need to use cdrecord, you can "preprocess" the .cdr
> > files with "sox -x". You can always use the "play" command
> > (from sox) to check what your files sound like.
> >
> > This is a sample command to turn .cdr files into .wav files,
> > just to illustrate the correct parameters for interpreting
> > the .cdr (CD audio data) format:
> >
> > sox -r 14400 -c 2 -b -L -S ${OUTFILE}.cdr ${OUTFILE}.wav
>
> Thank you Polytropon,
> Byte order was really a problem.
> Strange that burncd is supposed to take the original byteorder and
> cdrecord takes reversed one.
>
> > I didn't try burncd since FreeBSD 4. Since then, I#m very
> > comfortable with cdrecord and cdrdao and the atapicam facility.
>
> burncd is still recommended by handbook for ATAPI CDROMs
> for some reason.

Well, cdrecord don't work without CAM.

> I feel like cdrecord is much nicer and once suggested to retire
> burncd in handbook and to always recommend cdrecord instead.
> But some people disagreed.

Manpages with over 10 pages just describing options and arguments make some 
people dizzy. Especially for simple tasks like burning a cd. "Just do it".
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Purchase of FreeBSD

2008-11-29 Thread Dave Feustel
On Fri, Nov 28, 2008 at 09:39:39PM -0800, Harry Veltman wrote:
> Where can I buy it on CD, and how do I know if it is compatible with my 
> hardware?

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


Re: nxserver/freenx

2008-11-29 Thread Pieter Donche

On Fri, 28 Nov 2008, matt donovan wrote:


On Fri, Nov 28, 2008 at 3:53 AM, Pieter Donche <[EMAIL PROTECTED]>wrote:


I want my freeBSD-7.0-RELEASE server accessible via a FreeNX client
from www.nomachine.com.

I believe I should install both the ports nxserver and freenx:


From http://www.freebsdports.info/ports/net/nxserver.html I read:


nxserver: this port provides only the NX core binaries and libraries as
   were released by NoMachine as source code. To make them work and be
   used as an NX server, you will need to:
 - either install FreeNX (net/freenx) additionally,
 - or install the commercial NoMachine server product (currently not
available in native FreeBSD form)

$ whereis nxserver
nxserver: /usr/ports/net/nxserver
$ whereis freenx
freenx: /usr/ports/net/freenx
# cd /usr/ports/net/nxserver
# make install clean
===>  nxserver-1.4.0_1 is marked as broken: this port fails to build with
xorg-7
.2.
*** Error code 1

What's this?

What are my alternatives to get a NX server running on FreeBSD?

# pkg_add -r freenx
isn't found ...

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



well freenx now provides nxserver I tried updating the ports but the freenx
tarball isn't very clear like it used to be since, since the files have
changed so much from what the old version used to be like. you could try
freenx and see if it will work or not. Since I m pretty sure the port is
old.


No help ... This ends up with the same problem ... :

# cd /usr/ports/net/freenx
# make install clean
===>  Vulnerability check disabled, database not found
=> freenx-0.4.4.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://www.iem.pw.edu.pl/ftp/distfiles/.
fetch: http://www.iem.pw.edu.pl/ftp/distfiles/freenx-0.4.4.tar.gz: Moved 
Temporarily
=> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
freenx-0.4.4.tar.gz   100% of   45 kB   92 kBps
===>  Extracting for freenx-0.4.4_3
=> MD5 Checksum OK for freenx-0.4.4.tar.gz.
=> SHA256 Checksum OK for freenx-0.4.4.tar.gz.
===>  Patching for freenx-0.4.4_3
===>  Applying FreeBSD patches for freenx-0.4.4_3
===>   freenx-0.4.4_3 depends on file: /usr/local/libdata/xorg/libraries - found
===>  Configuring for freenx-0.4.4_3
===>  Installing for freenx-0.4.4_3
===>   freenx-0.4.4_3 depends on file: /usr/local/NX/bin/nxagent - not found
===>Verifying install for /usr/local/NX/bin/nxagent in 
/usr/ports/net/nxserver
===>  nxserver-1.4.0_1 is marked as broken: this port fails to build with 
xorg-7.2.
*** Error code 1

Stop in /usr/ports/net/nxserver.
*** Error code 1
Stop in /usr/ports/net/freenx.

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


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Joerg Schilling
>I am trying to copy an audio CD.

>First I've ran:
>dd if=/dev/acd0tN of=track-N.cdr bs=2352
>for every track. This gets raw track files.

>Secondly I run:
>cdrecord -v -dao -audio $* dev=2,0,0 speed=4
>This is supposed to recreate the original CD.

>But when I try to play it I can hear only noise.

Well, you should not expect to get a usable read
result from dd.

It is much better to use cdda2wav -vall to read the original
and if you later use cdrecord -useinfo 
you will get a correct copy.

BTW: cdrecord of course works in a platform independent way and thus
expects raw audio data in standard network byte order


Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
   [EMAIL PROTECTED](uni)  
   [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Noisy mouse

2008-11-29 Thread Polytropon
On Sat, 29 Nov 2008 13:43:45 +0200, "Roey Dror" <[EMAIL PROTECTED]> wrote:
> I'm using FreeBSD 7.0 (i386) with the IceWM window manager. The sound
> seems to work when playing files with xmms.
> When my speakers are turned on, I hear noise whenever I move my mouse
> or make a keystroke. Is this a bug, or a strange feature? How do i
> turn it off?

I have a similar observation here, allthough you can hear the
"noisy mouse" only when the mixer settings vol is 100. In my
opinion, this seems to be a kind of electromagnetic
interference, but I didn't test this theory yet. Or it has to
do with data fransfers during mouse movement / keystrokes?
USB uses polling, but maybe some weird interrupt problem?
Anyone remembers Sound Blaster problems when printing on
a parallel printer (IRQ7)?

My settings are different from yours:

% uname -r
7.0-STABLE (ca. Aug 2008)

% cat /dev/sndstat 
FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386)
Installed devices:
pcm0:  at io 0xd800 irq 16 [MPSAFE]
(1p:1v/1r:1v channels duplex default)

% dmesg | grep pcm
pcm0:  port 0xd800-0xd8ff irq 16 at device 7.0 on pci3
pcm0: [ITHREAD]

% sysctl -a | grep snd
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_buffersize: 16384
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.verbose: 1
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2007061600/i386
hw.snd.default_auto: 0

As you described, moving the mouse and pressing keys on the
keyboard result in strange "sound effects". I have a Sun USB
type 6 keyboard + type 6 mouse.

I'm using a separate sound card (PCI) because I diskike the
"AC'97" CPU sound card emulation. :-)


-- 
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: Problem about ppp -nat

2008-11-29 Thread Ian Smith
On Fri, 28 Nov 2008, Pongthep Kulkrisada wrote:
 > Hi all,
 > 
 > > I didn't touch /etc/ppp/ppp.conf, which has been working for 5 years
 > > since FBSD5.0R. Even if I go back to GENERIC kernel. I could not dial out
 > > to ISP in any ways. I didn't know what I do wrong even if
 > > I did read many docs.

 > I tried exactly what being described in the handbook. But all failed, 
 > I still can't dial ISP. I think that posting /etc/ppp/ppp.conf may be 
 > useful for your diagnostic. Note that this file has been used for 
 > long time and never changed. But I've just reminded that ppp is 
 > changed from version to version. My ppp.conf may not suit the current 
 > version. I don't know.
 > 
 > # cat /etc/ppp/ppp.conf
 > 
 > default:
 >  set log Phase Chat LCP IPCP CCP tun command

Try using more logging, at least temporarily, then you should be able to 
see from your ppp.log just what's going on.  For about 10 years I used:

  set log phase chat connect carrier link ipcp ccp ID0 TUN command

 >  ident user-ppp VERSION (built COMPILATIONDATE)
 > 
 >  set device /dev/cuad0

Try /dev/cuaa0.  At least in the olden days, cuad0 was configured more 
for dialin rather than dialout.  This may? explain the next two lines:

 >  set ctsrts off # enables software flow control
 >  set accmap 000a# comments out these 2 lines for hardware flow 
 > control

Not sure why you don't want to use hardware flow control?  Is this with 
a regular external modem?  Anyway, I've always used ctsrts (with cuaa0).

 >  set speed 115200
 >  disable pred1
 >  deny pred1
 >  disable lqr
 >  deny lqr
 >  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
 > \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 180 CONNECT"
 >  set redial 3 20
 >  enable dns # request DNS info (for resolv.conf)

Looks ok.  TIMEOUT 60 is plenty for a dialup modem, but whatever.

 > isp:
 >  set phone 0123456789
 >  set authname [EMAIL PROTECTED]
 >  set authkey mypassword
 >  set timeout 0
 >  add! default HISADDR   # Add a (sticky) default route
 >  set openmode active
 >  accept pap
 >  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 >  add 0 0 HISADDR

You probably don't want both those add statements.  Try taking out the 
first one, and replacing the last one with the add! default HISADDR.

Unsure if you need an 'enable pap' as well, maybe default.  Can't hurt.

Anyway, some extra logging should show you when and how it fails, if it 
still does ..

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


Noisy mouse

2008-11-29 Thread Roey Dror
I'm using FreeBSD 7.0 (i386) with the IceWM window manager. The sound
seems to work when playing files with xmms.
When my speakers are turned on, I hear noise whenever I move my mouse
or make a keystroke. Is this a bug, or a strange feature? How do i
turn it off?

/dev/sndstat:
FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386)
Installed devices:
pcm0:  at io 0xdc00 irq 5 kld snd_via82c686 [MPSAFE]
(1p:1v/1r:1v channels duplex default)

demsg:
pcm0:  port 0xdc00-0xdcff,0xe000-0xe003,0xe400-0xe403
irq 5 at device 7.5 on pci0
pcm0: [ITHREAD]
pcm0: 

sysctl:
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_buffersize: 16384
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.verbose: 1
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2007061600/i386
hw.snd.default_auto: 0

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


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Roland Smith
On Fri, Nov 28, 2008 at 11:26:51PM -0800, Yuri wrote:
> I am trying to copy an audio CD.
> 
> First I've ran:
> dd if=/dev/acd0tN of=track-N.cdr bs=2352
> for every track. This gets raw track files.

It is better to use cdparanoia (from the audio/cdparanoia port), since
it outputs WAV files. It also tries to restore the data in case of a
damaged disc. To make it to work, I have a symbolic link /dev/cdrom
[courtesy of /etc/devfs.conf] that links to the real (atapicam) CD
device.

Ripping is now done by running the following command: cdparanoia -B "1-"
This will result in a number of wav files. You can use these with
cdrecord and it will Just Work.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpqLhnw7kInW.pgp
Description: PGP signature


Re: shell scripting problems

2008-11-29 Thread George Davidovich
On Fri, Nov 28, 2008 at 11:31:17PM -0700, Tim Judd wrote:
> On Fri, Nov 28, 2008 at 11:08 PM, Sahil Tandon <[EMAIL PROTECTED]>
> wrote:
> > Tim Judd <[EMAIL PROTECTED]> wrote:
> > 
> > I am not sure what the problem is, but are you just looking for the
> > output of "pkg_info -qxL" on the *first* instance of xorg-fonts-*?
> > 
> > % pkg_info -qL `pkg_info | grep xorg-fonts | head -1 | cut -d\  -f1`
> > 
> > FWIW, your regexp also looks faulty.
> 
> I'm sure it's faulty
> 
> Which is why I'm asking for help

What you were asking wasn't clear, and could have included a script
problem, a port update problem, a pkg_info problem, and/or a regex
problem.  And then, I'm scratching my head wondering how you're making
use of the output of the -L switch.

> My regexes (in it's various forms) produce the output similar to:
>   xorg-fonts-75dpi
>   xorg-fonts
>   xorg-fonts-100dpi
>   ...
> 
> and I'm wanting my regex to return the 2nd value, in this example, in
> this list.

If that's the case, where does your regex of "^$PKG-[0-9,._]+$" fit into
all this?  And why would you expect pkg_info to match on something like
'^xorg-fonts$' when, AFAICT, there is no port by that name?  Again,
you're not being clear. 

> The problem is the shell is taking the end anchor $ as the start of a
> variable, and no matter how I escape it, it seems to never work.

The end-of-line anchors work fine.  For the following I've used bash,
but you can copy the same into a /bin/sh script for identical results:

# PKG=cyrus

# pkg_info -Ex $PKG
cyrus-sasl-2.1.22_1
cyrus-sasl-saslauthd-2.1.22

# pkg_info -Ex $PKG.*1
cyrus-sasl-2.1.22_1
cyrus-sasl-saslauthd-2.1.22 

# pkg_info -Ex ^$PKG.*1\$
cyrus-sasl-2.1.22_1

I'd suggest you submit your script or an abbreviated version.

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


Re: shell scripting problems

2008-11-29 Thread आशीष शुक्ल Ashish Shukla

In <[EMAIL PROTECTED]>, Tim Judd wrote:

Hi all,

I've been trying for a few weeks to try to get this to work, and the /bin/sh
keeps snagging the command line before passing it to pkg_info

I'll use a different shell if I need to, but since I got everything except
this one thing working, i'd rather keep it in sh

In the shell script, i have a
 pkg_info -qLx "^$PKG-[0-9,._]+$"
also tried (-X)tended regex instead of the standard rege(-x).

sh keeps erroring out saying various $" isn't a valid variable name, or
pkg_info doesn't find the anything there.  And it does exist.  This all came
around with me trying to automatically update a bunch of ports.  xorg-fonts
is outdated, but xorg-fonts-100dpi or xorg-fonts-75dpi isn't.  So the regex
returns multiple values (as above).  I just want the first, hence the
anchors.


I tried following on my 8.0-CURRENT box:

8<8<
abbe [~] monte-cristo% exec sh
$ echo "^$PKG-[0-9,._]+$"
^-[0-9,._]+$
$ uname -a
FreeBSD monte-cristo.france 8.0-CURRENT FreeBSD 8.0-CURRENT #21: Mon Nov 10 
21:19:13 IST 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/ULE  amd64
>8>8

And as you can see in above paste, 'sh' doesn't evaluate $" as variable as 
it has evaluated $PKG as variable. this works with 'sh' shipped with 
8.0-CURRENT. Maybe some issue with your 'sh'.


HTH
--
Ashish Shukla


pgpY72ON7smC7.pgp
Description: PGP signature


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Polytropon
On Sat, 29 Nov 2008 00:53:32 -0800, Yuri <[EMAIL PROTECTED]> wrote:
> Polytropon wrote:
> > On Fri, 28 Nov 2008 23:26:51 -0800, Yuri <[EMAIL PROTECTED]> wrote:
> >   
> > If you need to use cdrecord, you can "preprocess" the .cdr
> > files with "sox -x". You can always use the "play" command
> > (from sox) to check what your files sound like.
> >   
> 
> 'sox -x' fails for some tracks with the message:
> sox formats: no handler for detected file type `video/x-unknown'

Strange... are these definitely audio CD tracks? You could
use this form to explicitely tell sox how to interpret the
data (which is "headerless" on audio CDs, of course):

sox -r 14400 -c 2 -b -L -S -x track.cdr track_rev.cdr

This describes CD audio as 14.4 kHz stereo 16 Bit (little
endian - to be swapped). From the manual:

   -1/-2/-3/-4/-8
  The sample datum size is 1, 2, 3, 4, or 8 bytes; i.e. 8, 16, 24,
  32, or 64 bits.

   The flags
  -b/-w/-l/-d  which are respectively aliases for -1/-2/-4/-8, and
  abbreviate byte, word, long word, double long (long long)  word,
  are retained for backwards compatibility only.

Seems like I'm a bit old fashioned. :-)



> and for some other tracks with these errors:
> sox mp3-duration: recoverable MAD error
> sox mp3-duration: MAD lost sync
> sox mp3-duration: recoverable MAD error
> sox mp3-duration: recoverable MAD error

This looks like that sox reads / generates MP3 files...?
Are these definitely standard audio CD tracks (such as every
old fashioned CD player can play)?




-- 
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: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Yuri

Polytropon wrote:

On Fri, 28 Nov 2008 23:26:51 -0800, Yuri <[EMAIL PROTECTED]> wrote:
  
If you need to use cdrecord, you can "preprocess" the .cdr

files with "sox -x". You can always use the "play" command
(from sox) to check what your files sound like.
  


'sox -x' fails for some tracks with the message:
sox formats: no handler for detected file type `video/x-unknown'

and for some other tracks with these errors:
sox mp3-duration: recoverable MAD error
sox mp3-duration: MAD lost sync
sox mp3-duration: recoverable MAD error
sox mp3-duration: recoverable MAD error


Yuri

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


Re: shell scripting problems

2008-11-29 Thread perryh
> In the shell script, i have a
>   pkg_info -qLx "^$PKG-[0-9,._]+$"
> also tried (-X)tended regex instead of the standard rege(-x).
>
> sh keeps erroring out saying various $" isn't a valid variable
> name ...

Both sh and csh will try to treat $ inside of "" as a variable
reference.  Does it work any better if you enclose the $ in ''
instead?

If you need the first $ to be a variable reference and the second
to be used literally, you may need to do something like

  "^$PKG-[0-9,._]+"'$'
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Copying audio CD with dd/cdrecord produces unplayable CD

2008-11-29 Thread Yuri

Polytropon wrote:


It sounds like "byte order reversal" which makes the typical noise.
In order to 1:1 copy a CD, I'd recommend the use of the cdrdao
tool - "cdrdao read-cd" and "cdrdao write" are the commands.
It's easy to use them in order to get a CD "at once" and then
reproduce it to blank media.

If you need to use cdrecord, you can "preprocess" the .cdr
files with "sox -x". You can always use the "play" command
(from sox) to check what your files sound like.

This is a sample command to turn .cdr files into .wav files,
just to illustrate the correct parameters for interpreting
the .cdr (CD audio data) format:

sox -r 14400 -c 2 -b -L -S ${OUTFILE}.cdr ${OUTFILE}.wav


  


Thank you Polytropon,
Byte order was really a problem.
Strange that burncd is supposed to take the original byteorder and
cdrecord takes reversed one.


I didn't try burncd since FreeBSD 4. Since then, I#m very
comfortable with cdrecord and cdrdao and the atapicam facility.
  


burncd is still recommended by handbook for ATAPI CDROMs
for some reason.
I feel like cdrecord is much nicer and once suggested to retire
burncd in handbook and to always recommend cdrecord instead.
But some people disagreed.

Thanks for your helpful response,
Yuri

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