Re: If the mirror sites (all four I've tried now from all over the world) have the FreeBSD 6.1 downloads contain the FreeBSD4.11 image, how is one supposed to download V6.1?

2007-09-27 Thread Giorgos Keramidas
% Date: Fri, 28 Sep 2007 12:23:28 +1200
% Message-ID: <[EMAIL PROTECTED]>
% From: Brett Davidson <[EMAIL PROTECTED]>
% Subject: If the mirror sites (all four I've tried now from all over the
% world)
% have the FreeBSD 6.1 downloads contain the FreeBSD4.11 image, how is 
one
% supposed to download V6.1?
% To: freebsd-questions@freebsd.org
%
% I, for one, would really like to get a copy of FreeBSD 6.1.
% :-)

Hi Brett,

Please do not include *MOST* of your message text in the subject and
then just a seemingly 'out of place' continuation of that text in the
email body.  It looks kind of silly in some mail readers, and it is
generally frowned upon by many 'old timers' of email :-)

Where did you look for the 'image' downloads?

I just connected to ftp.FreeBSD.org using Firefox, and the listing of
the directory at:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386

contains:

| Index of ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386
| 
|
| Up to higher level directory
| Directory: 2.2.9-RELEASE10/24/06  00:00:00
| Directory: 4.11 moved to ftp-archive10/24/06  00:00:00
| Directory: 5.0-CURRENT  10/24/06  00:00:00
| Directory: 5.3 has moved to ftp-archive 10/24/06  00:00:00
| Directory: 5.4 moved to ftp-archive 10/25/06  00:00:00
| Directory: 5.5-RELEASE  10/24/06  00:00:00
| Directory: 6.0 moved to ftp-archive 10/25/06  00:00:00
| Directory: 6.1-RELEASE  10/24/06  00:00:00
| Directory: 6.2-RELEASE  01/13/07  00:00:00
| Directory: ISO-IMAGES   10/24/06  00:00:00
| File: README.TXT  1 KB  11/23/05  00:00:00

The "ISO-IMAGES" directory contains ISO images for 6.1 and a few more
releases...

What seems to be the problem with finding non-6.1 releases?

- Giorgos

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


Re: Getting vim to work correctly.

2007-09-28 Thread Giorgos Keramidas
On 2007-09-28 13:45, Nikos Vassiliadis <[EMAIL PROTECTED]> wrote:
>On Friday 28 September 2007 11:56, Giorgos Keramidas wrote:
>>On 2007-09-27 23:05, Jay Chandler <[EMAIL PROTECTED]> wrote:
>>> Eric Schuele wrote:
>>>> On 09/27/2007 21:01, Jay Chandler wrote:
>>>>> Howdy.
>>>>> Sorry to keep hitting the list with questions today, but does anyone
>>>>> know how to get the home, delete, end, page up, etc. keys working
>>>>> correctly in vim?
>>>>>
>>>>> It works in Linux, drives me nuts in FreeBSD...
>>>>
>>>> They work perfectly fine here.  How is it you expect those keys to
>>>> behave?  Define "working correctly".
>>>
>>> When in insert mode, and pagedown is pressed, the letter the cursor is
>>> over is capitalized, and the editor is removed from insert mode, as an
>>> example.
>>>
>>> PageUp capitalizes the letter next to it, and again removes me from
>>> insert mode.
>>>
>>> Home randomly capitalizes letters and shifts the cursor to the next
>>> letter.
>>>
>>> Insert decapitalizes the letter the cursor is over.
>>>
>>> Weird behavior like this...
>
> Nothing weird, same here with every terminal I have installed(xterm,
> Eterm & konsole). You should instal Vim if you want the old behaviour.

Indeed.  After Nikos' post I reread the original.  Jay, what you are
describing is:

When in insert mode, and pagedown is pressed, the letter the
cursor is over is capitalized, and the editor is removed from
insert mode, as an example.

This is expected behavior if you are using /usr/bin/vi.

> Keep in mind that nvi is a different program.  Why don't you
> install Vim?

Indeed, if vim's behavior is desired, then it may be a good idea to
install vim.  I usually keep around an installation of editors/vim-lite
for those rare occassions that I have managed to break my local Emacs
installation beyond repair :-)

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


Re: Getting vim to work correctly.

2007-09-28 Thread Giorgos Keramidas
On 2007-09-27 23:05, Jay Chandler <[EMAIL PROTECTED]> wrote:
> Eric Schuele wrote:
>> On 09/27/2007 21:01, Jay Chandler wrote:
>>> Howdy.
>>> Sorry to keep hitting the list with questions today, but does anyone
>>> know how to get the home, delete, end, page up, etc. keys working
>>> correctly in vim?
>>> 
>>> It works in Linux, drives me nuts in FreeBSD...
>>
>> They work perfectly fine here.  How is it you expect those keys to
>> behave?  Define "working correctly".
>
> When in insert mode, and pagedown is pressed, the letter the cursor is
> over is capitalized, and the editor is removed from insert mode, as an
> example.
> 
> PageUp capitalizes the letter next to it, and again removes me from
> insert mode.
> 
> Home randomly capitalizes letters and shifts the cursor to the next
> letter.
> 
> Insert decapitalizes the letter the cursor is over.
> 
> Weird behavior like this...
> 
> I was mistaken in that this is in vim-- this is in the natural version
> of vi that ships with the base OS.
> 
> This is happening from PuTTY in default setting mode on a Windows
> box-- my MacBook is relatively better behaved.

This is usually a configuration error related to the $TERM setup of the
client, so what's your terminal set to in the PuTTY setup of Windows?

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


Re: Adding CR/LF

2007-09-30 Thread Giorgos Keramidas
On 2007-09-28 18:34, [EMAIL PROTECTED] wrote:
> I know this should be easy, but I cannot get it to work right.
> Basically, I have a list of items, and I need to place each one on a
> separate line.
> 
> Here is the script I am using.
> #!/bin/sh
> FILENAMES="test1 test2 test3"
> FILELIST=""
> for filename in ${FILENAMES}
> do
> FILELIST="${FILELIST}${filename}"$'\n\r'
> echo ${FILELIST}
> done
> 
> And, here is the output I am getting.
> test1$\n\r
> test1$\n\rtest2$\n\r
> test1$\n\rtest2$\n\rtest3$\n\r
> 
> The output I would like to see is:
> test1
> test2
> test3

How about skipping the trick with '\n\r' altogether?

This should work better:

#!/bin/sh

FILENAMES="test1 test2 test3"

for fname in ${FILENAMES}
do
echo "${fname}"
done

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


Re: 7.0-CURRENT Ports Collection?

2007-09-30 Thread Giorgos Keramidas
On 2007-09-29 20:15, Aryeh Friedman <[EMAIL PROTECTED]> wrote:
>On 9/29/07, Kris Kennaway <[EMAIL PROTECTED]> wrote:
>>Aryeh Friedman wrote:
>>> Are you attempting to download ports on 6.2 before you move to 7 or on
>>> 7?  If the and your on a SMP (dual core don't know about physically
>>> seperate) there are some known issues in the protocol stack
>>
>> Er, what issues, pray tell? :)
>
> Namely hangs and lacks of connects (in some cases you will need to
> manually fetch the dist file [it may take several attempts {*DO NOT*
> erase the old dist file after each attempt}])

That's odd.  Are you sure this is a bug in 6.2, and not some local
networking setup problem?

If you have tcpdumps and/or other useful data to track this down, then
please open a bug report, as 6.2 is used by _many_ people and a bug like
this would be annoying.

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


Re: oops (was Re: what cpu type to use for a intel duo e6850 (i386 or amd64))

2007-09-30 Thread Giorgos Keramidas
On 2007-09-30 07:24, Aryeh Friedman <[EMAIL PROTECTED]> wrote:
> well the procedure *ALMOST* worked turns out that sysinstall
> clobbers any unmodified bsdlabels (bug?)

Which 'procedure' would that be?

You haven't quoted anything from the previous messages, and your mailer
hasn't included an In-Reply-To header to help us track down previous
posts of the same thread by searching the list archives.

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


Re: Adding CR/LF

2007-10-01 Thread Giorgos Keramidas
On 2007-09-29 19:54, Chad Perrin <[EMAIL PROTECTED]> wrote:
> By the way, though, I think the CRLF characters were backwards in the
> original post of this thread, which used "\n\r".  I'm pretty sure it's
> "\r\n" as I've done it.  I may just be having a stupid day, though,
> and be getting them backwards myself.

You are right AFAIK (that is, "\r\n" is more common than "\n\r").

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


Re: question about Postfix

2007-10-03 Thread Giorgos Keramidas
On 2007-10-02 16:12, jekillen <[EMAIL PROTECTED]> wrote:
> On Oct 1, 2007, at 7:58 PM, Joe in MPLS wrote:
>> The package install of postfix does nothing to sendmail. It's not
>> like the MTA switch utility found in some linux distros. Just turn
>> off the various bits of sendmail in /etc/rc.conf and start postfix.
>> 
>> Postfix does include an executable named "sendmail" that directly
>> replaces some of the "old" sendmail capability.
> 
> This is what is confusing me some. I have a text from SAMS on Postfix
> and it talks about renaming several sendmail related files and
> removing the suid permissions on them.

That book is out of date -- at least as far as FreeBSD is concerned.
We don't rename stuff in FreeBSD, because we have mailwrapper(8) :)

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


Re: Sendmail IP interface assignment -- how to?

2007-10-04 Thread Giorgos Keramidas
On 2007-10-04 10:32, Rob <[EMAIL PROTECTED]> wrote:
>Matthew Seaman wrote:
>> You also need:
>> FEATURE(no_default_msa)
>> otherwise, you're definitely heading in the right direction.
> 
> Thanks, Matthew!  That was the piece I was missing.  I tried my
> Daemon_Options above, but found out its presence does not disable the
> default config to listen on all interfaces.  I got it working by
> directly editing the .cf, but your trick does it from the macro
> config.
> 
> The final result ended up as:
> FEATURE(no_default_msa)dnl  # turn off MSA on all ports; only ue what's in 
> Daemon_Options
> DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA')
> DAEMON_OPTIONS(`Port=smtp,Addr=172.23.23.10,Name=MTA')
> DAEMON_OPTIONS(`Port=2525,Addr=172.23.23.10,Name=MTA')dnl  # smtp on alt port
> DAEMON_OPTIONS(`Port=587,Addr=127.0.0.1,Name=MSA,M=E')
> 
> Once I knew the right keywords to google, I found this article that might 
> be of use to others:  "Five Tips for a Better sendmail Configuration"
> http://www.onlamp.com/pub/a/onlamp/2004/01/15/sendmail.html?page=1

Interesting bit of online posting, but watch out for misinformation or
even outdated information though.

The article may seem useful for `no_default_msa', but it also contains a
wealth of bogus stuff like:

"There are good reasons to compile your own copy of sendmail
instead of using the copy provided to you as part of your
Unix distribution.  First, the copy of sendmail included in
your Unix distribution is probably grossly out of date.
sendmail changes frequently, and some of these changes
provide critical security fixes. Sticking with an outdated
copy of sendmail is just asking for trouble."

In the case of FreeBSD, this is usually wrong, and bad advice.  We have
a pretty active Sendmail maintainer, Gregory Shapiro, who is also part
of the Sendmail development team.  Whenever a new release of Sendmail is
out, Mr. Shapiro updates the Sendmail version of FreeBSD-CURRENT and
after a reasonable amount of testing (usually a few days, to make sure
nothing was broken) "backports" the upgraded version to FreeBSD-STABLE.

The quoted paragraph may be true for a semi-random Linux distribution,
but this is FreeBSD; we don't usually do stuff by "manually compiling
and merrily hacking away at whatever we fancied this afternoon" :-)

Just $0.02 of a long-time Sendmail fan,

- Giorgos

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


Re: Managing very large files

2007-10-04 Thread Giorgos Keramidas
On 2007-10-04 08:43, Steve Bertrand <[EMAIL PROTECTED]> wrote:
> Hi all,
> I've got a 28GB tcpdump capture file that I need to (hopefully) break
> down into a series of 100,000k lines or so, hopefully without the need
> of reading the entire file all at once.
> 
> I need to run a few Perl processes on the data in the file, but AFAICT,
> doing so on the entire original file is asking for trouble.
> 
> Is there any way to accomplish this, preferably with the ability to
> incrementally name each newly created file?

Depending on whether you want to capture only specific parts of the dump
in the 'split output', you may have luck with something like:

tcpdump -r input.pcap -w output.pcap 'filter rules here'

This will read the file sequentially, which can be slower than having it
all in memory, but with a huge file like this it is probably a good idea :)

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


Re: Equations

2007-10-06 Thread Giorgos Keramidas
On 2007-10-05 15:03, Frank Jahnke <[EMAIL PROTECTED]> wrote:
>On Fri, 2007-10-05 at 23:34 +0200, [EMAIL PROTECTED] wrote:
>> I am always a bit surprised that TeX was released in 78 (before my
>> birth!) and---despite its algorithms are published---its output
>> quality remains unmatched [1] by common programs. Why these programs
>> do not apply TeX's strategies to solve their problems? This makes me
>> wonder.
> 
> This is a good question.  TeX didn't really hit its stride until about
> 1989 (with Metafont and the language freeze), and the effort learned a
> lot from troff.  Nevertheless, I am always struck by how ugly is the
> type that Word produces.  You can always tell.  I've read about how
> sophisticated its algorithm for this or that is, but the end result is
> terribly inferior to both troff and TeX.
> 
> I don't really know why -- and it extends beyond the hyphenation
> algorithm to things like inter-word kerning and type face formation --
> but I just don't like the way Word documents look.  Maybe one of these
> days I'll look into it.  I also find the insistence of the TeX
> community to use the dreadful CM font family to be misguided.  There's
> a reason that the classical fonts are classics.

As far as journals are concerned, I think the insistence about CM fonts
is usually an attempt to "keep the original style of the journal", and
not so much a lack of respect for the beauty of classic font families.

Since the first releases of TeX, there have been many interesting
developments about font-handling in the TeX world, like the typeface
definitions of ConTeXt, and the drop-in packages of LaTeX which allow
one to use Palatino, Helvetica, and other classic fonts.

This is getting off-topic for the original topic, but I learnt something
new (about the LyX wiki), so -- at least for me -- it was worth it :)

Giorgos

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


Re: C++ Compiler On FreeBSD

2007-10-06 Thread Giorgos Keramidas
On 2007-10-06 20:53, James Jeffery <[EMAIL PROTECTED]> wrote:
> Evening to you all (or morning in some parts of the world).
> 
> Im learning C++ from Sams Teach Yourself C++, now many will call this
> a dumb method, and the books pointless and stupid, but i have no
> knowledge of any lower level languages, so i do need to be spoon fed
> the basics.
> 
> Im using Borland C++ compiler on XP and was wondering what compilers
> there are for FreeBSD that would allow me to compile and execute some
> of the examples i will practise from the book.

The base system of FreeBSD includes g++ (the GNU C++ Compiler), and
there are several versions of the GNU C++ compiler in the ports too:

$ pwd
/usr/ports/lang
$ ls -ld gcc[0-9]*
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc28
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc295
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc32
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc33
drwxr-xr-x  3 root  wheel  - 512 Oct  4 18:43 gcc34
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc40
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc41
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc41-withgcjawt
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc42
drwxr-xr-x  3 root  wheel  - 512 Sep 21 19:51 gcc42-withgcjawt
drwxr-xr-x  3 root  wheel  - 512 Oct  2 16:32 gcc43
$


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


Re: Equations

2007-10-07 Thread Giorgos Keramidas
On 2007-10-06 08:50, Frank Jahnke <[EMAIL PROTECTED]> wrote:
>On Sat, 2007-10-06 at 12:22 +0300, Giorgos Keramidas wrote:
>> Since the first releases of TeX, there have been many interesting
>> developments about font-handling in the TeX world, like the typeface
>> definitions of ConTeXt, and the drop-in packages of LaTeX which allow
>> one to use Palatino, Helvetica, and other classic fonts.
> 
> I figured this was the case, and it makes a difference.  This is OT,
> but do you have a link that describe what font families are available?
> I assume the Postscript base set is easy.  But how about the others?
> 
> Continuing the OT, it is also interesting that the desktop publishing
> applications that I am aware of (an that is certainly incomplete) do
> not handle equations very well either.  Scribus didn't the last time I
> looked; Frame might but that is not really an option.

ConTeXt includes several pre-defined `typescripts'.  If you want to read
more details about fonts in ConTeXt, then the wiki of ConTeXt may be
useful; especially the pages:

http://wiki.contextgarden.net/Fonts
http://wiki.contextgarden.net/TypeScripts

One of the examples which I like a lot is the installation of `Lucida'
fonts in ConTeXt:

http://wiki.contextgarden.net/Lucida

The font installation instructions use Windows-like pathnames, but they
are easy to translate to `Unix-speak' too :-)

To answer the original questions:

``what font families are available?''
``I assume the Postscript base set is easy.''

There are several typescripts available as predefined typescripts in
ConTeXt.  A nice demo of these typescripts in action can be found at:

http://www.pragma-ade.com/general/manuals/showfont.pdf

This example PDF includes a typescript demo which uses the standard
PostScript(TM) fonts (Times, Courier, and Helvetica) too :-)

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


Re: X (xorg 7.3) consumes all the CPU

2007-10-10 Thread Giorgos Keramidas
On 2007-10-09 22:01, Paul Schmehl <[EMAIL PROTECTED]> wrote:
> Is there a way to start a process so that memory and CPU usage can be
> tracked closely enough to determine what the cause of 100% CPU use
> would be?  I've got a box, recently installed 6.2 RELEASE with xorg
> 7.3 installed, and when X is started, CPU goes to 100% and stays
> there.
> 
> Here's the bad machine
> 1510 pauls 1   00   277M  7076K rdnrel 0  13:41 100.05% Xorg
> 
> Here's my desktop
>  868 root  1  960   202M   134M select 119:09  0.00% Xorg
> 
> As you can see, memory and CPU use is sky high on the "bad" box.
> Rather than blow it away and reinstall, I'd like to try to figure out
> what's wrong and fix it.  What utilities could I use to do that?

Are you running `powerd' in `adaptive' mode on the 100%-CPU system?

I've seen this happening on FreeBSD 7.0-CURRENT a few times, when
powerd(8) lowered the CPU frequency to a minimum and X.org started
consuming 100% CPU.

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


Re: batch conversion of TeX

2007-10-12 Thread Giorgos Keramidas
On 2007-10-12 09:44, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
> Those who have followed my openoffice to TeX conversion know I am brand
> new to TeX and want to know how to do the following conversions
> (hopefully via some non-interactive process [eg. Make files]):
>
> TeX-->plain text
> TeX-->HTML
> TeX-->PDF
> TeX-->PS

I usually start by writing something like this in a Makefile:

DOC = foo
SRC = $(DOC).tex
PDF = $(DOC).pdf

PDFLATEX = pdflatex

all: $(PDF)

$(PDF): $(SRC)
$(PDFLATEX) $(SRC)
$(PDFLATEX) $(SRC)

The two runs of $(PDFLATEX) are necessary to get cross-references
correct in documents with internal cross-references.

There are other tools, like texindex(1) which you may want to throw into
the mix.  The TeX toolchain is described in detail in the documentation
which is available online at CTAN (the Comprehensive TeX Archive
Network).  It may be interesting for you to at least skim through the
docs available at http://www.ctan.org/tex-archive/info/

All the books available at the `info' directory are useful, and many of
them are excellent examples of what you can do by typesetting with TeX.

Some of my favorites are:

  * ``Components of TeX''
http://www.ctan.org/tex-archive/info/components-of-TeX/

  * ``Essential information for writing LaTeX documents''
http://www.ctan.org/tex-archive/info/latex-essential/

  * ``Making TeX Work''
http://www.ctan.org/tex-archive/info/makingtexwork/

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


Re: help with text-append over SSH ?

2007-10-12 Thread Giorgos Keramidas
On 2007-10-11 16:49, Juri Mianovich <[EMAIL PROTECTED]> wrote:
>
> I have an account on a system where I cannot log in over SSH, but I
> _can_ run a limited set of commands remotely, over SSH.  (I am in a
> jail of some sorts).
>
> I want to append the contents of a local text file to the contents of
> a remote text file, over SSH.
>
> Normally, I would do this locally with:
>
> cat file1 >> file2
>
> But again, file2 is remote, and I can't log in there... I have access
> to the 'echo' command and the 'dd' command (among others) on the
> remote host ... so for instance, I can do things like this:
>
> ssh [EMAIL PROTECTED] rm -rf filename
>
> So, with all that in mind, how do I append the contents of a local
> file to a remote file, over SSH, using either 'echo' or 'dd' ?

Try running:

cat file1 | ssh [EMAIL PROTECTED] "dd >> file2"

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


Re: help with text-append over SSH ? - dd: unknown operand >>

2007-10-15 Thread Giorgos Keramidas
On 2007-10-12 16:43, Juri Mianovich <[EMAIL PROTECTED]> wrote:
>--- Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
>>On 2007-10-11 16:49, Juri Mianovich
>><[EMAIL PROTECTED]> wrote:
>>>
>>> I have an account on a system where I cannot log in over SSH, but I
>>> _can_ run a limited set of commands remotely, over SSH.  (I am in a
>>> jail of some sorts).
>>>
>>> I want to append the contents of a local text file to the contents
>>> of a remote text file, over SSH.
>>>
>>> Normally, I would do this locally with:
>>>
>>> cat file1 >> file2
>>>
>>> But again, file2 is remote, and I can't log in there... I have
>>> access to the 'echo' command and the 'dd' command (among others) on
>>> the remote host ... so for instance, I can do things like this:
>>>
>>> ssh [EMAIL PROTECTED] rm -rf filename
>>>
>>> So, with all that in mind, how do I append the contents of a local
>>> file to a remote file, over SSH, using either 'echo' or 'dd' ?
>> 
>> Try running:
>> 
>> cat file1 | ssh [EMAIL PROTECTED] "dd >> file2"
> 
> Thank you - I do indeed need to use 'dd' because I don't have access
> to 'cat' in the chroot.
> 
> However, when I use your example, I get this error:
> 
> dd: unknown operand >>
> 
> So I have something off a bit ... help ?

Then you are not running a 'standard shell', but some sort of local
hack and/or wrapper:

kobe-> ssh server "echo 'hello world' > foo"
kobe-> ssh server "od -c foo"
000   h   e   l   l   o   w   o   r   l   d  \n
014
kobe-> echo hello new world | ssh server "dd >> foo"
0+1 records in
0+1 records out
kobe-> ssh server "od -c foo"
000   h   e   l   l   o   w   o   r   l   d  \n   h   e   l   l
020   o   n   e   w   w   o   r   l   d  \n
034
kobe->

I'm sorry, but I don't think you can get effective "help" from the
FreeBSD lists.  You will have to ask for specific guidelines and help
from your hosting provider.  Anything else will be guesswork and may
break without any sort of notice in the future, when your host decides
to install a "new" "security fix" to their custom shell.

- Giorgos

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


Re: coonverting text to tex

2007-10-15 Thread Giorgos Keramidas
On 2007-10-15 09:49, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
> Are there any utils that will convert plain text to TeX?

It depends on how much you can "compromise" about the quality and
typesetting beauty of the output.

A naive approach would be something like:

\documentclass{article}
\begin{document}
\begin{verbatim}

insert your text file here

\end{verbatim}
\end{document}

But this may not result in a typeset document that is as aesthetically
pleasing and beautiful as one which has been formatted by carefully
picking the typesetting commands you can use.

As an example, try typesetting the two documents which are listed below,
and see which one you prefer:

% --

% document1.tex

\documentclass{article}
\begin{document}
\begin{verbatim}

Happy families are all alike; every unhappy family is unhappy
in its own way.

Everything was in confusion in the Oblonskys' house.  The
wife had discovered that the husband was carrying on an
intrigue with a French girl, who had been a governess in
their family, and she had announced to her husband that she
could not go on living in the same house with him.  This
position of affairs had now lasted three days, and not only
the husband and wife themselves, but all the members of their
family and household, were painfully conscious of it.  Every
person in the house felt that there was no sense in their
living together, and that the stray people brought together
by chance in any inn had more in common with one another than
they, the members of the family and household of the
Oblonskys.  The wife did not leave her own room, the husband
had not been at home for three days.  The children ran wild
all over the house; the English governess quarreled with the
housekeeper, and wrote to a friend asking her to look out for
a new situation for her; the man-cook had walked off the day
before just at dinner time; the kitchen-maid, and the
coachman had given warning.

\end{verbatim}
\end{document}

% --

% document2.tex

\documentclass{article}

\usepackage{palatino}

\title{Anna Karenina}
\author{Leo Tolstoy}
\date{18xx}

\begin{document}
\maketitle

Happy families are all alike; every unhappy family is unhappy
in its own way.

Everything was in confusion in the Oblonskys' house.  The
wife had discovered that the husband was carrying on an
intrigue with a French girl, who had been a governess in
their family, and she had announced to her husband that she
could not go on living in the same house with him.  This
position of affairs had now lasted three days, and not only
the husband and wife themselves, but all the members of their
family and household, were painfully conscious of it.  Every
person in the house felt that there was no sense in their
living together, and that the stray people brought together
by chance in any inn had more in common with one another than
they, the members of the family and household of the
Oblonskys.  The wife did not leave her own room, the husband
had not been at home for three days.  The children ran wild
all over the house; the English governess quarreled with the
housekeeper, and wrote to a friend asking her to look out for
a new situation for her; the man-cook had walked off the day
before just at dinner time; the kitchen-maid, and the
coachman had given warning.

\end{document}

% --

The second version includes more macros/commands which I manually
typed, but it probably looks better when typeset.

- Giorgos

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


Re: how to make a patch

2007-10-17 Thread Giorgos Keramidas
On 2007-10-16 15:10, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
> I found and fixed a bug in one of the ports how do I make a patch file
> (I only changed one line in one file) and who do I send it to?

If you know precisely the file, you can use diff(1) to generate the
patch file.

Note that patch files for ports have to be constructed in a "special"
way, so that the "make patch" target can find them and apply them
correctly.

  1. Keep a copy of the patched file around, i.e. at `/tmp/foo.c'

  2. Clean-up the "work" subdirectory of the port, and extract a clean
 version of the port's patched source:

 # cd /usr/ports/editors/foobar
 # rm -fr work
 # make patch

  3. Enter the work/foobar-1.0 build directory of the port, and save the
 original, unpatched file you want to modify at port-build-time:

 # cd work/foobar-1.0
 # cp src/foo.c src/foo.c.orig

  4. Now overwrite the build-tree copy of `foo.c' with the saved copy
 from step 1.

 # cp /tmp/foo.c src/foo.c

  5. Use the diff utility from within the `work/foobar-1.0' tree to
 generate a ports-based patch:

 # pwd
 /usr/ports/editors/foobar/work/foobar-1.0
 # diff -u src/foo.c.orig src/foo.c > /tmp/patch-src-foo.c

  6. Now that you have the 'fix' as a patch in /tmp/patch-src-foo.c, you
 can remove the temporary `work' directory of the port, and install
 the patch in `files' as a normal ports-based-patch:

 # cd /usr/ports/editors/foobar
 # rm -fr work
 # cp -i /tmp/patch-src-foo.c files/

 If there's already an existing `patch-src-foo.c' file in `files',
 the last command will prompt you for overwriting the old patch.
 Don't do it.  Just pick a non-conflicting name for the second patch
 which applies on top of `src/foo.c', i.e.:

 # cp -i /tmp/patch-src-foo.c files/patch-src-foo.c-bugfixname

 where `bugfixname' is a tag which can help the port maintainers
 understand why this patchfile is needed.

After you have installed `patch-src-foo.c' in the `files' subdirectory
of the port, you should be able to run:

 # cd /usr/ports/editors/foobar
 # make patch

and your patchfile should be applied automatically.

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


Re: Why 7.0 is so late ?

2007-10-18 Thread Giorgos Keramidas
On 2007-10-17 18:20, Gueven Bay <[EMAIL PROTECTED]> wrote:
>2007/10/17, Wojciech Puchar <[EMAIL PROTECTED]>:
>>> while companies like Microsoft must publish in time to make the
>>> share holders
>>
>> not to mention that microsoft regularly has delays like year.
>>
>>> happy, FreeBSD can afford to wait until the programmers are
>>> convinced that their work is good enough for the public.
>
> Please,
> stop mentioning this company in every discussion that "seems" to
> "attack" *BSD in some way.

That's not a bad suggestion, in fact.  The development process of
Microsoft is not open to the world (like the one used by the FreeBSD
Project as a team), so there is no easy way to determine how similar
or different processes are behind the development and release process
of the two development teams.

Educated guesses can always be made, but let's try not to compare apples
to oranges too much :)

> Discussing M. - especially their development processes or business
> tactics - does not accomplish anything for us.

True, in a way.

> First acknowledge that FBSD 7 is late. The estimate was for 5 months
> ago. And if I say to someone I want to meet him at 8 o'clock but
> arrive 78 hours later, then I am late. Period.

The release of 7.0-RELEASE *is* late.  There are various reasons why
this has happened, but we are steadily getting there.  We now have a
RELENG_7 branch, and things are only "merged from current" after
explicit approval by the release-engineering team.  The branch is in the
hands of the RE team, and many issues which were plaguing "HEAD" during
the summer have been fixed now.

> So, but the original question was : What is not working _now_  at this
> moment so that 7 cannot be released _now_ ?
>
> The original question was not (I repeat NOT): Which  international
> conspiracy is holding up the developers of FreeBSD 7 from releasing?
> Without discussing M. or the Illuminati and U.F.O.s and with that
> guaranteeing that the original question will never be answered you can
> concentrate on answering OR you can take your "finger" from the reply
> button/menue point/whatever and wait that maybe a developer will read
> the original posters mail and answer it.
>
> With a curious eye waiting for a real answer to the original question...

Traditionally, "BSD" has released stuff "when it was ready" and not when
some marketting team decided that they wanted to release.  The FreeBSD
team has made genuine efforts towards changing this to a more timely
release schedule (18 months for a new "major" release), but there have
been some important bits of kernel and userland which were a bit
unstable and/or were in development until now.

Without treading on the feet of the release-engineering team, by writing
stuff which they have not approved, let me just say that we have made a
lot of positive progress towards a release since last June/July and we
expect getting a release during the last remaining months of 2007.

There's still a lot of work to do (i.e. ports to be compiled, tested,
fixed, or marked as "BROKEN" with the new gcc 4.X compiler suite), but
we're getting there.

- Giorgos

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


Re: batch conversion of TeX

2007-10-18 Thread Giorgos Keramidas
On 2007-10-18 11:42, Murray Taylor <[EMAIL PROTECTED]> wrote:
>Giorgos Keramidas wrote:
>> I usually start by writing something like this in a Makefile:
>>
>> DOC = foo
>> SRC = $(DOC).tex
>> PDF = $(DOC).pdf
>>
>> PDFLATEX = pdflatex
>>
>> all: $(PDF)
>>
>> $(PDF): $(SRC)
>> $(PDFLATEX) $(SRC)
>> $(PDFLATEX) $(SRC)
>>
>> The two runs of $(PDFLATEX) are necessary to get cross-references
>> correct in documents with internal cross-references.
>
> the latex-mk port handles a lot of these functions
> /usr/ports/misc/latex-mk
>
> I uses it for all my docs
>
> make  # generates a DVI file and calls a viewer
> make ps
> make pdf
> make html # settable options re single page - multi page
> make draft-pdf# overprints DRAFT - use this if you are not using the
>
>   #  \usepackage{draftcopy} which gives you more
> flexibility
> make print# spools off to lp
> make clean
>
> And there are other available targets for the Make process.

Very interesting.  Thanks :)

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


Re: Ref : Permission to use parts of FreeBSD documentation on My Website

2007-10-18 Thread Giorgos Keramidas
On 2007-10-18 02:04, allen paul <[EMAIL PROTECTED]> wrote:
> Hi,
> I working on compiling Linux kernel and related issues, I was
> interested in using the some documentation on FreeBSD site.  I needed
> permission if I could post some of the documentation on my website.

The documentation is BSD licensed; see for example:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/LEGALNOTICE.html

So feel free to (re)use parts of it, under the terms of the BSD license.

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


Re: Ref : Permission to use parts of FreeBSD documentation on My Website

2007-10-18 Thread Giorgos Keramidas
On 2007-10-17 17:31, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>allen paul wrote:
>> Thank you, That was the peice of information I was looking for.
>> Sure, I will respect proper credits, and skip copyrighted
>> information.  I might have been mistaken if I mistook BSD
>> documentation as freely distributed information under GNU license.
>> But, as long as I can post a few Kernel related excerpts, I think I
>> am good.
>
> In general your going to find BSD a more permissive license then GPL
> (for sure less viral).  Contact me privately if you need a good
> background references this as well other possible licensing options
> you may have.

... or ask here, on the freebsd-questions mailing list.  There is no
reason why a discussion about the way the BSD license works would be
kept `private' in personal mailboxes :)

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


Re: Why 7.0 is so late ?

2007-10-19 Thread Giorgos Keramidas
On 2007-10-18 18:31, Robert Huff <[EMAIL PROTECTED]> wrote:
>Jerry McAllister writes:
>>> I'd much rather that a RELEASE version is as stable as it can
>>> reasonably be made than that it arrives "on time".
>>
>> Yup.  I think that is the way all of us feel.
>
> I don't think many will argue, at least not loudly.  However ... many
> also have bad memories of 5.0, and the grim firm desire to never
> let that happen again.

Indeed.  That's one of the most important driving forces between trying
to push major releases out with a period of "around 18 months" ;)

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


Re: sendmail problems

2007-10-19 Thread Giorgos Keramidas
On 2007-10-19 00:23, Steve Bertrand <[EMAIL PROTECTED]> wrote:
>Duane Winner wrote:
>> Hello,
>>
>> I need help to resolve a problem with my sendmail server.
>
> Usually when 'sendmail' is in a subject line, one can usually expect
> Giorgos respond :)

Thanks Steve, I'm honored by the confidence :)

I've been having network connectivity issues and fell a lot back in my
email backlog.  I'm back online, with a better setup now, so things will
start improving I guess.

> This is not a Sendmail issue, per-se.

You are right about that.  The original email by Duane Winner said:

I need help to resolve a problem with my sendmail server.

In my /var/log/maillog, I've been seeing:

sm-mta[1753]: l9H4EoAn001753: outbound-mail-10.bluehost.com
[69.89.17.210] did not issue MAIL/EXPN/VRFY/ETRN during connection
to IPv4

This usually means that there is an incoming connection from the host
outbound-mail-10.bluehost.com, whose IP address is 69.89.17.210, but the
connection was lost before the host managed to issue any commands to
deliver email, query for alias expansion, and so on.

Whenever I've seen this happening, it is usually some sort of network
setup error, broken routing, a misconfigured router in the path between
the originating host (outbound-mail-10.bluehost.com) and Sendmail, or
something similar.

> If we can take this back one step to re-evaluate the entire situation
> it may help:
>
> - what is the domain you are seeing issues with (are there more than
>   one? If so, are they on the same box/IP?)
> - what IP is this domain's mail operating on
> - examples of domains you see problems with, and examples of those you don't
> - is it only mailing lists you have problems with
> - do you receive this email I am sending on the problematic server
>
> Do you have another site that you can confirm working/not working?

Good points :)

Duane, can you respond to the questions of Steve above?  They will at
least provide us with hints to start troubleshooting this better.

- Giorgos

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


Re: Want to upgrade sendmail in next OS release

2007-10-21 Thread Giorgos Keramidas
On 2007-10-21 11:28, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'd like to upgrade my sendmail version in advance of upgrading to the
> next release of the OS.

Why?

> # cd /usr/src/lib/libsm
> # make obj && make depend && make
> # cd /usr/src/lib/libsmutil
> # make obj && make depend && make
> # cd /usr/src/usr.sbin/sendmail
> # make obj && make depend && make && make install

This can be done only if you manage to upgrade Sendmail sources and
their build-glue manually, by following *exactly* the same process that
Gregory Shapiro (our native Sendmail maintainer) uses to do it.

You are also missing some parts of Sendmail above, like:

/usr/src/bin/rmail
/usr/src/usr.bin/vacation
/usr/src/etc/sendmail

The upgrade process used by Gregory Shapiro and the normal 'buildworld'
cycle takes care of all that and more.

Why would you want to circumvent it, and risk breaking Sendmail?

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


Re: Want to upgrade sendmail in next OS release

2007-10-22 Thread Giorgos Keramidas
On 2007-10-21 16:42, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> wrote:
>>On 2007-10-21 11:28, "Tuc at T-B-O-H.NET" <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I'd like to upgrade my sendmail version in advance of upgrading to the
>>> next release of the OS.
>>
>> Why?
>
> I can afford the time to start/stop sendmail here and there, but I
> have to schedule the maintenance window to upgrade this particular
> machine.

I see.  I'd still go for the maintenance window option, unless there is
a _very_ pressing need to upgrade Sendmail *today* because of a security
update, but you have a point :)

>>> # cd /usr/src/lib/libsm
>>> # make obj && make depend && make
>>> # cd /usr/src/lib/libsmutil
>>> # make obj && make depend && make
>>> # cd /usr/src/usr.sbin/sendmail
>>> # make obj && make depend && make && make install
>>
>> This can be done only if you manage to upgrade Sendmail sources and
>> their build-glue manually, by following *exactly* the same process that
>> Gregory Shapiro (our native Sendmail maintainer) uses to do it.
>
> So where do I find that? I took those instructions from previous
> FreeBSD Security announcements against sendmail.

The process is described in `/usr/src/contrib/sendmail/FREEBSD-upgrade',
but it takes a certain amount of experience with CVS and merging.  Even
if you don't really want to use CVS to merge the changes yourself, the
list of build/install/runtime infrastructure files near the end of this
file will prove veery useful.  Quoting from a recent copy:

% The following files make up the sendmail build/install/runtime
% infrastructure in FreeBSD:
%
% Makefile.inc1
% bin/Makefile
% bin/rmail/Makefile
% contrib/sendmail/
% [...]

>> You are also missing some parts of Sendmail above, like:
>>
>>  /usr/src/bin/rmail
>>  /usr/src/usr.bin/vacation
>>  /usr/src/etc/sendmail
>
>   rmail - 99% of delivery is procmail, but good point.
>   vacation - Not used
>   etc/sendmail - I don't use default mc's, and don't mind
>   running older cf's on a newer version. The
>   change between 8.13 and 8.14 wasn't enough for
>   us to need to.

Interesting bits of that list are:

lib/libmilter/Makefile
lib/libsm/Makefile
lib/libsmdb/Makefile
lib/libsmutil/Makefile
libexec/mail.local/Makefile
libexec/smrsh/Makefile
usr.bin/vacation/Makefile
usr.sbin/editmap/Makefile
usr.sbin/mailstats/Makefile
usr.sbin/makemap/Makefile
usr.sbin/praliases/Makefile
usr.sbin/sendmail/Makefile
usr.sbin/mailwrapper/Makefile

For future upgrades of Sendmail, it would probably be a good idea to
upgrade the libraries *first* and only when you are done building the
new libraries to install everything.

It may be possible to build everything with MAKEOBJDIRPREFIX='/usr/obj',
and install in one go when you are done with everything, but that's
something you should probably experiment a bit with -- preferrably in a
test machine, before you do the same on a live system.

> In the mean time, I got bored, so I did just that. Seems to be working
> fine, has processed about 15K emails since.

Neat :)

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


Re: Q: general LaTeX mailing list

2007-10-23 Thread Giorgos Keramidas
On 2007-10-23 12:43, Byung-Hee HWANG <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> Who knows a good general LaTeX mailing list? Ah yes, here is also good
> mailing list for the question. However, I want to give specific and
> professional advice about LaTeX. Unfortunately, Google disappointed my
> desire ;;

If you don't have a dislike for newsgroups, then ``news:comp.text.tex''
is a pretty good choice.

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


Re: Mentor for C self study wanted

2007-10-24 Thread Giorgos Keramidas
On 2007-10-23 23:24, Harald Schmalzbauer <[EMAIL PROTECTED]> wrote:
> Thanks all,
> here was my example, just for completeness, I found mentors for my
> needs.

> #include 
>
> void main()
> {
>   short nnote;
>
>   // Numerischen Notenwert einlesen
>   printf("Bitte numerischen Schulnotenwert eingeben: ");
>   scanf("%d",&nnote);

You are passing "%d" to scanf() so it expects to find enough 'storage'
in its pointer argument for an 'int'.  If 'short' happens to have a
smaller size (as is commonly the case), scanf() will overwrite random
memory locations after 'nnote'.  On systems where 'nnote' is stored in
the stack (because it's an automatic/local variable of main()), you are
risking stack corruption (and a SEGFAULT *may* happen).

It's also a very good idea to check the return code of scanf():

int nnote;

if (scanf("%d", &nnote) != 1) {
error;
}

>   switch (nnote)
>   {
> case 1: printf("Die Note %d entspricht sehr gut.",nnote);
> break;
> case 2: printf("Die Note %d entspricht gut.",nnote);
> break;
> case 3: printf("Die Note %d entspricht befriedigend.",nnote);
> break;
> case 4: printf("Die Note %d entspricht ausreichend.",nnote);
> break;
> case 5: printf("Die Note %d entspricht mangelhaft.",nnote);
> break;
> case 6: printf("Die Note %d entspricht ungen?gend.",nnote);
> break;
> default: printf("%d ist keine zul?ssige Schulnote!");

There's no `int' argument to the printf() call of the default clause.

This will either cause printf() to print random garbage, or try to
access memory regions which are unmapped and SEGFAULT.

> P.S.:
> I found that declaring nnote as int soleves my problem, but I couldn?t
> understand why.
> Another one was the result of default: nnote was -1077942208 instead
> of 9 for example.

It was never assigned to 9 :)

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


Re: evil idea

2007-10-27 Thread Giorgos Keramidas
On 2007-10-26 23:34, Astrodog <[EMAIL PROTECTED]> wrote:
>On 10/26/07, Aryeh M. Friedman <[EMAIL PROTECTED]> wrote:
>> I am running amd64 8-CURRENT and there are a few i386 only ports that I
>> absolutely must have installed and at the same time since I have 4 GB of
>> RAM all kinds of bizarreness is created if I "downgrade" to i386.   So
>> here is the idea:   use qemu to create a virtual version of my machine
>> (with less then 2GB or RAM) and install i386 8-CURRENT on it (I want to
>> use -CURRENT for all my installs)
>>
>> Any thing I should watch out for here (I know I need to use NFS or
>> something like it to share files between the host and guest OS's)
> 
> There's actually a known system that will work for this. You can use
> your existing swap partition, as an "extra" root partition, installing
> there, then booting to that, then rebuild/install to your original
> partition. Its the same basic idea as the method for updating from
> 4.x->7.x, and should be on the lists. (Note to docs, might be worth
> putting it somewhere.)

I don't think Aryeh wants to "install i386 over his current amd64".

What he seems to be asking is if he can run *two* versions, one of
them as a virtualized host under qemu.  That should work, AFAIK.

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


Re: evil idea

2007-10-27 Thread Giorgos Keramidas
On 2007-10-27 21:49, mv <[EMAIL PROTECTED]> wrote:
> On 10/26/07, Aryeh M. Friedman <[EMAIL PROTECTED]> wrote:
> > I am running amd64 8-CURRENT and there are a few i386 only ports that I
> > absolutely must have installed and at the same time since I have
> > 4 GB of RAM all kinds of bizarreness is created if I "downgrade"
> > to i386.   So here is the idea:   use qemu to create a virtual
> > version of my machine (with less then 2GB or RAM) and install
> > i386 8-CURRENT on it (I want to use -CURRENT for all my installs)
>
> On Sat, 27 October 2007 20:33:44 Giorgos Keramidas wrote:
> > I don't think Aryeh wants to "install i386 over his current amd64".
> >
> > What he seems to be asking is if he can run *two* versions, one of
> > them as a virtualized host under qemu.  That should work, AFAIK.
>
> Would installing Freebsd i386 within a jail on an amd64 host solve his
> problem?

I don't know if that would 'solve' the problem, but one major difference
from qemu is that a jailed host runs the same kernel with the master.

This means that i386 programs do not run in 'native' i386 mode, but in
emulated mode.  The FreeBSD kernel already includes support for running
i386 programs in emulated mode, but since I haven't done this I am not
sure how feasible or useful it is.

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


Re: Dangers of using a non-base shell

2007-10-30 Thread Giorgos Keramidas
On 2007-10-29 20:50, Stephen Allen <[EMAIL PROTECTED]> wrote:
> It's been drawn to my attention not to use bash from the ports
> collection, because if one of it's dependencies (gettext or libiconv)
> fails or is updated significantly, it could break, and prevent
> login. The suggested solution was to use a base shell (such as sh) and
> append 'bash -l' to .shrc to automatically enter bash.
>
> The quite annoying side-effect is having to type 'exit' twice to get
> out of a su shell or screen.
>
> Would it be a better idea to use the pre-compiled binary for bash?
> And if I did so, could I be alerted to updates as easy as using
> 'pkg_version -v' when checking if any ports need updating?

I've been using the following for some time:

keramida> su -
Password: 
root# exec env SHELL=/usr/local/bin/bash bash -l

The same trick works with s/bash/mksh/ or s/bash/pdksh/, as far as I can
tell, and tcsh's history mechanism makes it easy to run the same command
later.  All I have to type is "exec " and hit the arrow-up key :)

The env(1) trick makes sure that sub-shells use bash(1) too, and 'exec'
reduces the number of 'exit' commands I have to type.

Now, if there's a problem with bash(1), I will probably have to su
again, but that's less trouble than being locked out because gettext has
broken, the *default* root shell is bash and _that_ fails all the time.

- Giorgos

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


Re: [freebsd-questions] Dangers of using a non-base shell

2007-10-31 Thread Giorgos Keramidas
On 2007-10-30 20:39, Howard Jones <[EMAIL PROTECTED]> wrote:
> Benjamin M. A'Lee wrote:
>> You could possibly also put "bash -l && exit" in your .shrc, which would
>> exit if bash exited successfully. I haven't tested it, but it should
>> work.
>
> or 'exec bash -l' which will replace the existing shell with bash in
> memory, rather than run it from it as a subprocess. I was going to verify
> that that's the technical explanation, but 'man exec' gets you the utterly
> useless builtin(1) manpage.

It is a fairly ok description of the technical behavior.  See my similar
suggestion for using:

tcsh# exec env SHELL=/usr/local/bin/bash bash -l
bash#

> The effect is that you only have to type exit once, anyway.

Yup :)

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


Re: release(8) environmental variables

2007-10-31 Thread Giorgos Keramidas
On 2007-10-30 18:02, "Brian A. Seklecki" <[EMAIL PROTECTED]> wrote:
>
> As far as building goes, the variables in play are:
>
>   DESTDIR, MAKEOBJDIRPREFIX, RELEASEDIR, CHROOTDIR, CVSROOT,
>   EXTSRCDIR, EXTDOCDIR, BUIILDNAME, RELEASETAG, NODOC, NOPORTS,
>   WORLD_FLAGS, LOCAL_SCRIPT
>
> For stage one of the release process, the following seem relevant:
>
>   DESTDIR, MAKEOBJDIRPREFIX, RELEASEDIR
>
> For stage two:
>
>   CHROOTDIR, CVSROOT, EXTSRCDIR, EXTDOCDIR, BUIILDNAME, RELEASETAG, NODOC,
>   NOPORTS, WORLD_FLAGS, LOCAL_SCRIPT
>
> Do you guys prefer to set these in make.conf(5) or as exported
> environmental variables in the shell that spawn's make(1) ?

make.conf is too invasive.  I just set them in a shell script called
`bldenv.sh' and saved in the release-checkout area :)

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


Re: release(8) environmental variables

2007-10-31 Thread Giorgos Keramidas
On 2007-10-31 11:03, "Brian A. Seklecki" <[EMAIL PROTECTED]> wrote:
>On Wed, 2007-10-31 at 13:54 +0200, Giorgos Keramidas wrote:
>>On 2007-10-30 18:02, "Brian A. Seklecki" <[EMAIL PROTECTED]> wrote:
>>>
>>> As far as building goes, the variables in play are:
>>>
>>>   DESTDIR, MAKEOBJDIRPREFIX, RELEASEDIR, CHROOTDIR, CVSROOT,
>>>   EXTSRCDIR, EXTDOCDIR, BUIILDNAME, RELEASETAG, NODOC, NOPORTS,
>>>   WORLD_FLAGS, LOCAL_SCRIPT
>>>
>>> For stage one of the release process, the following seem relevant:
>>>
>>>   DESTDIR, MAKEOBJDIRPREFIX, RELEASEDIR
>>>
>>> For stage two:
>>>
>>>   CHROOTDIR, CVSROOT, EXTSRCDIR, EXTDOCDIR, BUIILDNAME, RELEASETAG, NODOC,
>>>   NOPORTS, WORLD_FLAGS, LOCAL_SCRIPT
>>>
>>> Do you guys prefer to set these in make.conf(5) or as exported
>>> environmental variables in the shell that spawn's make(1) ?
>>
>> make.conf is too invasive.  I just set them in a shell script called
>> `bldenv.sh' and saved in the release-checkout area :)
> 
> I ask because I noticed that the following variablkes do not get
> honored by "make release" that occurs inside the chroot() as spawned
> by "make release" (presumably during release.5)
> 
> DESTDIR, MAKEOBJDIRPREFIX, RELEASEDIR 
> 
> For example, OBJs get sent right into $CHROOTDIR/usr/obj/, which
> really sucks.

I believe that's intentional, so re-running "make release" with
different CHROOTDIR values will produce consistently "similar" binaries.


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


Re: release(8) environmental variables

2007-10-31 Thread Giorgos Keramidas
On 2007-10-31 13:26, "Brian A. Seklecki" <[EMAIL PROTECTED]> wrote:
>>> really sucks.
>> 
>> I believe that's intentional, so re-running "make release" with
>> different CHROOTDIR values will produce consistently "similar" binaries.
> 
> I use LOCAL_SCRIPT to copy /etc/make.conf (well, /etc/src.conf) into place 
> inside the jail for the rebuild so that I can build a custom internal 
> release w/o certain subsystems (IPv6 or CSH, for example)
> 
> Is there a better way to do it?

LOCAL_SCRIPT sounds fine to me :)

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


Re: Core dump

2007-10-31 Thread Giorgos Keramidas
On 2007-10-31 15:32, Rem P Roberti <[EMAIL PROTECTED]> wrote:
> A program that I use has started giving me this error message when I try
> to load it:
>
> Segmentation fault: 11 (core dumped)
>
> Can someone give me a heads up on what's going on here.  I've done a
> reinstall to no avail.

Is there any reason why you can't tell us the name of the program?

The more details you provide, the easier it is going to be for someone
else to help you troubleshoot the problem.

Do you have a debug-build of the program around?  If you do, you can use
gdb(1) to try to grab a stack trace of the program, and with a little
luck and a bit of effort, it may even be possible to find out the root
cause of the segmentation fault.

Giorgos

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


Re: memory pool, rfc

2007-10-31 Thread Giorgos Keramidas
On 2007-11-01 01:00, Eduardo Morras <[EMAIL PROTECTED]> wrote:
> I'm already on hackers list but has very low traffic (9 messages last
> 5 days) and this is a question list no ? ;-)

This is a 'general' questions list, with a fairly high level of traffic.
Many FreeBSD committers and team affiliates are subscribed, but there
are still a lot of knowledgeable people who are respected team members,
but are *not* subcribed here.

Maybe in a more appropriate list you can get a greater amount of
visibility with people who can help your contributions to be integrated
with the main source code tree of FreeBSD.

> I think that in this list are FreeBSD *gurus*/hacks too which could
> say a "try it" or a "are you crazy?" answer. If other developers
> thinks that they need my rfc i'll add my code to FreeBSD.

It's hard to tell in advance, without actually *seeing* something in the
form of a proposal, or at least an implementation.

The FreeBSD team works in an open manner, and we take pride in the
fairly well established process of development we use.  Everyone is
invited to support, extend, fix bugs, implement new features, or
otherwise improve FreeBSD, as long as they are prepared to put in some
effort to "fit within the team".  Having said that, all you would have
to show us would be at least one of:

* A detailed proposal of the changes, optionally including a
  justifiction of why you think the changes are necessary and
  how they will improve the user experience of the people who
  comprise our userbase.

* A pilot implementation of the new features you described.
  It doesn't have to be complete; it doesn't have to precisely
  match the existing style of the code; it doesn't have to be
  performing blazingly fast, if there are plans for tuning;
  it doesn't even have to be compilable; as long as you are
  prepared to help us fix all the details.

Then, I'm sure that if the improvements you are working on look
interesting, you stand a better chance of soliciting comments, feedback
related to the way the changes can go into FreeBSD, help with the
testing process of the source integration, and so on.

This means that the next reasonable step would be to make available at
least a proposal or source patch, and post it to one of the developer
lists of FreeBSD.  The freebsd-hackers list would be nice.

> The point to zlib / libbzip2 is because when i talk about compression
> *always* someone says " Why don't use zlib?" Short answer No, Medium
> Answer: deflate is 15 years old and there are better and faster algs
> now.

That's one way to describe zlib.  Perhaps not the only one, but still a
valid opinion to hold, so let's go down that path.  It doesn't sound
like a productive use of everyone's time, unless we have a solid plan
for a better zlib replacement in place :-)

Giorgos



pgpHhBKCvTiOW.pgp
Description: PGP signature


Re: memory pool, rfc

2007-10-31 Thread Giorgos Keramidas
On 2007-11-01 02:06, Eduardo Morras <[EMAIL PROTECTED]> wrote:
> At 01:38 01/11/2007, you wrote:
>> This is a 'general' questions list, with a fairly high level of traffic.
>> Many FreeBSD committers and team affiliates are subscribed, but there
>> are still a lot of knowledgeable people who are respected team members,
>> but are *not* subcribed here.
>>
>> Maybe in a more appropriate list you can get a greater amount of
>> visibility with people who can help your contributions to be integrated
>> with the main source code tree of FreeBSD.
>
> Understood
>
>> > I think that in this list are FreeBSD *gurus*/hacks too which could
>> > say a "try it" or a "are you crazy?" answer. If other developers
>> > thinks that they need my rfc i'll add my code to FreeBSD.
>>
>> It's hard to tell in advance, without actually *seeing* something in the
>> form of a proposal, or at least an implementation.
>> .
>> testing process of the source integration, and so on.
>>
>> This means that the next reasonable step would be to make available at
>> least a proposal or source patch, and post it to one of the developer
>> lists of FreeBSD.  The freebsd-hackers list would be nice.
>
> I can prepare a malloc-like pilot implementation and detailed paper.

That would be fantastic!

>> It doesn't sound like a productive use of everyone's time, unless we
>> have a solid plan for a better zlib replacement in place :-)
>
> You can check http://www.maximumcompression.com/index.html and
> http://cs.fit.edu/~mmahoney/compression/text.html for the state of the
> art lossless compressors.

I will, thanks for the references; they look interesting :)



pgp4BbuIrO69j.pgp
Description: PGP signature


Re: reverse grep

2007-11-03 Thread Giorgos Keramidas
On 2007-11-04 01:12, [EMAIL PROTECTED] wrote:
> How is it possible to select lines that do NOT match a specific pattern?

grep -v 'pattern'

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


Re: Is there a way to compare what is in the ports tree with what is installed?

2007-11-05 Thread Giorgos Keramidas
On 2007-11-05 14:53, Brett Davidson <[EMAIL PROTECTED]> wrote:
> ie. If I had a particular version of the ports tree on a server, how
> could I check to see if any of the programs in that tree were actually
> installed?
>
> Is there a simple command or sequence of commands to do this?

Try running the pkg_version(1) utility.  For instance, running it here,
I can see output like this:

ksh$ pkg_version | grep -v '=$'
ORBit2  <
aalib   <
[...]

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


Re: Is there a way to compare what is in the ports tree with what is installed?

2007-11-05 Thread Giorgos Keramidas
On 2007-11-05 02:36, Pollywog <[EMAIL PROTECTED]> wrote:
>>  dir /var/d/pkg | grep 
>
> My Linux systems have a "dir" command but my FreeBSD does not.
> Is there something I need to install?

Not really.  The ls(1) utility works fine :-)

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


Re: How to write a condition in Bourne shell

2007-11-05 Thread Giorgos Keramidas
On 2007-11-05 14:03, Olivier Nicole <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am a lame Bourne sheel programmer, how to write:
>
> while [ ( $? -ne 0 ) -a ( $retry -gt 0 ) ] ; do
>
> that should execute as long as $? is not null and $retry is greater
> than 0?

Try something like...

retry=0
done=-0
while [ $done -eq 0 ] && [ $retry -lt 10 ]; do

run_some_other_stuff_here

if [ $? -eq 0 ]; then
done=1
fi
done

if [ $done -eq 0 ]; then
echo "Failed after $retry attempts."
fi

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


Re: New FreeBSD art?

2007-11-07 Thread Giorgos Keramidas
On 2007-11-07 13:49, James <[EMAIL PROTECTED]> wrote:
> I know for sure. We shall rue the day beastie was ever demoted
> to mere mascot.
>
> RUE I TELL YOU

The beastie is here[1] to stay, no worries...
[1] 'Here' as in anywhere I can attach a sticker :-)

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


Re: How can I use the Windows loader to boot FreeBSD

2007-11-07 Thread Giorgos Keramidas
On 2007-11-07 15:19, Alou Dialy <[EMAIL PROTECTED]> wrote:
> I read this FAQ but I am still confused. How does it
> work if you have windows on ad0 and freebsd on ad1.
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NT-BOOTLOADER

AFAICT, the 'explicit' list of steps missing from the FAQ is:

  1. Run boot0cfg from FreeBSD:

# boot0cfg -B /dev/ad1

  2. Copy the MBR of the ad1 disk to a file:

# dd if=/dev/ad1 of=bootsect.bsd bs=512 count=1

  3. Save this file to a floppy disk, or some other Windows-accessible
 place.  Using a floppy-disk, formatted as FAT, this could be done
 by typing:

# mount -t msdosfs /dev/fd0 /mnt/dos
# cp bootsect.bsd /mnt/dos
# umount /mnt/dos

  4. Boot into Windows and copy the file A:\BOOTSECT.BSD to C:\

  5. Continue as described in the FAQ :)


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


Re: Dangers of using a non-base shell

2007-11-09 Thread Giorgos Keramidas
On 2007-11-09 18:55, Andrew Pantyukhin <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 30, 2007 at 01:39:12PM +0200, Giorgos Keramidas wrote:
> > I've been using the following for some time:
> >
> > keramida> su -
> > Password: 
> > root# exec env SHELL=/usr/local/bin/bash bash -l
>
> I know it doesn't work on slolaris^W some Unix flavors, but I've
> been quite happy with "su -m".

Heh, putting the Solaris bashing (sic) aside, I can see how the -m
option can be useful some times.  After all, it was implemented because
*someone* thought it would be neat to have around :-)


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


Re: Dangers of using a non-base shell

2007-11-09 Thread Giorgos Keramidas
On 2007-11-09 16:34, Alex Zbyslaw <[EMAIL PROTECTED]> wrote:
>
> [ discussing `su -m' option ]
>
> Also the only way I know on FreeBSD to interactively become a user
> with no real shell (true, nologin etc).

It should be possible to type:

su username

i.e. here's an ftp session on my laptop:

[EMAIL PROTECTED]:/root# fgrep ftp: /etc/passwd
ftp:*:1003:1003:& user:/home/ftp:/usr/sbin/nologin
[EMAIL PROTECTED]:/root# su ftp
[EMAIL PROTECTED]:/root$ id
uid=1003(ftp) gid=1003 groups=1003
[EMAIL PROTECTED]:/root$

Good idea, though :)

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


Re: Dangers of using a non-base shell

2007-11-09 Thread Giorgos Keramidas
On 2007-11-09 18:10, Alex Zbyslaw <[EMAIL PROTECTED]> wrote:
> Giorgos Keramidas wrote:
>> i.e. here's an ftp session on my laptop:
>>
>>  [EMAIL PROTECTED]:/root# fgrep ftp: /etc/passwd
>>  ftp:*:1003:1003:& user:/home/ftp:/usr/sbin/nologin
>>  [EMAIL PROTECTED]:/root# su ftp
>>  [EMAIL PROTECTED]:/root$ id
>>  uid=1003(ftp) gid=1003 groups=1003
>>  [EMAIL PROTECTED]:/root$
>
> Must be new, because in 5.4 I get:
> [...]
> I find the behaviour you get definitely undesirable.  There are
> occasionally accounts have special purpose shells which do work in
> some restricted fashion which you *might* want to use (in which case
> you can su) or which you might not (so you su -m). [...]

False alarm.  I had a desynced /etc/pwd.db when this happened.

The correct behavior with nologin as the shell is:

  [EMAIL PROTECTED]:/root# su ftp
  This account is currently not available.
  [EMAIL PROTECTED]:/root#

> Confused.

I apologize for the confusion :/


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


Re: nanobsd, picobsd, tinybsd

2007-11-10 Thread Giorgos Keramidas
On 2007-11-09 17:01, John Smith <[EMAIL PROTECTED]> wrote:
> Can anybody please explain to my what the differences are between
> nanobsd, picobsd and tinybsd.
>
> They all seem to be doing the same (creating a minimal FreeBSD image
> that can be used in embedded systems), or is this not right?

What don't you experiment with them, and see? :)

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


Re: nanobsd, picobsd, tinybsd

2007-11-10 Thread Giorgos Keramidas
On 2007-11-10 15:45, John Smith <[EMAIL PROTECTED]> wrote:
>On Nov 10, 2007 9:40 AM, Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
>>On 2007-11-09 17:01, John Smith <[EMAIL PROTECTED]> wrote:
>>> Can anybody please explain to my what the differences are between
>>> nanobsd, picobsd and tinybsd.
>>>
>>> They all seem to be doing the same (creating a minimal FreeBSD image
>>> that can be used in embedded systems), or is this not right?
>>
>> What don't you experiment with them, and see? :)
>
> I'd expected a more level headed reply from this FreeBSD list. How is
> a newbie supposed to know the differenced and how can I test this if I
> don't have a spare machine?
>
> My question was more out of interest. This mailing list is called
> FreeBSD-Questions, so why can't I asked a reasonable question and
> expect a reasonable reply...?

Minus the typo in the original reply [s/What/Why/], I'm afraid that this
is the only way to get hands-on experience with these systems.  I'm
sorry if the original response came out as ``odd''.  More over, I don't
really know what you mean by ``level headed'', other than ``not flame me
for asking'', which is not something we tend to do in freebsd-questions.

Having said that, a brief description of what each one of the systems
you mentioned is:

  * PicoBSD used to work with earlier FreeBSD versions.  I don't think
it does work with recent 7.X versions or CURRENT.  I wouldn't even
go there right now, unless you want to ``forward port'' all the code
which made PicoBSD tick, and make it work with recent FreeBSD
releases.

  * NanoBSD is more ``modern'' than PicoBSD, and it works with 6.X, 7.X
and CURRENT releases.  One of the advantages of NanoBSD is that it's
part of the base system and it is easy to use.  Our documentation
includes an article about NanoBSD at:
<http://www.freebsd.org/doc/en_US.ISO8859-1/articles/nanobsd/>
Try reading the introduction of the article for some of the features
of NanoBSD.

  * TinyBSD is a set of tools and scripts, which is also part of the
base system.  It definitely has a few good characteristics.  For
instance their documentation is Wiki-like and gets updated often.

These short descriptions contain stuff that only scratches the surface
of what it *feels* like to work with each system.  If that's what you
originally wanted, then Google and ten minutes or so would do fine.  The
important bits, however, are always in the details, and that's why you
have to try NanoBSD and TinyBSD yourself, and see how much you like or
dislike each one of them.

- Giorgos

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


Re: need an explanation of "make serarch" output

2007-11-11 Thread Giorgos Keramidas
On 2007-11-11 09:23, Aryeh Friedman <[EMAIL PROTECTED]> wrote:
> Sorry beinf rude but I wonder if either of the responders took there
> own advice and RTFM'ed (where M=mail)
>
> What I mean is I was *NOT* asking how to get the deps list... I was
> asking that for example "make search key=jdk16 display=bdeps" will
> display multiple "bdeps" lines which one contains the correct deps
> list (if any) or do I need to combine them to get a complete list?

Yes, you need to combine them.

___
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 building a patch

2007-11-11 Thread Giorgos Keramidas
On 2007-11-11 16:02, Matthias Apitz <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I've build a patch for 'nn-6.7.3' to add support for RFC1522 to my
> beloved news-reader. Before giving it away I was trying it on a fresh
> workspace of the /usr/ports/news/nn and run into the problem that
> new files which brings the patch to the tree are always created
> in the current working dir, even if I create them before with touch(1),
> existing files, like 'answer.c' in the example below, get patched
> correctly:
>
> $ /usr/ports/news/nn/work
> $ touch nn-6.7.3/PATCH.RFC1522
> $ patch < ../myRFC1522.patch
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --
> |diff -N -r -u -X exclude nn-6.7.3/PATCH.RFC1522 
> nn-6.7.3.patched/PATCH.RFC1522
> |--- nn-6.7.3/PATCH.RFC1522 Thu Jan  1 01:00:00 1970
> |+++ nn-6.7.3.patched/PATCH.RFC1522 Sat Nov 10 11:04:58 2007
> --

Here's the problem.

The patch files for ports should *not* include the `nn-6.7.3' part, like
this one.  They should be relative to the toplevel directory of the
unzipped/untarred port, i.e.:

diff -N -u PATCH.RFC1522.orig PATCH.RFC1522
--- PATCH.RFC1522.orig Thu Jan  1 01:00:00 1970
+++ PATCH.RFC1522 Sat Nov 10 11:04:58 2007

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


Re: What server for a mail server

2007-11-13 Thread Giorgos Keramidas
On 2007-11-14 09:04, Olivier Nicole <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a project where I should set-up a mail server for approximately
> 12000 users, 4000 virtual domains, 15000 messages per day, 700 MB
> traffic per day.
>
> The machine should run Postfix, courrier-imap and a web mail (probably
> squirel), Apache 2, spamassassin, clamav, greylist
>
> What type of machine should I target, in terms of CPU and RAM?

If you saturate an 100 Mbit/s network interface, it can push/pull more
than 800 GB per day, so it's not the network that is going to be the
problem :)

Depending on the number of *concurrent* connections you want to support,
and bearing in mind the post-processing you want to do (filtering with
clamav, spamassassin, and serving web pages through the web interface),
it may be worth aiming for a machine which has SMP support, and a fair
amount of physical memory.

I'd go for at least a 3 GHz processor, and 4 GB of physical memory.
If amd64 is an option, you can even shoot for 8 GB of RAM or more.

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


Re: Socket programming question

2007-11-14 Thread Giorgos Keramidas
On 2007-11-14 15:21, Andrew Falanga <[EMAIL PROTECTED]> wrote:
> Hi,
> My question has to do with how someone would find out if a call to
> socket(2) actually produced a socket.  I know that the API works, I've
> programmed with it many times, but is there a way to find out if 's'
> returned by socket(2) is actually valid in whatever kernel structure
> it is stored?  I understand that I may have the process entirely mixed
> up.  But it seems to me that the socket is somehow known to the kernel
> and I should be able to query the kernel somehow and discover if it is
> valid.

The socket() system call returns -1 when it fails.  Isn't that
sufficient?  If not, why?  What ``extra'' information would you
expect from the kernel when socket() fails?

> Let me know if my question doesn't make sense as worded and I'll try
> to explain myself better.  Another question related to this one, would
> someone in this list know where the source code is, in the system
> source tree, for the select call?

Look for kern_select() in `/usr/src/sys/kern/sys_generic.c'.

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


Re: Gcc Problems

2007-11-14 Thread Giorgos Keramidas
On 2007-11-14 13:21, Mike Fahey <[EMAIL PROTECTED]> wrote:
>
> Freebsd4.10
>
> When I try to compile any problem I get the following error. Any
> suggestions? Thanks.
>
> helpers/dummy.c:1: syntax error before `/'
>
> Here is a sample trying to build any port.
>
> make
> ===>   wget-1.10.2_1 depends on file: /usr/local/lib/libcrypto.so.4 -
> found
> ===>   wget-1.10.2_1 depends on executable: gmake - found
> ===>   wget-1.10.2_1 depends on file: /usr/local/bin/perl5.8.8 - found
> ===>   wget-1.10.2_1 depends on shared library: intl - found
> ===>  Configuring for wget-1.10.2_1
> configure: WARNING: you should use --build, --host, --target
> configure: configuring for GNU Wget 1.10.2
> checking build system type... i386-portbld-freebsd4.10
> checking host system type... i386-portbld-freebsd4.10
> checking whether gmake sets $(MAKE)... eval: 1: Syntax error: "("
> unexpected
> ===>  Script "configure" failed unexpectedly.
> Please report the problem to [EMAIL PROTECTED] [maintainer] and attach the
> "/usr/ports/ftp/wget/work/wget-1.10.2/config.log" including the output
> of the failure of your make command. Also, it might be a good idea to
> provide an overview of all packages installed on your system (e.g. an
> `ls /var/db/pkg`).
> *** Error code 1

The error message points to files which you can skim through, to see
more error messages.  Did you look at these?  If yes, can you attach a
copy and send it to this list and the maintainer email address listed
above?

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


Re: cron/send mail question

2007-11-15 Thread Giorgos Keramidas
On 2007-11-15 13:47, zbigniew szalbot <[EMAIL PROTECTED]> wrote:
> Dear all,
> What command (when using cron) should I invoke to automatically sent
> /var/log/exim/rejectlog file to a specified email address? I just need
> to analyze it and would best prefer to have it in my inbox in the
> morning.

There are several ways.

(1) Add a new shell script to `/usr/local/etc/periodic/daily'.

(2) Add the commands you want to run in `/etc/daily.local'.

(3) Add a cronjob in `/etc/crontab' to run a custom script.


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


Re: OT: gcc/binutils question

2007-11-15 Thread Giorgos Keramidas
On 2007-11-15 17:17, Wojciech Puchar <[EMAIL PROTECTED]> wrote:
> how to convert arbitrary data (in file) to object file, so i will be able
> to do
>
> extern char something[]
>
> and use it - in C.

Try to file2c(1) utility.  Quoting from its manpage:

% EXAMPLES
%  The command:
%
%date | file2c 'const char date[] = {' ',0};'
%
%  will produce:
%
%const char date[] = {
%83,97,116,32,74,97,110,32,50,56,32,49,54,58,50,56,58,48,53,
%32,80,83,84,32,49,57,57,53,10
%,0};

> i did wrote converter that converts data from file to
>
> const char something[]={firstbyte,secondbyte,.};
>
> and then cc to compile it.
>
> and it's VERY SLOW when data are few megs - while it's no work in fact.

I think there's something wrong with the converter, then.  The file2c(1)
utility converts my kernel (6 MB of data) in less than 3 seconds:

$ /usr/bin/time file2c 'const char kernel[] = {' '};' \
< /boot/kernel/kernel > /dev/null
2.98 real 2.92 user 0.11 sys
$

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


Re: semi-OT: awk - field separator

2007-11-15 Thread Giorgos Keramidas
On 2007-11-15 13:24, Robert Huff <[EMAIL PROTECTED]> wrote:
> What is the canonical way to get (FreeBSD default) awk to use a
> single double-quote as the field separator?  I have tried variations
> on -F\\\" and -F"\"" and the best I can get is:
>
> + awk -F" {print $2}
> ./script.sh: 1: Syntax error: word unexpected

Any of the following should work:

awk -F\" ...
awk -F"\"" ...
awk -F'"' ...

I see that this is part of a script (the '+' character at the start of
the line).  Can you show us the *exact* contents of the script at the
point where awk(1) is called?

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


Re: bash and strings

2007-11-16 Thread Giorgos Keramidas
On 2007-11-16 03:43, [EMAIL PROTECTED] wrote:
> Everyone,
>
> I'm sure this is easy, and I am making it harder than it is.
>
> I am being supplied a list of files, and need to create the files and
> directories to hold them, but I cannot figure out how to take the string
> apart.
>
> For example, I am given
>
> /usr/local/scripts/firewall.sh
>
> I need to create the /usr/local/scripts directory and then create
> firewall.sh.

See the `dirname' and `basename' commands:

$ dirname "/usr/local/scripts/firewall.sh"
/usr/local/scripts
$

$ basename "/usr/local/scripts/firewall.sh"
firewall.sh
$

Be careful about properly quoting the filenames though (note how the
first invocation of `dirname' fails below, and try to understand why
it fails):

$ testname='foo bar baz'
$ dirname $testname
usage: dirname string
$ dirname "${testname}"
.
$

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


Re: What do I put in fstab to get my DVD/CDROM burner to work?

2007-11-17 Thread Giorgos Keramidas
On 2007-11-16 22:24, Chris Hill <[EMAIL PROTECTED]> wrote:
>On Fri, 16 Nov 2007, David J Brooks wrote:
>>On Friday 16 November 2007 08:23:21 pm Gary Kline wrote:
>>> This is the old and current fstable:
>>>
>>> # DVD drive (top)
>>> /dev/acd0   /media/cdroms/0 udf ro,noauto   0   0
>>> # CD-burner (bottom)
>>> /dev/acd1   /media/cdroms/1 cd9660  ro,noauto   0   0
>>
>> cd9660 is what you need. for the burner at least though, you'll want
>> to make it rw rather than ro.

Not really.  When *mounted* even DVD-RW disks are read-only.

> Good point! Although my CD burner burns CDs just fine with either
> cdrecord or burncd, even with ro in its fstab line.

That's because they are not written ``through the cd9660 filesystem
driver'', but through cdrecord/burncd.

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


Re: What do I put in fstab to get my DVD/CDROM burner to work?

2007-11-17 Thread Giorgos Keramidas
On 2007-11-17 02:55, Joshua Isom <[EMAIL PROTECTED]> wrote:
> On Nov 16, 2007, at 10:56 PM, Yeef wrote:
>> this is work for me  freebsd 6.2-RELEASE
>>
>> /dev/acd0   /cdrom  cd9660  ro,noauto   0   0
>>
>> you should use root mount it.
>
> Or set vfs.usermount to 1, if I remember right.  I can't recall what's
> the proper method for setting it at boot, rc.conf or loader.conf.  The
> default is 0, which is what I have it set to, more to annoy me than
> security (personal server behind a buggy router/firewall).

man sysctl.conf

That's the proper place to put `vfs.usermount=1'.

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


Re: Making mergemaster skip certain files

2007-11-17 Thread Giorgos Keramidas
On 2007-11-16 22:34, "J. Porter Clark" <[EMAIL PROTECTED]> wrote:
> Is there any way to keep certain files out of the reach of
> mergemaster?  I understand the need for carefully merging the
> old and the new, but I really shouldn't ever have to for files
> like these:
>
>   /etc/aliases
>   /etc/hosts
>   /etc/hosts.allow
>   /etc/manpath.config
>   ... and many others.

You can hook into mergemaster, using shell scripts.  See the manpage of
mergemaster for more details, but here's a short description of what I
use on my laptop for some time now:

1. A `.mergemasterrc' file in the HOME directory of the `root' user,
   which contains:

STRICT=no
MM_PRE_COMPARE_SCRIPT=/root/mm-pre-compare.sh

2. The `/root/mm-pre-compare.sh' script contains the following:

#!/bin/sh

# NOTE: No PATH needed, because mm's PATH is already
# draconian enough.

# If TEMPROOT is not set, or it is set to a path which
# resolves to the real root filesystem, abort early, before we
# trash the config files of the installed root filesystem.

if test -z "${TEMPROOT}" ; then
echo >&2 "$0: error: TEMPROOT is unset or empty."
exit 1
fi
p=`realpath "${TEMPROOT}"`
if test "${p}" = '/' ; then
echo >&2 "$0: error: TEMPROOT is the real root filesystem."
exit 2
fi

case "${PRE_WORLD}" in
'')
# The following files always have local changes.
# Remove them from ${TEMPROOT} to force mergemaster(8)
# to ignore these files when comparing /etc directories.

rm -f "${TEMPROOT}/.cshrc"
rm -f "${TEMPROOT}/.profile"
rm -f "${TEMPROOT}/root/.cshrc"
rm -f "${TEMPROOT}/root/.profile"

rm -f "${TEMPROOT}/etc/hosts"
rm -f "${TEMPROOT}/etc/networks"

rm -f "${TEMPROOT}/etc/motd"
rm -f "${TEMPROOT}/etc/printcap"

;;
esac

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


Re: What do I put in fstab to get my DVD/CDROM burner to work?

2007-11-17 Thread Giorgos Keramidas
On 2007-11-17 14:13, Gary Kline <[EMAIL PROTECTED]> wrote:
>On Sat, Nov 17, 2007 at 08:03:25PM +0200, Giorgos Keramidas wrote:
>>On 2007-11-17 02:55, Joshua Isom <[EMAIL PROTECTED]> wrote:
>>> On Nov 16, 2007, at 10:56 PM, Yeef wrote:
>>>> this is work for me  freebsd 6.2-RELEASE
>>>>
>>>> /dev/acd0   /cdrom  cd9660  ro,noauto   0   0
>>>>
>>>> you should use root mount it.
>>>
>>> Or set vfs.usermount to 1, if I remember right.  I can't recall what's
>>> the proper method for setting it at boot, rc.conf or loader.conf.  The
>>> default is 0, which is what I have it set to, more to annoy me than
>>> security (personal server behind a buggy router/firewall).
>>
>>  man sysctl.conf
>>
>> That's the proper place to put `vfs.usermount=1'.
>
>  Okay, I've set vfs.usermount=1, but both totem and kmplayer
>  refuse to play my audio-CD.  Using #mount alone (as root)
>  doesn't say anything about /dev/acd0.  I have tried to mount
>  the CD ::
>
>  [EMAIL PROTECTED]:/dev# mount_cd9660 /dev/acd0 /media/cdroms/0
>  mount_cd9660: /dev/acd0: Invalid argument

You are not trying to _mount_ an audio CD-ROM, right?

If you are, then please read carefully the Handbook chapter about
multimedia and CD-ROM/DVD-ROM disks.  It will help a lot :)

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


Re: congrlations to the freebsd developers

2007-11-17 Thread Giorgos Keramidas
On 2007-11-17 18:53, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
> M. Warner Losh wrote:
> > You can run FreeBSD/i386 on amd64 boxes.
>
> All the different methods people have suggested to me for doing this
> has blown up also since I use a nvidia card it is almost pointless
> unless I can run the nvidia kernel module.

That's odd.

The laptop I'm typing this is amd64-capable, but installing from the
FreeBSD/i386 release CD-ROMs worked like a charm.  Which methods have
you tried?

BTW, the i386 kernel module of nvidia should run fine on FreeBSD/i386.

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


Re: Making mergemaster skip certain files

2007-11-18 Thread Giorgos Keramidas
On 2007-11-17 20:06, Howard Goldstein <[EMAIL PROTECTED]> wrote:
> Giorgos Keramidas wrote:
> > On 2007-11-16 22:34, "J. Porter Clark" <[EMAIL PROTECTED]> wrote:
> > mergemaster for more details, but here's a short description of what I
> > use on my laptop for some time now:
>
> > 1. A `.mergemasterrc' file in the HOME directory of the `root' user,
> >which contains:
> >[snip]
> >
> > 2. The `/root/mm-pre-compare.sh' script contains the following:
> >[snip]
>
> Please consider submitting this as a PR in hopes it gets included in
> the actual package.

Since mergemaster is included in the base system, I can directly commit
to its manpage.  There is already a description of `.mergemasterrc' in
the manpage, so I'm guessing you want a sample script added?

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


Re: congrlations to the freebsd developers

2007-11-18 Thread Giorgos Keramidas
On 2007-11-17 22:44, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>Giorgos Keramidas wrote:
>> On 2007-11-17 18:53, "Aryeh M. Friedman" <[EMAIL PROTECTED]>
>> wrote:
>>> M. Warner Losh wrote:
>>>> You can run FreeBSD/i386 on amd64 boxes.
>>> All the different methods people have suggested to me for doing
>>> this has blown up also since I use a nvidia card it is almost
>>> pointless unless I can run the nvidia kernel module.
>>
>> That's odd.
>>
>> The laptop I'm typing this is amd64-capable, but installing from
>> the FreeBSD/i386 release CD-ROMs worked like a charm.  Which
>> methods have you tried?
>
> With 4GB and a E6850 (P35/IHC9(R)) almost all the pci devices I had
> where reconized *EXCEPT* any nvdidia card under i386 this was
> instantly "fixed" as soon I switched to amd64.

Sorry, but I can barely parse the sentence above.  Do you mean that you
_did_ installl i386, but it had issues?  Or that you had an _amd64_
installation, but was forced to move back to i386?

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


Re: hyperthreading CPU and broken scheduling?

2007-11-18 Thread Giorgos Keramidas
On 2007-11-18 11:43, Wojciech Puchar <[EMAIL PROTECTED]> wrote:
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>>> To unsubscribe, send any mail to 
>>> "[EMAIL PROTECTED]"
>> To enable hyperthreading, try setting the following in /etc/sysctl.conf:
>>
>> machdep.hyperthreading_allowed=1
>>
>> and reboot (or execute sysctl machdep.hyperthreading_allowed=1 by hand).
>
> did /etc/rc.d/sysctl start  and works.

Please, use loader.conf to change `machdep.hyperthreading_allowed'.

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


Re: can you help about this script

2007-11-22 Thread Giorgos Keramidas
On 2007-11-22 10:10, ann kok <[EMAIL PROTECTED]> wrote:
> Hi Giorgos
>
> Thank you
>
> But my output is from your suggstion
> printf "Created: %s\n", system("date +%Y%m%d");
>
> 20071122
> Created: 0
> 20071122
> Updated: 0
>
> how can I have output as
>
> Created: 20071122
> Updated: 20071122

You'll have to use the gsub() to strip newlines from the output of
"date"...

> In additon,
>
> ls it possible to have loop output also?
>
> I need to have
>
> print "File No:", CMA001
>
> the second record is CMA002 and then CMA003 for the
> 3rd record

Sure.  One way to do this is to print a formatted version of the special
"NR" variable of awk (NR == number of records read so far):

$ ( echo foo ; echo bar ) | awk '{ printf "%03d %s\n", NR, $0; }'
001 foo
002 bar
$

If you are going to do any amount of *serious* awk programming, I
recommend the following book:

Dale Dougherty, Arnold Robbins.  "Sed & Awk".  O'Reilly &
Associates.  2nd edition (March 1997)

http://www.oreilly.com/catalog/sed2/

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


Re: can you help about this script

2007-11-22 Thread Giorgos Keramidas
On 2007-11-21 12:26, ann kok <[EMAIL PROTECTED]> wrote:
> Hi all
> how command "date, hostname" run in awk program?
>
> awk -F program.awk file.txt

You don't use backticks...  These are a feature of the shell, and
running a script through progname.awk is no longer a shell session.

Try system("date") in your awk(1) script:

> program.awk
>
>  BEGIN { RS = "\n" ; FS = "|" }
>
>  {
>print "Name:", $9
>print "Created: `date`"   
>print "from: `hostname`"
>print ""
>  }


BEGIN {
RS ="\n";
FS = "|";
}

{
printf "Name:%s\n", $9;
printf "Created: %s\n", system("date");
printf "From:%s\n", system("hostname");
}

Running system("hostname") once for each file may be horribly
inefficient, though.  If I were you, I'd write this as a *shell* script,
which runs "hostname" once, stashes the result away in a variable, and
reuses it all the time.

Running "date" may be a bit less efficient than something like
gettimeofday().  Perl has a gettimeofday() function in the Time::HiRes
module, so it may be worth investigating if that may speed things up a
bit more.

A completely untested first try to do something like this is ...

#!/usr/bin/perl -w

use strict;

use POSIX qw(strftime);
use Time::HiRes qw(gettimeofday);

my $hostname = `hostname`;
my $line;
while (defined($line = )) {
chomp $line;
my @fields = split /|/, $line;
if ($#fields >= 0) {
my ($seconds, $microseconds) = gettimeofday();
printf "Name:%s\n", $fields[8];
printf "Created: %s\n",
strftime("%Y-%m-%d %H:%M:%S", gmtime($seconds));
printf "From:%s\n", $hostname;
}
}

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


Re: top posting (off-topic)

2007-11-24 Thread Giorgos Keramidas
On 2007-11-23 21:58, David Kelly <[EMAIL PROTECTED]> wrote:
>On Nov 22, 2007, at 9:10 PM, Paul Schmehl wrote:
>> Understood from that perspective, perhaps you can see why people
>> might dislike top posting.
>
> Many here (and elsewhere) will not reply to a top-poster.

I am one of these people.

If I see a top-posted message -- totally incomprehensible, full of
errors, misformattings, and other annoying bits, including mutilated
quotes with completely messed up quoting, and semi-randomly wrapped text
-- then it instantly rings a very important bell:

"The author of this message does not care enough to put some effort into
writing a properly formatted, readable reply.  If he doesn't care enough
to make his message readable, do you really want to spend the effort to
_read_ it?"

The answer is, surprisingly often, "No, I don't think I want to do that".

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


Re: Help with a new port?

2007-11-24 Thread Giorgos Keramidas
On 2007-11-24 15:24, Zachary Kline <[EMAIL PROTECTED]> wrote:
> Hi,
> My name is Zachary Kline,

Hi Zachary,

> Anyway, to get to the point: I'm not quite sure where to ask this.  I
> have a new port which I feel should be included in the FreeBSD
> accessibility category, [...]
> This port is Emacspeak, from http://emacspeak.sf.net.  It's a screen
> reader--though that term isn't really encouraged by the developer--for
> the Emacs work environment.

I can help with the integration of the new port.  I will have a look at
the site of the program, but it would be nice if you sent me any porting
details/work you have already.

Happy FreeBSD'ing :-)

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


Re: who wrote this

2007-11-25 Thread Giorgos Keramidas
On 2007-11-25 15:23, "eBoundHost: Artur" <[EMAIL PROTECTED]> wrote:
> All I have to say is WTF is wrong with whomever wrote this page.
> http://www.freebsd.org/internal/fortunes.html
> ==
>>> Examples of entries that should not usually be declared 'offensive':
>>> * Hitler quotes.
> ==
> Ok I understand that some moron wrote it, but why has nobody removed
> this garbage?

There have been long and vicious discussions about this particular
issue, on several mailing lists.  Please refer to the archives, because
repeating the whole shebang is not really a productive use of everyone's
time.

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


Re: who wrote this

2007-11-25 Thread Giorgos Keramidas
On 2007-11-25 17:59, "eBoundHost: Artur" <[EMAIL PROTECTED]> wrote:
> yea that's a great answer.  thanks for your insight.  this is not some
> technical question that can be researched, this in fact tarnishes the
> image of the freebsd community, so it's not such an easy "go rtfm"
> type of deal.

The commit logs of the entire FreeBSD source tree are openly visible to
everyone.  A couple of minutes with Google Groups would be enough to
locate this thread:

  
http://groups.google.com/group/fa.freebsd.cvs-all/browse_thread/thread/ee66a0ebc1457b1f/7ea396d642a58806

This is the sort of "research" that I wanted to point you at.

> problem is that i just came accross it myself and obviously nothing
> has been done about it in the past.

The fact that you didn't notice the old commit logs, does not mean that
``nothing has been done about this issue in the past''.  Please stop
spreading FUD about FreeBSD, because implying that we don't care as a
team about these things suggests to readers of freebsd-questions things
which are untrue.

There are intriguing but nevertheless interesting observations in the
thread mentioned above.  Please take the time to let some of them sink
in before you spread more FUD.

> so i would like to ask of people, is there no better way to get the
> point accross?  do you have to have this wording?  is it set in stone
> and can't be changed?  I insist strongly that we should rework this
> example, and if anyone insists strongly on not doing it, I would like
> to understand what motive can be possibly behind this other than
> something very deeply evil.

If you are not bothered by the fact that the fortune cookie database
contains Hitler quotes, but you merely want to ammend the text of the
web site, then you are more than welcome to post patches to the
freebsd-www list.  That's where most of the work on the website is
discussed, and reviewed.

- Giorgos

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


Re: who wrote this

2007-11-25 Thread Giorgos Keramidas
On 2007-11-25 19:43, "eBoundHost: Artur" <[EMAIL PROTECTED]> wrote:
>> If you are not bothered by the fact that the fortune cookie database
>> contains Hitler quotes, but you merely want to ammend the text of the
>> web site, then you are more than welcome to post patches to the
>> freebsd-www list.  That's where most of the work on the website is
>> discussed, and reviewed
>
> I'm not going to reply to your personal attack but will only say that you
> are definitely much smarter, more web savy and better looking than me.

It's not an ``attack'', but merely a request to avoid what may be
considered as a ``fault'' of the FreeBSD Project.

> As far as the rest of your comment, yes, I am only interested in
> removing the reference to hitler from the front page of that topic
> that's all.  And unfortunately I do not know how to post patches to
> the freebsd-www list so if you would be so kind as to send me an email
> with a pointer, I would sincerely appreciate it.

You don't have to spend a lot of time working with HTML, SGML or the CVS
tree.  A mere proposal for a text that improves what you consider buggy
in the web page, should be fine.  We can do the rest.

- Giorgos

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


Re: top posting (off-topic)

2007-11-25 Thread Giorgos Keramidas
On 2007-11-25 19:01, Chad Perrin <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 25, 2007 at 06:56:15PM -0700, Chad Perrin wrote:
> >
> > I think it's kind of a chicken-and-egg problem: we don't really know for
> > sure whether TOFU[1] posting spurred much of the rise of illiteracy or
> > the increase of relative illiteracy on the Internet led to an increase in
> > TOFU posting.  Which came first?
>
> I forgot to include the footnote about TOFU in the preceding message.  It
> would have looked something like this:
>
> [1]: TOFU = Text Over, Fullquote Under; the most common format of top
> posted replies

The footnote was easy to understand after a quick Wikipedia search:
http://en.wikipedia.org/wiki/Top-posting#Top-posting

Quoting the text (so list members don't have to actually repeat the
search):

Some maintain that top-posting is _never_ appropriate, and refer to
it jokingly as the "TOFU" method (from the German "text oben,
fullquote unten", sometimes translated "text over, fullquote
under") [...]

Nice one.  I had not heard of "TOFU posting" before :)

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


Re: Getting around ISP SMTP firewall settings (Re: Submitting a new port if send-pr is broken)

2007-11-26 Thread Giorgos Keramidas
On 2007-11-26 04:00, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>BTW I a redirected this to -questions
>> You should be able to set up a local mailer/MTA (sendmail, postfix,
>> etc.) and tell it to use your ISP's mail server on TCP port 25, and
>> it all should just "magically work" unless they require SMTP AUTH
>> (not many do from what I've seen; they base authentication on the
>> source IP of customers).
>>
>> sendmail refers to this feature as SMART_HOST, while postfix refers
>> to it as a transport destination (see transport(5)).
>
> I have not set the MTA up yet for it but I did test it with
> thunderbird... an other question how can I set it up that I can
> receive mail (dynamic IP and 25 inbound is blocked)?

Thunderbird doesn't necessarily go through an SMTP connection to the
local host, so it may work with or without a local MTA installation &
setup (depending on which host you forward outgoing email).

If you set up Thunderbird to use `localhost' for outgoing email, then
you have to also configure a local MTA (Sendmail, Postfix, or qmail are
popular choices).

I don't think there's an easy way to set up the local Sendmail
installation to *receive* email from the world without some sort of
`static address' though.  To do that, you would have to work with your
ISP, so that:

* Your address does not change semi-randomly or ramdonly.

* Your fully qualified domain resolves correctly and its MX records
  point to your static IP address.

* Your incoming port 25 traffic is not filtered.

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


Re: Strange kernel log message

2007-11-26 Thread Giorgos Keramidas
On 2007-11-26 09:58, Ceri Davies <[EMAIL PROTECTED]> wrote:
> So I have this in my security run output:
> kernel log messages:
> +++ /tmp/security.hLYJI0kFSun Nov 25 03:01:02 2007
> +222>2>>>NNNMNMMIII M  III SIISAS SAAA  3 303,020,0 ,,  EE IEIIESSSAIAA S 
> A f ff
> +
> +
> +f
>
> WTF now?
>
> I'm not sure if that's a real kernel message that got garbled or whether
> I should be worried about naughtiness.

It looks like multiple messages overlapping each other.  Removing 3
characters every 4 bytes in the output produces things which seem
vaguely recognizable:

<22NNI II A ,,,EISA  fff
<<2>NMI  SS 300  ISAAfff

There's a sysctl option which you can tweak to make this less likely to
happen, but I am not sure about its name.  Our console gurus can help
you track it down and tune its value :)

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


Re: Building FreeBSD on Linux

2007-12-02 Thread Giorgos Keramidas
On 2007-11-30 16:06, "Saravanan Shanmugham (sarvi)" <[EMAIL PROTECTED]> wrote:
>  
> Hi,
> I am trying to build all of FreeBSD from a Linux Machine and seem to
> be running into problems.  We have farm of build machines that we use
> to build many other things and my team would look like to use it going
> forward for our FreeBSD development.
>  
> Has anyone tried this before? 
>  
> I have tried GNU Make 3.80 as well as pmake. And I can't seem to find
> bmake for Linux.

I don't know of any port of BSD make(1) to Linux, or if that would be
sufficient to cross-build FreeBSD.  I'm trying to build a snapshot of
FreeBSD make(1) which builds with autoconf, for other stuff, but it
may take a while before I have a fully autoconf-ified version and that
may still not be adequate.

You can always try booting a FreeBSD snapshot inside vmware or qemu,
and build FreeBSD from FreeBSD, but that may be a bit slow...

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


FreeBSD make on other platforms [was: Re: Building FreeBSD on Linux]

2007-12-03 Thread Giorgos Keramidas
On 2007-12-03 08:08, Micha?l Gr?newald <[EMAIL PROTECTED]> wrote:
>"Saravanan Shanmugham (sarvi)" <[EMAIL PROTECTED]> writes:
>> I have tried GNU Make 3.80 as well as pmake. And I can't seem
>> to find bmake for Linux.
>
> I have found in my vaults a script that downloads pmake source from
> your favorite FreeBSD's mirror and builds a binary that worked on (at
> least one workstation running) Linux.

Since there seems to be so much interest in running FreeBSD
make(1) on other platforms, I've committed what I have done so
far to .  It's not a full port
of FreeBSD make(1) yet, but anyone interested to help is invited
to hop in and give me a hand :)

The main goal of this `project' is to have a fully buildable
version of FreeBSD make(1) on Linux and Solaris, so that one can
build FreeBSD-like makefiles by running:

/usr/local/bin/bmake [ -f BSDmakefile ]

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


Re: Building FreeBSD on Linux

2007-12-03 Thread Giorgos Keramidas
On 2007-12-02 20:13, "Saravanan Shanmugham (sarvi)" <[EMAIL PROTECTED]> wrote:
> I installed/bootstrapped NetBSD pkgsrc on the linux box. This comes
> with bmake(which I think standas for bsdmake).

pkgsrc is a very different ``beast'' altogether.

It knows enough to bootstrap itself on any host with a vaguely
POSIX-compatible shell, and some sort of host-make(1) tool.

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


Re: FreeBSD make on other platforms [was: Re: Building FreeBSD onLinux]

2007-12-04 Thread Giorgos Keramidas
On 2007-12-04 08:29, "Saravanan Shanmugham (sarvi)" <[EMAIL PROTECTED]> wrote:
> Hi Giorgos,
>  The build failed for me 'with a syntax error before "__dead2" '.
>  Are there any special include files I am supposed to have?
> I had trouble with the autoconf version I had installed and had to
> upgrade to the latest.
> Then I was able to move past, autoconf, automake, configure.

The project is in its 'prenatal' stage yet, but I'm trying to move a bit
faster towards a buildable source tree on Linux.  As Philip notes:

On 2007-12-04 11:33, "Philip M. Gollucci" <[EMAIL PROTECTED]> wrote:
> __dead2 is a custom gcc modification.  It just means the function
> doesn't return IIRC.

There's still a fair amount of work to make the source tree buildable on
non-FreeBSD platforms.  One of the next steps should be to make these
FreeBSD-specific bits (mostly stuff from src/sys/sys/cdefs.h) available
outside of the full FreeBSD src/ tree too.

Happily, the FreeBSD source is BSD-licensed, so I can import parts of it
to the bmake source tree easily :)

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


Re: smart_host on sendmail min config

2007-12-10 Thread Giorgos Keramidas
On 2007-12-10 15:08, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>Chuck Swiger wrote:
>>On Dec 10, 2007, at 11:40 AM, Aryeh Friedman wrote:
>>> What else do I need to add to this to make it work (i.e. send all
>>> mail via mx1.optonline.net):
>>>
>>> OSTYPE(`freebsd6')dnl define(`SMART_HOST',
>>> `mx2.optonline.net')dnl
>>
>> Look at /etc/mail/freebsd.mc and edit the SMART_HOST line as above.
>> (Note that you can copy freebsd.mc to hostname.mc and use the latter
>> filename in order to avoid modifying the generic template file.)
>
> Just tried that the ISP just eats a test message (to the addr I am
> sending this from) but a direct telnet to port 25 on the smart host
> works fine

If a direct telnet to port 25 works, then SMART_HOST should work too.

Can you grab log messages from `/var/log/maillog', and post them?

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


Re: smart_host on sendmail min config

2007-12-11 Thread Giorgos Keramidas
On 2007-12-10 22:00, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
> Dec  9 09:15:38  newsyslog[587]: logfile first created
> Dec  9 09:15:38  sm-mta[720]: starting daemon (8.14.2): [EMAIL 
> PROTECTED]:30:00
> Dec  9 09:15:38  sm-msp-queue[724]: starting daemon (8.14.2): [EMAIL 
> PROTECTED]:30:00
> Dec  9 12:22:28  sm-mta[729]: starting daemon (8.14.2): [EMAIL 
> PROTECTED]:30:00
> Dec  9 12:22:28  sm-msp-queue[733]: starting daemon (8.14.2): [EMAIL 
> PROTECTED]:30:00
> 
> completely unchanged before and after I attempted to sendmail to my
> self (after a reboot but not a restart of sendmail [I have a
> handcrafted /etc/rc so I know it doesn't run sendmail on boot])

I don't see message sending attempts above.  Since you have modified
`/etc/rc' can you show me the processes launched for Sendmail, the way
they started, and then how you are trying to send an email message?

Ideally, something like `mail -v' should show at least an attempt to
post the message to the local queue:

% $ mail -v keramida
% Subject: foo
% testing
% .
% EOT
% keramida... Connecting to [127.0.0.1] via relay...
% 220 kobe.laptop ESMTP Sendmail 8.14.2/8.14.2; Tue, 11 Dec 2007 18:26:12 +0200 
(EET)
% >>> EHLO kobe.laptop
% 250-kobe.laptop Hello kobe.laptop [127.0.0.1], pleased to meet you
% 250-ENHANCEDSTATUSCODES
% 250-PIPELINING
% 250-8BITMIME
% 250-SIZE
% 250-DSN
% 250-ETRN
% 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
% 250-DELIVERBY
% 250 HELP
% >>> MAIL From:<[EMAIL PROTECTED]> SIZE=35 [EMAIL PROTECTED]
% 250 2.1.0 <[EMAIL PROTECTED]>... Sender ok
% >>> RCPT To:<[EMAIL PROTECTED]>
% >>> DATA
% 250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
% 354 Enter mail, end with "." on a line by itself
% >>> .
% 250 2.0.0 lBBGQCj8018567 Message accepted for delivery
% keramida... Sent (lBBGQCj8018567 Message accepted for delivery)
% Closing connection to [127.0.0.1]
% >>> QUIT
% 221 2.0.0 kobe.laptop closing connection
% $

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


Re: smart_host on sendmail min config

2007-12-11 Thread Giorgos Keramidas
On 2007-12-11 13:02, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>> Ideally, something like `mail -v' should show at least an attempt to
>> post the message to the local queue: [...]
>
> monster-freebsd# sendmail -bd -q1m -v
> 050 WARNING: local host name (monster-freebsd) is not qualified; see
> cf/README: WHO AM I?
> monster-freebsd# mail -v [EMAIL PROTECTED]
> Subject: test fopo
> dsadad
> .
> EOT
> WARNING: local host name (monster-freebsd) is not qualified; see cf/README: 
> WHO AM I?
> [EMAIL PROTECTED] Connecting to [127.0.0.1] via relay...
> 220 monster-freebsd ESMTP Sendmail 8.14.2/8.14.2; Tue, 11 Dec 2007
> 13:00:27 -0500 (EST)
> >>> EHLO monster-freebsd
> 250-monster-freebsd Hello localhost [127.0.0.1], pleased to meet you
[...]
> 354 Enter mail, end with "." on a line by itself
> >>> .
> 250 2.0.0 lBBI0RgU000340 Message accepted for delivery
> [EMAIL PROTECTED] Sent (lBBI0RgU000340 Message accepted for delivery)
> Closing connection to [127.0.0.1]
> >>> QUIT
> 221 2.0.0 monster-freebsd closing connection

Neat!  Your local Sendmail submission service works then.  You should be
able to see the message in the `clientmqueue' with:

mailq -Ac

Now, can you show us how your local rc system starts Sendmail, and the
active Sendmail processes you are using?  It may be working fine, but
only queueing messages in `/var/spool/clientmqueue'.  A queue runner
should also be started to periodically scan and handle the clientmqueue
messages.

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


Re: smart_host on sendmail min config

2007-12-11 Thread Giorgos Keramidas
On 2007-12-11 13:25, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>Giorgos Keramidas wrote:
>> Neat!  Your local Sendmail submission service works then.  You
>> should be able to see the message in the `clientmqueue' with:
>>
>> mailq -Ac
>>
>> Now, can you show us how your local rc system starts Sendmail, and
>> the active Sendmail processes you are using?  It may be working
>> fine, but only queueing messages in `/var/spool/clientmqueue'.  A
>> queue runner should also be started to periodically scan and handle
>> the clientmqueue messages.

I'm sorry, but this is the *third* time I am asking the same thing, and
it's getting a bit boring.  Do you _really_ want help, or just to have a
bit of email fun for a while?

You still haven't shown us:

* How your local rc system starts Sendmail

* The active Sendmail processes you have now

> monster-freebsd# !sen
> sendmail -bd -q1m -v
> # very long pause
> 050 WARNING: local host name (monster-freebsd) is not qualified; see
> cf/README: WHO AM I?

Your DNS is broken, and Sendmail cannot resolve `monster-freebsd'.
That's not a Sendmail issue, so I'm ignoring that for now.

> monster-freebsd# mailq -Ac
> # very long pause
> /var/spool/clientmqueue (8 requests)
> - -Q-ID- --Size-- -Q-Time-
> - Sender/Recipient---
> lBAEQDUM0772289 Mon Dec 10 09:26 aryeh
>  (Deferred: Connection refused by [127.0.0.1])
>  [EMAIL PROTECTED]

No submission service running.  You have to start at least some process
which listens on 127.0.0.1:25 for incoming email requests and a queue
runner for clientmqueue.  I haven't seen any "ps xauwww" output for the
Sendmail processes you are currently running, so no idea why you don't
have a listener on 127.0.0.1:25.

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


Re: smart_host on sendmail min config

2007-12-11 Thread Giorgos Keramidas
On 2007-12-11 13:53, "Aryeh M. Friedman" <[EMAIL PROTECTED]> wrote:
>Giorgos Keramidas wrote:
>> You still haven't shown us:
>>
>> * How your local rc system starts Sendmail
> 
> Until I can get it right from the command line I am not going to
> include it in my /etc/rc thus currently there is none
>
>> * The active Sendmail processes you have now
> 
> Except for the one I start (with the below command line) before
> sending there is none running.

Then you need to replicate what `/etc/rc.d/sendmail' does.  You have the
code to that script, you also have `/etc/defaults/rc.conf' as a guide of
the defaults supported by FreeBSD.  Happy hacking :)

I'm not interested in rewriting `/etc/rc.d/sendmail' from scratch, so
other than a few pointers like the following, I'm out of the thread:

> here is the complete transcript of my last attempt to actually send
> something: [...]

> monster-freebsd# sendmail -bd -q1m

Here you started a sendmail process which listens for connections to
*all* interfaces.  That's probably ok if you plan to accept incoming
SMTP connections on _any_ interface, i.e. because you are running a
Sendmail server accessible from outside.

On my laptop this would be replaced by:

/usr/sbin/sendmail -L smtpd -bd -q30m \
-ODaemonPortOptions=Addr=localhost

Note the use of the -O flag to make sure Sendmail is only listening on
the localhost:25 port for mail submission requests.

Then you have to start a *second* Sendmail instance, to flush the local
`clientmqueue' and forward the messages you see as `Deferred' when you
run the `mailq -Ac' command:

> monster-freebsd# mailq -Ac
> /var/spool/clientmqueue (8 requests)
> - -Q-ID- --Size-- -Q-Time-
> - Sender/Recipient---
> lBAEQDUM0772289 Mon Dec 10 09:26 aryeh
>  (Deferred: Connection refused by [127.0.0.1])
>  [EMAIL PROTECTED]

Now you have to run a second Sendmail instance, i.e. with:

/usr/sbin/sendmail -L mailq -Ac -q10m

NOTE: The `smtpd' and `mailq' arguments to the -L options are not the
standard names FreeBSD assigns to these processes.  They are just the
ones I use on my laptop.

Since you are using a custom, local sendmail startup script, that's
about the best I can write to get you kickstarted.  For more help with
the way Sendmail operates, you can always refer to the ``Sendmail(TM)
Installation and Operation Guide''.  A copy of the guide is conveniently
installed by the FreeBSD installation process at:

/usr/share/doc/smm/08.sendmailop/*

Good luck with the startup scripts.  I don't really understand why you
insist on rewriting something which works(TM), is featureful and easy to
extend, like the rc.d scripts, but that's besides the point :-)

- Giorgos

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


Re: How to use cut or awk commands into sed command ?

2007-12-12 Thread Giorgos Keramidas
On 2007-12-12 23:19, Halid Faith <[EMAIL PROTECTED]> wrote:
> I have a file named file1 which contains some values.
> I want to replace some strings into it, so I use sed command but I get an 
> error.
>
> sed "s#oldstring#`cut -d, -f3 file2`#"  file1
> sed: 1: "s/yenidomain2/f0b2875d- ...": unterminated substitute in regular 
> expression

That's not enough information to help you in a meaningful manner.

* What does `file2' have to do with the replacement strings, and why do
  you use it?

* What are the contents of both files?

* What do you want to replace, and what should it be replaced with?

> also I get an error with awk command into sed;
> sed "s#oldstring#`awk -F, '{print$3}' file2`#"file1
> sed: 1: "s#yenidomain2#f0b2875d- ...": unterminated substitute in regular 
> expression

That's not very different from the cut-based command.

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


Re: How to use cut or awk commands into sed command ?

2007-12-13 Thread Giorgos Keramidas
On 2007-12-13 09:35, Halid Faith <[EMAIL PROTECTED]> wrote:
> Let me try to explain
> I have a file called A which contains variable values as below;
> file1, abc12
> foot1, cba11
> boby, def123
> ...
> 
> Also I have another file called B which contains partly valuable values as
> following;
> ### file of A begin
> Server valuable1
> Client valuable2
>  the file end
> 
> I have to assign the first column valuables in A to valuable1 in B and
> assign second column valuable1 in A to valuable2 in B.
>
> Finally I should see as following in a file called C
> Server file1
> Client abc12
> 
> Server foot1
> Client cba11
> 
> Server boby
> Client def123
>
> How can I do that ? Could you give me a script ?

Look carefully at the second input file:

Server valuable1
Client valuable2

Now look *very* carefully at the output you want:

Server file1
Client abc12

Server foot1
Client cba11

Server boby
Client def123

Can you imagine a *loop* which reads the input file and creates the
second?  In `pseudo-code' this would be something like:

for each pair of (server, client) from `file1':
for each line in `file2':
substitute `server' and `client' in `line'
print resulting line
print an empty line

That shouldn't be *too* hard to write in a shell script.  Now that you
have the outline, see if you have better luck.

- Giorgos

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


Re: Apparently, csh programming is considered harmful.

2007-12-13 Thread Giorgos Keramidas
On 2007-12-13 18:05, Chad Perrin <[EMAIL PROTECTED]> wrote:
> I ran across this today:
> 
>   http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
> 
> Title:
>   Csh Programming Considered Harmful
> 
> I wonder what responses I might get here, and how much of this applies
> to tcsh as well (I'm still not exactly a tcsh expert).

Most of the points made in the FAQ about scripting large `applications'
with csh ring a bell for me.  Now, having said that, /bin/sh is nice for
small to medium-sized scripts, but there is a certain point where even
sh(1) becomes annoying.

Do you have any _particular_ parts of the csh-whynot article that you
would like to discuss, or this is a free for all flame? :)

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


Re: Apparently, csh programming is considered harmful.

2007-12-13 Thread Giorgos Keramidas
On 2007-12-13 21:59, Chuck Robey <[EMAIL PROTECTED]> wrote:
>Giorgos Keramidas wrote:
>> On 2007-12-13 18:05, Chad Perrin <[EMAIL PROTECTED]> wrote:
>>> I ran across this today:
>>>
>>>   http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
>>>
>>> Title:
>>>   Csh Programming Considered Harmful
>
> That was written sometime last millenium, I mean, it's REALLY old.  The
> question is sort of flamebait (you ought to go ask it on, say, the Linux
> IRC channel, for well-reasoned, adult discussion (NOT!)  In general, it's
> right, you really wouldn't want to use tcsh as a scripting language.  Read
> it, you'll come out ahead, but understand, that tcsh is a heck of a good
> general purpose command shell for users.

Tcsh is a fine shell.  I'm using it all the time (that's how I found out
that a buglet reported by Kris Kennaway a few months ago was indeed a
bug which I could reproduce too).

I just don't like it for scripting :-)

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


Re: Absolute FreeBSD

2007-12-14 Thread Giorgos Keramidas
On 2007-12-14 15:22, Barnaby Scott <[EMAIL PROTECTED]> wrote:
> I have just finished it and I would say it does exactly what what Ted
> and cpghost suggests it should - there are plenty of sections where
> the author introduces what can be done with a particular tool or part
> of the OS, and suggests to the reader to investigate further options
> in the approriate manuals. It also quite openly acknowledges that
> there is plenty that is not covered at all.
> 
> As someone with very limited experience (I'm not sure if I still
> classify as a *complete* newbie) I found the book an excellent and
> even entertaining read, which serves it purpose extremely well: to
> give an overview and introduction, but with enough detail in relevant
> places to be able to get real, useful stuff done.

Michael has a writing style which I like a lot, but I haven't had a
chance to read the second version yet.

I've read the first version cover to back, however, and it was written
in a very entertaining, elegant style.  Judging from my experience with
the first edition, I expect nothing less than what you just described :)

- Giorgos

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


pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.]

2007-12-14 Thread Giorgos Keramidas
On 2007-12-14 21:10, Frank Shute <[EMAIL PROTECTED]> wrote:
> I used bash for an interactive shell for about 5 years until I
> discovered the goodness of pdksh. About half the size, statically
> linked, not full of bugs and better editing features. Plus it's not
> GPL.

Hi Frank,

Now that you mention pdksh, have you tried mksh (in Ports too)?

I've installed it and successfully run moderately large ksh scripts
(like the webrev(1) utility of OpenSolaris), and it is about an order of
magnitude smaller than pdksh here:

% [EMAIL PROTECTED]:/usr/local/bin$ ls -ld mksh bash ksh
% -rwxr-xr-x  1 root  wheel  -  684699 Dec  9 19:51 bash
% -r-xr-xr-x  1 root  wheel  - 2390645 Aug 31 17:07 ksh
% -r-xr-xr-x  1 root  wheel  -  236202 Dec  9 18:34 mksh
% [EMAIL PROTECTED]:/usr/local/bin$ ldd mksh bash ksh
% mksh:
% libc.so.7 => /lib/libc.so.7 (0x280ae000)
% bash:
% libncurses.so.7 => /lib/libncurses.so.7 (0x28101000)
% libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28144000)
% libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28156000)
% libc.so.7 => /lib/libc.so.7 (0x2824b000)
% ldd: ksh: not a dynamic executable
% [EMAIL PROTECTED]:/usr/local/bin$

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


Re: GOOD boook!

2007-12-14 Thread Giorgos Keramidas
On 2007-12-14 14:44, Gary Kline <[EMAIL PROTECTED]> wrote:
> Many thank to whomever recommended SED AND AWK a few weeks ago.
> Was it you, Giorgos?

Not really, no.  At least, my `sent-mail' folder didn't come up with any
matches.  But it's a jewel of a book, you're right about that...

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


Re: Copying a FreeBSD install to a smaller disk

2008-09-11 Thread Giorgos Keramidas
On Thu, 11 Sep 2008 17:19:55 -0700, "Chris Weiss" <[EMAIL PROTECTED]> wrote:
> How would I go about copying an existing FreeBSD installation to a smaller 
> disk?
>
> I've got a 3rd FreeBSD install I can boot from and store temporary
> files on, all the disks are in the same hardware, so there's no
> reconfiguration other than the boot device name and interface (IE
> -SATA ad4 will become IDE ad0). The disk is partitioned using the
> "default" sysinstall values and the contents of the larger disk will
> fit on the smaller disk, although I need to increase the size of the /
> and /var slices on the target to hold everything (/usr is fairly
> empty, so it'll easily fit on the smaller disk).
>
> For now, we'll say ad0 = new smaller disk, ad4 = boot BSD disk, and
> ad6 = the BSD install I want to clone.
>
> The path I've been going down is to manually partition and slice ad0
> create ad4/mnt/source and ad4/mnt/target and mount /var, /tmp, etc
> from ad0 and ad6 and manually copy the files. But I'm stuck on how to
> handle /, since it'll have dev and proc and such.

Hi Chris,

If all you want is to make ad0 bootable, you don't need the *contents*
of the /dev and /proc file systems.  They are dynamically generated by
the kernel when you mount these file systems and access them.

If the used disk space in ad6 (the clone source drive) is less than the
size of the clone target, it should be possible to copy the source files
using any of:

* tar
* dump & restore
* cpio

Some care must be taken to avoid copying special file systems, like /dev
and /proc that you mentioned.  If you use something like a Live CD-ROM
to boot, instead of booting from the 'source' disk, this should be easy,
because the special /dev and /proc file systems will be mounted only for
the *boot* device (the CD-ROM in this case), so the hard disk partitions
will merely include empty directories as `potential mount-points' for
the /dev, /proc and other special places.

FWIW, the steps I followed when I cloned my old laptop installation to a
new hard disk are the ones shown below.  I didn't want to open the
laptop, because that would violate its guarantee terms.  So I kept the
'target' disk as ad0 and used a USB-attached enclosure for 2.5" hard
disks to attach the original 'source' disk (taken out of my old, dead
laptop).

[1] Boot from CD-ROM using a FreeSBIE installation(*).

(*) Many thanks to the FreeSBIE folks, for making such an easy to
use Live CD-ROM.  I have found it very useful far too many times to
mention all of them in an email post!

[2] Create an /mnt/source and /mnt/target directory.

# mkdir -p /mnt/source
# mkdir -p /mnt/target

[3] Mount the source root partition, and then use the existing mount
points under that source tree to mount the target partitions:

# mount -o ro /dev/da0s1a /mnt/source
# mount -o ro /dev/da0s1e /mnt/source/home

Note that, for extra safety, I mounted the source partitions as
read-only.  This way I would at least get a warning if I botched the
copying process, and avoid messing my original 'source' data.

[4] Partition and mount the target disk (the internal ad0 disk of the
laptop).  This is where booting from a Live CD-ROM helped a lot,
because I didn't have to do anything special to 'resize' or 'keep'
parts of the disk unpartitioned.  I could use the *full* disk for
the new installation.

# fdisk -BI /dev/ad0
# bsdlabel -w -B /dev/ad0s1
# bsdlabel -e /dev/ad0s1

When I had configured the new ad0s1a and ad0s1e partitions, I saved
the label and exited bsdlabel's editor.

[5] Format the target partitions:

# newfs -L MYROOT /dev/ad0s1a
# newfs -L MYHOME -U /dev/ad0s1e

The -L labels are entirely optional, and, as you can see, I only
enabled softupdates on the new /home partition.

[6] Mount the target partitions under `/mnt/target'.  The mounts were
read-write this time:

# mount /dev/ad0s1a /mnt/target
# mkdir /mnt/target/home
# mount /dev/ad0s1e /mnt/target/home

Note that the second command is not optional.  The new root file
system was brand new, so it appears completely empty after being
mounted.

[7] Copy everything using BSD tar(1):

# tar -C /mnt/source -cf - . | tar -C /mnt/target xvf -

[8] The final step was to chroot into the new 'target' system, and
fix-up any special directory permissions, by using the mtree(8)
specifications from `/etc/mtree'.  This restores any special flags
like `noschg' or the permissions required for proper daemon
operation in `/var/run' and so on.

To avoid side-effects from the runtime environment of the shell I
was using `outside' of the chroot, I cleared all environment
variables, and manually set only the bare minimum of stuff I needed
`inside' the chroot:

# env -i USER='root' SHELL='/bin/csh' HOME='/root' \
  PATH='/bin:/sbin

Re: Copying a FreeBSD install to a smaller disk

2008-09-11 Thread Giorgos Keramidas
On Fri, 12 Sep 2008 04:55:36 +0300, Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
> [8] The final step was to chroot [...]
> [9] Finally, I checked the new `/etc/fstab' [...]

Heh!  Adding `one last "final" step' didn't really work very well in
this case.  I should have read the long message another time before
hitting `send'.

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


Re: Disappearing Hard Drive?

2008-09-12 Thread Giorgos Keramidas
On Fri, 12 Sep 2008 17:40:20 -0700 (PDT), Richard Mahlerwein <[EMAIL 
PROTECTED]> wrote:
> I have a puzzling problem.  I'm sure I just missed something simple,
> but I can't figure out what.
>
> I added a drive to my system as Master on controller 2.   After
> turning back on, I found I couldn't see that 80 GB drive on my
> system.  I turned it off, checked all settings, then turned it back on
> and verified that the BIOS can see it - it's properly listed as an 80
> GB Samsung as Master on 2.  It sounds normal, looks normal and I can
> feel it spin up.
>
> But I still don't see it on my system to mount it.  I had just done
> this process with a 40 GB drive and it worked just fine, so I knew
> that I knew how to do it.  That one showed up in dmesg and was easily
> mounted.  For what it's worth, my Linux desktop, when I hook this
> drive up to an oddball USB-ATA adapter, acts exactly like it does with
> every OTHER drive I've pulled out of a FreeBSD box - it sees it but
> hasn't a clue how to mount it properly.  So I don't think the drive is
> a dud or anything.  It was in use until a few weeks ago.

If you connect the drive to the USB-SATA adapter and then attach to BSD,
does the drive also work fine?

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


Re: How to split a C string by a string?

2008-09-17 Thread Giorgos Keramidas
On Wed, 17 Sep 2008 00:45:46 -0700 (PDT), Unga <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I'm writing an C application on FreeBSD 7+. I need to split a string
> by another string (ie. the delimiter is "xxx") similar to strtok split
> a string by a single char. Is there a standard function or is there a
> FreeBSD functions for this?

You can use strstr() to look for the "xxx" delimited and split that that
point:

  % cat -n foo.c
   1  #include 
   2  #include 
   3
   4  int
   5  main(void)
   6  {
   7  char text[] = "Hello string world";
   8  char delim[] = " string ";
   9  size_t dlen = sizeof(delim) / sizeof(delim[0]) - 1;
  10  char *p;
  11
  12  p = strstr(text, delim);
  13  if (p == NULL)
  14  return 0;   /* No match */
  15
  16  printf("First part =  \"%.*s\"\n", p - text, text);
  17  printf("Second part = \"%s\"\n", p + dlen);
  18  return 0;
  19  }
  % cc -std=iso9899:1990 -O2 -Wall foo.c
  % ./a.out
  First part =  "Hello"
  Second part = "world"
  %

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


Re: How to split a C string by a string?

2008-09-17 Thread Giorgos Keramidas
On Wed, 17 Sep 2008 06:32:56 -0700 (PDT), Unga <[EMAIL PROTECTED]> wrote:
> --- On Wed, 9/17/08, Giorgos Keramidas <[EMAIL PROTECTED]> wrote:
>> From: Giorgos Keramidas <[EMAIL PROTECTED]>
>> Subject: Re: How to split a C string by a string?
>> To: [EMAIL PROTECTED]
>> Cc: freebsd-questions@freebsd.org
>> Date: Wednesday, September 17, 2008, 6:17 PM
>> On Wed, 17 Sep 2008 00:45:46 -0700 (PDT), Unga
>> <[EMAIL PROTECTED]> wrote:
>> > Hi all
>> >
>> > I'm writing an C application on FreeBSD 7+. I need to split a
>> > string by another string (ie. the delimiter is "xxx") similar to
>> > strtok split a string by a single char. Is there a standard
>> > function or is there a FreeBSD functions for this?
>>
>> You can use strstr() to look for the "xxx" delimited and split that
>> that point: [snip sample code]
>
> Thank you very much for the reply. That is, there is no existing split
> function. So I got to write to my own :)

Yes, you have to roll our own.  The standard C library doesn't have
string splitting functions with a string as delimiter.  It includes
strtok(), strspn() and strcspn(), but these work with character sets as
delimiters, not strings...

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


Re: rsync colon in filename to MSWin fails

2008-09-19 Thread Giorgos Keramidas
On Fri, 19 Sep 2008 13:37:50 +0100, Anton Shterenlikht <[EMAIL PROTECTED]> 
wrote:
> I cannot trasfer a file with a colon via rsync to a Win box.
> I've rsync-3.0.4 on the FBSD (sending side) and rsync-2.6.9
> under cygwin on Win (receiving side). I'm not sure what the
> error message means:
>
> % rsync ./http:__en.wikipedia.org_favicon.ico [EMAIL PROTECTED]:
> rsync: rename "/cygdrive/c/Documents and Settings/mexas/My 
> Documents/work/.http:__en.wikipedia.org_favicon.ico.8dBX2K" -> 
> "http:__en.wikipedia.org_favicon.ico": No such file or directory (2)
> rsync error: some files/attrs were not transferred (see previous errors) 
> (code 23) at main.c(1040) [sender=3.0.4]
>
> Note the extra dot before the file name, and extra suffix at the
> end. Is this the expected behaviour?

Yes, this is the expected broken behavior of Windows.  The ':' character
cannot be used in a normal filename in Windows.  The bug goes way back,
when DOS developers chose to use ':' to denote 'drive names'.

> However, to another FBSD box transfer is fine:
>
> % rsync ./http:__en.wikipedia.org_favicon.ico [EMAIL PROTECTED]:
> %

UNIX only reserves '/' as the path separator (and in some cases the '\0'
character for the end-of-fiename string marker).  So the ':' character
is valid for file names or directory names.

> Is this something to do with Windows, or old rsync version on cygwin?

Yes, it has to do with Windows.

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


Re: Segmentation fault when free

2008-09-19 Thread Giorgos Keramidas
On Fri, 19 Sep 2008 20:03:03 -0700 (PDT), Unga <[EMAIL PROTECTED]> wrote:
> Hi thank you very much for your reply and the test case.
>
> That is, in a trivial case like this, free() works well. Hopefully
> free() works well in all cases too.
>
> But my main program is 1900 lines, f1() and f2() are in a 2200 lines
> second file. The f1() and f2() calls some functions from a 500 lines
> third file. The main program call another function, f3(), from 2nd
> file, pass pointers to two functions f4(), f5() of main program. The
> while loop iterate more than one million times. Its quite a complex
> situation.

You are probably calling free() multiple times for the same buffer.

Try tracing the malloc and free calls, using the information from this
message:

http://lists.freebsd.org/pipermail/freebsd-questions/2008-July/179480.html

> There must be an error somewhere else. I noted free() causes lot of
> troubles. It is easy to write complex programs if you just let to leak
> memory. But in my case, since the program iterate millions of times,
> if I let to leak, I'm sure it will run out of RAM.

Leaking memory is *never* a good choice.  Especially if you are writing
library code that others are supposed to use, or code that is supposed
to run millions of times.

While it's understandable as a 'quick hack' when you are first writing a
program, I've seen far too many 'quick hacks' that lived years and years
after the original 'experimental' period passed.  Hence the knee-jerk
reaction when I see leaks being used as a 'temporary' solution :)

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


  1   2   3   4   5   6   7   8   9   10   >