Re: Shell scripts: variable assignment within read loops

2008-08-21 Thread Jan Grant
On Sun, 17 Aug 2008, David Wolfskill wrote:

[snipped]
 will assign to foo the value of the bar variable form the last record
 read (in FreeBSD 6.3-STABLE, at least), the following fails to do so:
 
   foo=
   cat $filename | while read bar ... ; do
...
 foo=$bar
...
   done
   echo $foo
 
 Well, that's not *quite* accurate:the assignment is done all right, but
 in the latter case, it appears to be done in a subshell, so by the time
 we get to the echo statement, any variable assignments from within the
 read loop have vanished.

You've already defined the reason behind this. Since subshells for parts 
of pipelines aren't guaranteed, you need something more clever. Assuming 
you're only interested in the _last_ value of foo, you could try this:

foo=$(
cat $filename | (
while read bar; do
...
foo=$bar
...
done
echo $foo
) )

Cheers,
jan


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
( echo ouroboros; cat )  /dev/fd/0 # it's like talking to yourself sometimes
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sh script difficulties (running parallel functions)

2007-11-01 Thread Jan Grant
On Thu, 1 Nov 2007, David Naylor wrote:

 Hi,
 
 I am having a hard time getting (very complex script for me) to work.  The
 basic idea is that this script runs a bunch of tarkets, many of which are
 time consuming but low on resources (such as downloading files).  Now if I
 run the tarkets all at once (given some dependancy issues) it greatly speeds
 up the process (about 5 time speed increase).  However I do not know how to
 do this using sh...
 
 Example
 
 #!/bin/sh
 
 worker1() {
   # Copy some files
 }
 
 worker2() {
   # Download some files
 }
 
 worker3() {
   # Do something else
 }
 
 . # and so on
 
 run_jobs() {
   worker1 
   worker2 
   worker3 
   # !!! Somehow wait for over workers to finish before continuing !!!
 }
 
 #Finished
 
 Furthermore, how can signals be handled such that the signals get
 accumulated and once all the other workers have finished the signals get
 passed on (appropriately)

The wait shell builtin is part of what you're after.

You probably will need to trap the signals you're interested in 
catching. Just a

trap 'int=1' INT
wait
trap - INT

if [ x$int = x1 ]; then ... ; fi

should do it.


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
There's no convincing English-language argument that this sentence is true.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: is this for OO-2 for FBSD?

2007-10-30 Thread Jan Grant
On Mon, 29 Oct 2007, Aryeh M. Friedman wrote:

 OOo-2 from ports is really odd anyways... some
 people seem to be able to get it made right out of the box and others
 can't as far I can tell there is no rhyme or reason as to why it fails
 or does not fail

Seem to recall that OOo won't complete a build on a filesystem with 
noatime; there's a perl(? it's a long time since I did this) script that 
can't tell the difference between an fstat successfully returning 0 (for 
midnight, Jan 1 1970) and failing.

jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
OORDBMSs make me feel old; I remember when this was all fields.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Repeated PXE jumpstart

2007-09-21 Thread Jan Grant
On Fri, 21 Sep 2007, Erik Cederstrand wrote:

 Found the answer elsewhere, so this is just for the records...
 
 # sysctl kern.geom.debugflags=16
 # dd if=/dev/zero of=/dev/ad0 bs=512 count=1
 
 wipes the MBR and solves my problem.

The alternative is to put PXE ahead of the HD in the boot order, and 
call back to the deployment host at the end of installation (prior to 
reboot) to signal a DHCP reconfiguration.

It adds a PXE timeout to each boot; the upside is that replacing a 
wedging or otherwise broken install is just a matter of reconfiguring a 
DHCP server.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Random act of violence against bread: whole pint.
  -- extract from the Hawk the Slayer drinking game
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: best programming language for console/sql application?

2007-04-23 Thread Jan Grant
On Sun, 22 Apr 2007, Mike Jeays wrote:

 On Sunday 22 April 2007 06:32, Zhang Weiwu wrote:
  Dear list
 
  This is OT. I am a 4 year php developer and is very familiar with
  javascript and awk (familiar = knows and used all functions and features
  of the language itself) and I am a 5 year FreeBSD user. Being frustrated
  for the lack of a good console-based issue tracking tool (like mantis or
  bugzilla), I think I should start to write my own. I'll either start
  from scratch or (better) write a frontend for mantis which I used for
  years.
 
 1. If someone has already started, I should try join him/her rather
than reinventing the wheel. So if someone knows any person who is
starting to work on a slim console-based issue tracker, please let
me know. I already did quit a few searches. I know someone is
working on a console front-end of G-Forge, but a big software like
G-Forge is not what I am thinking of.

Not sure it's quite what you're after, but have a look at request 
tracker. It is primarily web based, with an email gateway, but also 
supports command-line operation via its bin/rt.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Whenever I see a dog salivate I get an insatiable urge to ring a bell.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Corrupted C Compiler

2006-12-05 Thread Jan Grant
On Mon, 4 Dec 2006, Rachel Florentine wrote:

From: Jan Grant [EMAIL PROTECTED]

I don't think it makes much sense, no. Zope is python-based and unless 
you're building products that rely on native libraries, what you 
describe doesn't sound like an accurate diagnosis. It's more likely 
(this is a stab in the dark) that you're running a script to regerate 
.pyc files; these are precompiled python bytecode files that are built 
from the corresponding .py files.

I don't have my references in front of me, but I ran into an error when 
I tried to runzope that I didn't understand, so I yahoo'd it and 
discovered that my c libraries were corrupted. It was recommended I run 
a certain command to clean them up. I ran that command and everything 
went smoothly. I repeated this process a few times. So yes, I'm sure 
that's what I did.

When you have a chance, it'd be nice to get a detailed error report
(including the command you were running to clean up the libraries).
 

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
...and then three milkmaids turned up
(to the delight and delactation of the crowd).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Corrupted C Compiler

2006-12-04 Thread Jan Grant
On Mon, 4 Dec 2006, Rachel Florentine wrote:

 Hi;
 I entered the following stupid command: cp -R /* /ad2 thinking that 
 would copy the contents of my working HD to my new 1/2 teraflop HD 
 (ad2). What it did was manage to wipe out some very important files 
 (thank goodness I had up-to-date backups) and it appears to have 
 corrupted gcc...my C compiler. I deduce this because when I go to build 
 Zope (as an example) from source I have to run a script afterwards that 
 repairs the broken C files. (This, strangely, is not the case if I build 
 Zope from port.) So, my questions for you programmers more experienced 
 than I, are:
 
 1) Does my assessment make sense? Is gcc corrupt?

I don't think it makes much sense, no. Zope is python-based and unless 
you're building products that rely on native libraries, what you 
describe doesn't sound like an accurate diagnosis. It's more likely 
(this is a stab in the dark) that you're running a script to regerate 
.pyc files; these are precompiled python bytecode files that are built 
from the corresponding .py files.

That's a part and parcel of readying Zope for production - however, Zope 
will run without those .pyc files (the .py files are compiled on first 
load instead).

I suspect that that's what's going on.
Cheers,
jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Usenet: The separation of content AND presentation - simultaneously.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Real-time command history sharing between interactive shells

2006-11-29 Thread Jan Grant
On Wed, 29 Nov 2006, Andrew Pantyukhin wrote:

 I want to be able to define groups of interactive
 shells (preferably even across different users)
 so they have one single shared command history.
 Any command executed in one of them should be
 available through all history mechanisms in the
 other ones.
 
 I imagine some ways to do it in tcsh. I'm sure
 many users would like this kind of functionality,
 maybe some of them have already implemented it?

zsh is a pretty good interactive shell (it finally weaned me off tcsh), 
as well as supporting a full range of redirection and control 
constructs. You should look at that, in particular the
set -o sharehistory
option (which does half of what you're after).

Combine this with a shared .history file and you should get the effect 
you're after.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Whenever I see a dog salivate I get an insatiable urge to ring a bell.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Real-time command history sharing between interactive shells

2006-11-29 Thread Jan Grant
On Thu, 30 Nov 2006, Andrew Pantyukhin wrote:

 I think, I'll follow your advice. It's high time I forgot about
 csh, but I wonder if you tried to change root's shell to zsh?

You can; I haven't. (exec zsh is simple to type.) sudo works well for 
single commands. I don't tend to spend much time as root, but that's a 
question of personal taste.

Cheers,
jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Spreadsheet through network. Oh yeah.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What Is the PATH to cyrus-sasl2?

2006-11-15 Thread Jan Grant
On Wed, 15 Nov 2006, Rachel Florentine wrote:

 Hi;
 I'm building openldap from source since I can't figure out how to pass 
 arguments to the port. I need to build with cyrus-sasl2, which is 
 built. 
 However, I don't know what the path is, and my build can't find it by 
 itself. Please help. TIA, Rachel

The generic approach to determining what a port has installed and where 
is this:

pkg_info -L {package name}

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


Re: Questions on first-time installation

2006-11-11 Thread Jan Grant
On Fri, 10 Nov 2006, Jerry McAllister wrote:

 On Wed, Nov 08, 2006 at 08:42:04AM +, Jan Grant wrote:
 
  On Tue, 7 Nov 2006, Bob Schwartz wrote:
  
   ... at least as it is desribed in the DELL
   docs and bios...
  
  Be really careful. The windows boot loader should be able to boot a 
  freebsd install for you. 
 
 I have never had a Windows MBR work to boot FreeBSD.   On the other
 hand I have never had a FreeBSD MBR fail to boot any MS-Win system.
 
 So, I wonder at your comment here.

That's a case of your mileage varying, I guess.

 I have never had to correct any partition/slice alignment when using
 the standard FreeBSD install.  I ignore that Diagnostic slice that
 Dell puts on - just leave it there as slice 1, leave MS there as
 slice 2 and put FreeBSD on slice 3 - or sometimes I put a FAT32 on
 as slice 3 to use for communication if the MS is NTFS, and then put
 FreeBSD on slice 4.   There has never been any problem with any
 alignment or offset.
[...]
 I have been doing this the way I describe since 1998 with no problem.

So to the OP, there you go: use of partition magic to manage the fdisk 
label apparently works.

Cheers,
jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Leverage that synergy! Ooh yeah, looking good! Now stretch - and relax.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Questions on first-time installation

2006-11-08 Thread Jan Grant
On Tue, 7 Nov 2006, Bob Schwartz wrote:

 ... at least as it is desribed in the DELL
 docs and bios...

Be really careful. The windows boot loader should be able to boot a 
freebsd install for you. Dell usually ship their machines with a small 
partition at the front of the drive (at least, they did last time I 
received one). That partition is at an odd offset and didn't agree with 
the FBSD partition editor: I found this out the hard way. Things may 
have changed since then; I usually nuke the dell partition anyway.

jan

PS. I should say that my bad experience with the partition editor is a 
few years old; I've not tried again recently with new Dell kit.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Axioms speak louder than words.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Questions on first-time installation

2006-11-08 Thread Jan Grant
On Wed, 8 Nov 2006, Bob Schwartz wrote:

  Be really careful. The windows boot loader should be able to boot a
 freebsd install for you.,
 
 Thank you.
 
 Either one works for me as long as I get full choice. If the windows loader
 simply picks up bsd and offers it in addition to the two windows installs
 that I need, no problem. Ditto if the bsd boot manager hands me off to the
 windows boot manager and gives me both choices.
 
 My concern...and I was going to write the group and ask...is that bsd's
 manager only returns one of the windows systems.
 
 What do you think, please?

The dell box I have at home boots using the NT/XP boot manager, that 
Just Works.

  Dell usually ship their machines with a small partition at the front of
 the drive (at least, they did last time I received one). That partition is
 at an odd offset and didn't agree with the FBSD partition editor: I found
 this out the hard way. Things may have changed since then; I usually nuke
 the dell partition anyway.
 
 They still do...and while I could nuke it, now that I have windows installs
 that I don't want to disturb, I am afraid to.
 
 If I leave them there, what, in your experience, happens?

Like I said, this experience is a few years old, but the fbsd partition 
manager wound up having problems and screwed the partition table. On the 
other hand, if you create an fdisk partition inside windows and don't do 
any fdisk editing from the freebsd install, just label and install into 
the precreated slice, you should be ok. Usual provisos apply: back up, 
and if at all possible try it first on some scratch kit.

G'luck,
jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Leverage that synergy! Ooh yeah, looking good! Now stretch - and relax.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: file redirect is destroying the file ? Help!

2006-10-30 Thread Jan Grant
On Mon, 30 Oct 2006, Ensel Sharon wrote:

 I have a script that, among other things, removes a line from
 /etc/ftpchroot.
 
 I do this with this method:
 
 
 cat /etc/ftpchroot | grep -v $remove  /etc/ftpchroot
 
 
 Easy.  You cat all of the file except the line you want to remove, and
 redirect it back to itself.
 
 The problem is, about 50% of the time, I end up with an empty ftpchroot
 file.  It is zero bytes.  This obviously has nothing to do with a bad
 variable, since if it wasn't there, the starting file and ending file
 would just be identical.
 
 Instead, I get an empty file.  I have reproduced this with other files in
 other places - works some of the time, other times gives me an empty file.
 
 What gives ?
 
 (note, I know a lot of ways to work around this - so I'm not so much
 asking how to fix this, as I am asking why does this happen ?)

It happens because the two processes either side of the pipe are 
competing for CPU resource. If the cat gets to run first then it'll 
slurp in the contents of the existing file (which will probably fit into 
one stdio buffer) and everything's hunky-dory. If the other half gets to 
go first, then the shell will open the file for output, truncating it in 
the process, and exec grep. At that point the cat will have another go 
and find nothing there.

Basically, what you've written is buggy and you need to use one of your 
workarounds.

Cheers,
jan


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
stty intr ^m
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tao.thought.org is back.....

2006-10-19 Thread Jan Grant
On Wed, 18 Oct 2006, Gary Kline wrote:

 On Thu, Oct 19, 2006 at 12:57:08AM +0300, Giorgos Keramidas wrote:

  By setting the MX records for `thought.org' up so that the one with
  the lowest value of them all points to that specific server.
  
  This should be configured in the name-server which hosts the DNS zone
  for `thought.org'.
 
   This would work [or ought to!]; right now, all my mail echange
   entries are equi-valued at 50.  But this seems like a back door
   way of dealing with sendmail.  I'm the first to admit that it's a
   less tha optimal suite, obscure beyond words, (etc).  But I'd
   like to understand how to resolve this problem with senmail

I would have suggested the DNS approach except that when I looked, 
tao.thought.org didn't exist in your DNS (as an A record) and since ns1 
looked like a dialup account, I assumed you're using NAT.

Your mailertable entry on ns1 should probably just read

thought.org relay:tao.thought.org
or maybe
thought.org smtp:tao.thought.org

and tao.thought.org should have thought.org in it's w class: that is, 
sendmail.cw or local-whatever-the-file-is-called.

You might need makemap to recreate the database from your plain file.

I suspect that you have an alias set up on ns1 that you're fiddling 
with. In order to get it to stick, you probably need to run 
newaliases. Since that's run on reboot if required, that'd explain 
your reboot-to-reconfigure behaviour.

Cheers,
jan

PS. If sendmail config is such an arcane art (and it is, unless you do 
it regularly) you might find there's mileage in installing an 
alternative MTA.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Goth isn't dead, it's just lying very still and sucking its cheeks in.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tao.thought.org is back.....

2006-10-18 Thread Jan Grant
On Wed, 18 Oct 2006, Gary Kline wrote:

   My one question is given that mail defaults to my
   ns1.thought.org, HOW can I get it to go to (say) zen.thought.org,
   or to tao.thought.org?  or to ethos.thought.org?   OR what 
   re-initialization do I  have to do?  other than a shutdown -r
   now??

Sounds like you need a mailertable entry that maps your incoming domain 
name to smtp:whatever.thought.org

jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
New Freedom of Information Act: theirs, to yours. Happy now?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How do I give 2 parameters to programs in an unix enviroment?

2006-09-11 Thread Jan Grant
On Mon, 11 Sep 2006, hackmiester (Hunter Fuller) wrote:

 On 8 September 2006, at 08:10, Lasse Edlund wrote:
 
  If I have two files foo and bar and try to run diff on them I write:
  $diff foo bar
  I can also write
  $cat foo | diff - bar
  But how do I give a program two (2) commands? not only to diff
  but to any program that wants double input...
  I wanna do
  $cat foo | cat bar | diff - -
 
 The entire purpose of cat is to concatenate files (make them output one after
 another). So, do:
 
 cat foo bar | diff - -

This advice is wrong.

To answer the original question: the shell pipe connects the stdout of 
the first process to the stdin of the second process using a pipe. The 
stock shells don't have a way of doing what you're after. If you have 
fdescfs mounted, ksh can do something like what you're after using the 
syntax:

diff (cat foo) (cat bar)

zsh supports something similar and can work around the lack of fdescfs.


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
( echo ouroboros; cat )  /dev/fd/0 # it's like talking to yourself sometimes
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: man page bug in mv(1) ?

2006-09-10 Thread Jan Grant
On Sun, 3 Sep 2006, James Long wrote:

 The man page mv(1) states:
 
 It is an error for either the source operand or the destination path 
 to specify a directory unless both do.
 
 
 However:
 
 mv file /tmp/
 
 works.  Am I reading things wrong, or is the man page incorrect?

The man page is correct, but a little misleading unless you read it 
carefully. The first two paragraphs of the description section define 
the term destination path.


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Solution: (n) a watered-down version of something neat.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Cluster mail system using FreeBSD

2006-08-27 Thread Jan Grant
On Wed, 23 Aug 2006, bsd wrote:

 The idea is to offer a simple and very efficient solution in order for the
 server to have a 100% uptime under any circumstances.

That goal is not realistic.

 I was first thinking about using Linux-HA aka. heartbeat and syncing 
 the two boxes using rsync ?

One question is whether your uptime definition means someone can 
connect via IMAP or someone can connect via IMAP and IMAP 
acknowledgements of state-changing operations are guaranteed to be 
replicated across the cluster. If you actually want your cluster's 
semantics to preserve email client operations in the face of the loss of 
one member of the cluster then rsync is not enough.

 What other solution would you think of ?

You might want to chase down the Cambridge patches to cyrus, which added 
an application-level transaction log to that particular imap server.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Leverage that synergy! Ooh yeah, looking good! Now stretch - and relax.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Need /bin/sh script help

2006-04-11 Thread Jan Grant
On Tue, 11 Apr 2006, [EMAIL PROTECTED] wrote:

 On  Mon, 10 Apr 2006 22:30:32 -0700  Garrett Cooper wrote (my brief response 
 follows all of his text):
 
 Just making a series of sh scripts to help automate updating and 
 whatnot of my fileserver (since I am trying to avoid having mistakes 
 occur with my system, and maybe help the community out a bit by 
 providing some decent means of updating their own machines), and I was 
 wondering if anyone could help me out with the following script I've 
 developing (the grep if statements are incorrect..):

 I see a problem in the line
 if [ -n `grep -e s/KERNCONF=/ /etc/make.conf` ] # want to look for 
 you should have double-quotes around the  `grep  ...  conf`
 because it is likely to produce more than one token and so the
  [ -n ... ] statement violates the syntax (there should be exactly 1 
 token between the -n and the ] , even no token there is an error, the 
 way that is handled is to quote it. I am writing this quickly without 
 bringing up my FreeBSD system to check it.  Good luck.

Or simply use the error status of grep, no [ invocation:

if grep -q ...
then
...
fi

Note that if you're looking at automating the update process you should 
probably pay careful attention to the world/kernel update process 
described in the handbook; there are steps (like an initial mergemaster 
-p) that you will want to include.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
If you have received this email in error, do whatever the hell
you want with it. It's not like I can stop you anyway.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Shell scripting question [newby]

2006-04-10 Thread Jan Grant
On Mon, 10 Apr 2006, Malcolm Fitzgerald wrote:

 
 On 10/04/2006, at 12:39 AM, Jan Grant wrote:
 
  On Sun, 9 Apr 2006, Malcolm Fitzgerald wrote:
  
   I'm trying to follow the instructions at
   http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/

 Your advice got me to step 7 where the need to pass a control structure to the
 loop stopped me again.
 
 I got a bash shell and I write:
 
 for dist in base dict doc games info manpages ports; do
 cat /mnt/6.0-RELEASE/${dist}/${dist}.??  /usr/${dist}.tgz
 done
 
 I put it onto three lines by typing \ at the end of each line to achieve the
 layout and I get the prompt . When I get to the end, ie, done I press
 Enter and get another prompt.
 
 How can I get the multi-line command executed?

What you're doing is roughly this: (note, I supplied a separate done, 
you'll see why)

[[[
$ for i in one two three; do \
 echo $i \
 done
 done
one done
two done
three done
$
]]]

the first done is counted as part of the echo argument list.

If you terminate a line with a \ character, then the intervening 
newline is treated as just whitespace. Consequently, were you to use 
this syntax, you'd need to punctuate your script properly:

for i in one two three; do \
echo $i; \
done


Having said that, you don't need the \ marks, because bash (and sh) 
are smart enough to parse as you go and keep prompting until the command 
is complete. Thus you can just type:

for i in one two three; do
echo $i
done

and it'll do what you're asking.

Cheers,
jan


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Strive to live every day as though it was last Wednesday.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: UFS extended attributes

2006-04-10 Thread Jan Grant
On Mon, 10 Apr 2006, Robert Watson wrote:

 
 On Sun, 9 Apr 2006, Duane Whitty wrote:
 
  Started doing a little reading on the UFS and UFS2 file systems.  I'm just
  wondering if all types of files have extended attribute blocks available
  including named pipes, sockets, and device files?
  
  Is it still the case that there are three unused extended attribute blocks
  available?
 
 Extended attribute storage is available for all objects in UFS, including
 files, directories, named pipes, UNIX domain sockets, and device nodes.  I'm
 probably not th eright person to answer questions about the layout itself.

Looks like it is: see /usr/include/ufs/ufs/dinode.h

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Theoremhood is positively decidable.
It just takes time at least exponential in the length of the proof.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Shell scripting question [newby]

2006-04-09 Thread Jan Grant
On Sun, 9 Apr 2006, Malcolm Fitzgerald wrote:

 I'm trying to follow the instructions at
 http://www.daemonology.net/freebsd-upgrade-5.4-to-6.0/
 
 At point four it offers this shell script.
 
 cut -f 1 -d '$' /usr/local/freebsd-update/work/md5all | uniq |
 while read X; do
 if [ -f $X ]; then echo $X; fi;
 done | sort  /root/base-old
 
 Running this from root shell in konsole (bash) I get while: Expression
 Syntax. The various hints and clues I get from the shell, the web and man
 bash haven't helped me. Would someone provide the correct syntax for me?

That syntax is correct for sh and bash; you're not running it, however. 
Double-check that after you su to root, you're really running bash. That 
error is what csh will tell you.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Whenever I see a dog salivate I get an insatiable urge to ring a bell.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: OT - Scalable email server solution needed

2006-04-09 Thread Jan Grant
On Sun, 9 Apr 2006, Bill Moran wrote:

 I have only a small amount of experience with Cyrus.  However:
 http://cyrusimap.web.cmu.edu/twiki/bin/view/Cyrus/Backup
 
 Based on that document, it appears as if you're dodging the bullet with
 backups.  My interpretation is that Cyrus keeps mailboxes in some sort
 of db file.  If a db file is being modified while you're backing it up,
 the backed up version will be inconsistent, thus the entire mailbox
 unusable.

Not quite. Cyrus maps the imap hierarchy onto directories, with one 
(written once only) file per message. As flat-file as you can get. On 
top of this are per-folder index files (which can be recreated using 
reconstruct) holding stuff like preformatted IMAP responses, header 
indexes etc. That's where cyrus gets its speed from.

Additionally there's a per-server mailboxes DB holding folder 
information (including ACLs), per-user seen/subscription databases and a 
deliverdb for duplicate suppression.

The latter can all be stored in multiple formats, including bdb; hot 
backups for these work much the same way as for anything other bdb.

It's not perfect, but there's minimal bullet-dodging.

jan

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
ioctl(2): probably the coolest Unix system call in the world
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /proc/loadavg?

2006-04-07 Thread Jan Grant
On Fri, 7 Apr 2006, Andy Greenwood wrote:

 Does FreeBSD have a location that stores the load average information,
 similarly to /proc/loadavg in Linux? I've got a php site that displays this
 info, but I'm not sure where to point it to.

There's a linuxprocfs which you might want to mount on 
/compat/linux/proc, that should have waht you're after.


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
No generalised law is without exception. A self-demonstrating axiom.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Why are so many people using 4.x?

2006-03-29 Thread Jan Grant
On Tue, 28 Mar 2006, Tom Grove wrote:

 I would certainly recommend going with 6.x.  The reason that many of our
 servers still run 4.x is that 5.x got a bad reputation and there really is no
 upgrade path from 4.x to 6.x.  5 and 6 default to using UFS2 and 4 uses UFS
 so, IMHO it's better to rebuild and taking a few hundred users offline for a
 couple of hours whilst this happens isn't fun.
 
 That's my scenario...I'm sure others have totally different reasons.

In addition to Kris' comments about UFS being perfectly viable for 5.x 
and 6.x: there is an upgrade path, but it's 4.x - 5.x - 6.x. FWIW I've 
done this successfully without a hitch*.

jan

* Having said that, I use a liveupgrade-a-like setup with a primary / 
and /usr (that I'm running from) and a secondary (that I rebuild into 
and reboot into). It means I have something solid to fall back to if the 
upgrade fails.

-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
That which does not kill us goes straight to our thighs.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Shellscript syntax question

2006-01-10 Thread Jan Grant
On Mon, 9 Jan 2006, Frank Staals wrote:

 About the asteriks : No they weren't but for some reason Thunderbird had
 problems with the color remaining from the KATE Syntax-hilighting. Anyway:
 thanks for the solusion, but what would be the expressions for  less or
 equal and greater or equal ?

As others have pointed out: [ is a synonym for test(1), which uses -gt, 
-ge, -eq, -ne, -lt, -le for numeric comparisons. For string comparisons, 
it uses , !=, =, and .

Your original expression didn't work because  is also a shell 
meta-character used to indicate file redirection. To get something like 
that to work, you'd need to quote it somehow:

if [ $a \ $b ]; then ... ; fi

or

if [ $a '' $b ]; then ... ; fi


-- 
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
I'm the dandy information superhighwayman.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fast diff command for large files?

2005-11-05 Thread Jan Grant
On Fri, 4 Nov 2005, Kirk Strauser wrote:

 thinking out loud
 I wonder if rsync could be modified to output its patches rather than 
 silently applying them to a target file.  It seems to be pretty good at 
 comparing large files quickly...
 /thinking

More thinking out loud: since these are database dumps, they're 
order-independent. So, sort the files into a predictable lexical order, 
then a diff is a linear operation over tonight's file versus last 
night's.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Rereleasing dolphins into the wild since 1998.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: portupgrade -ar (why?)

2005-10-15 Thread Jan Grant
On Sat, 15 Oct 2005, Peter Matulis wrote:

 What is the use of specifying the 'r' switch when using the 'a'
 switch?
 
 # portupgrade -ar
 
 This says to upgrade all ports plus the ones that depend on all
 those ports.  Am I missing something?  Wouldn't the ones that
 depend be upgraded anyway?

Not necessarily. For instance: package P might use library L. A change 
in L might alter the size and layout of structures exposed to P. The 
source-level API of L is unchanged; the binary-level ABI is altered. So 
whilst the source code of P might not have changed, it might (for 
instance) be using a macro defined by a header in L that will look at 
the wrong offset in the new structure. These kinds of ABI compatibility 
problems can be fixed by recompilihng P.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Strive to live every day as though it was last Wednesday.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is fsck trying to tell me?

2005-09-10 Thread Jan Grant
On Fri, 9 Sep 2005, Leonard Zettel wrote:

 When I issue the followinf command:
 
 mount /dev/ad1s1c /mnt
 
 I get the response
 WARNING: R/W mount of /mnt denied. filesystem is not clean - run fsck
 mount: /dev/ad1s1c: Operation not premitted
 
 Then when I try
 
 fsck /dev/ad1s1c
 
 I get
 fsck: exec fsck_unused for /dev/ad1s1c in sbin: /usr/sbin: No such
 file or directory
 
 BTW, mount -f /dev/ad1s1c /mnt
 
 gets me what I expect, but the hassle leading up to it has
 me scared to death. Now what? punt?

You're using the default whole slice partition, ad1s1c. My guess is, 
you're using the default disklabel for that slice. If you look at that 
disklabel,

# disklabel ad1s1

you'll see a line like this:

  c: 1563014250unused0 0 # raw part, don't edit

Now, fsck uses external helper utilities to check the consistency of 
various types of filesystem. If the filesystem has an entry in 
/etc/fstab, it'll pull the type from there if you specify the mount 
point. If you specify the device, it looks like fsck is using the 
disklabel rather than actually tasting the partition to determine what 
fsck to use.

You can fix this by disklabelling your device and fixing the type of 
partition c: this should be ok. You can probably also tell fsck 
explicitly what type of filesystem to check, or just invoke the 
appropriate fsck_ufs directly.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Usenet: The separation of content AND presentation - simultaneously.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sysctl or system tweak for symbolic links?

2005-09-10 Thread Jan Grant
On Fri, 9 Sep 2005, Forrest Aldrich wrote:

 Hi,
 
 Using FreeBSD_6.0_Beta4 (applies to Beta2, also).
 
 I'm trying to track down a problem I've been having with apache-2.0.54 not
 following symbolic links.
 
 It's basically come down to my being able to follow the link if it's in the
 same directory structure (ie: .. or /path/to/..), but fails if the symbolic
 link is located elsewhere (ie: /usr/local/path/directory) or on another disk.
 
 I wonder if there's a sysctl or other system variable that handles the
 behavior of or access to symbolic links in this fashion that I may have
 missed.   Seemed like a reasonable conclusion after these tests have been
 failing, though it could be something else, too.

Stock apache configuration. Look at the documentation for the Options 
directive, particularly SymLinksIfOwnerMatch.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 3317661   http://ioctl.org/jan/
Just because I have nothing to hide doesn't mean I have nothing to fear.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: BSD legal question

2005-05-19 Thread Jan Grant
On Thu, 19 May 2005, Ted Mittelstaedt wrote:

 Suppose I distribute a library that is under my own copyright,
 yet carries a BSD-like license.
 
 Suppose you then come along and take my library, and a GPLed
 library, link both of them together into a new program of yours.
 
 The FSF says that the entire code now becomes GPL.

That's not true. The GPL requires you to license any distributed code 
derived from GPLed code under the GPL. Since, as you point out...

 The problem here is that since you never owned copyright on
 my library, you do not have legal rights to modify the copyright
 and license on it.  Thus, you cannot legally apply GPL to it.
 Nor can the FSF or anyone else apply GPL to it.

... the conclusion is that you cannot *distribute* the derived program; 
NOT that it magically relicenses code you've used to build it.

 Naturally, the parts of the program you are distributing that
 YOU wrote are under GPL.  But, suppose another guy comes along,
 takes your program, and pulls my library out of it and uses it
 for his program.  According to the GPL, if he does this that
 library is GPLed now, and his program must be GPL. According
 to the law, though, it's not GPL, it's mine.

The problem is this: the program you are distributing. The GPL 
prevents you from distributing such derived code for exactly the reasons 
you point out. You're free to do whatever you like with it, except 
distribute. In other words, by distributing the derived code, you're in 
breach of the GPL.

(The exceptions arise depending on whether the non-GPLed license form a 
core part of functionality or whether the resulting program is 
functional without the hypothetical TedLib.)

jan

PS. This is basic implication: you claim

P = you distribute the code
Q = all of it is under the GPL
and P - Q.

I'm not taking issue with that; merely pointing out that (as you 
describe), Q is false, therefore since

-Q - -P

the conclusion is that you can't distribute.

Incoherently yours, etc.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 9287088 or 3317661   http://ioctl.org/jan/
Theoremhood is positively decidable.
It just takes time at least exponential in the length of the proof.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PF RULES! But mine doesn't ...

2005-05-10 Thread Jan Grant
On Tue, 10 May 2005, Fafa Hafiz Krantz wrote:

 Ok, after having added that it seems that my DNS works.
 The same goes for my WWW and mail server.
 
 SSH servers are all OK to connect to.
 
 I have to wait like 5 minutes after booting my computer
 before I can connect to those certain FTP sites. What's
 that all about?
 
  If you add the query-source address * port 53; to your named.conf
  options section, that'll suffice; additionally, since your DNS query
  source port is then predictable, you can drop it from the DNS and NTP
  rule.
 
 What do you mean by that?

The rules I suggested are so that external machines can talk to your DNS 
server (querying about the domain it is authoritative for), and so that 
responses can get back to those machines.

Your nameserver, however, may also be trying to get requests out. When 
it does this, by default, it will use a random source-port. By 
specifying

options {
query-source address * port 53;
}

in your named.conf, your nameserver will _also_ use port 53 as the 
source port on any requests _that it originates_. (That's the 
distinction). If you do this, then you won't need port 53 mentioned in 
your other keep state rule.

I suspect that this might actually be the cause of your transient FTP 
concern; you should try modifying your nameserver config before you go 
any further.

(This assumes that your resolv.conf is configured to use the local 
machine as a nameserver in the first instance. If that is not the case, 
then you will still need the port 53 clause in your DNS and NTP 
section, because other programs will use random ports in an attempt to 
get DNS queries out into the wild.)

 Anyway, it's pretty close to perfection now :)
 
 Jan, any idea how I can simplify my ruleset?
 Also, I'm wondering if I can move the NAT part down below the Outgoing
 so I can combine it with the Active FTP ruleset so they don't have to be
 spread troughout the conf. Thanks!

Your ruleset looks pretty simple, to be honest.

I'm afraid that where the specifics of PF are concerned, I know nothing: 
the advice I've given you is just generic firewall stuff :-/ It looks to 
me like your PF config is set up to use some kind of FTP proxy running 
on localhost:8021. On the other hand, I could be barking up the wrong 
tree completely; I've pretty much run out of useful things to say about 
this config.

Cheers,
jan


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 9287088 (with luck)   http://ioctl.org/jan/
Prolog in JavaScript: http://ioctl.org/logic/prolog-latest
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PF RULES! But mine doesn't ...

2005-05-08 Thread Jan Grant
On Sun, 8 May 2005, Fafa Hafiz Krantz wrote:

 Hello.
 
 My ruleset is all twisted.
 Unless I disable the default deny policy, this is what happens:
 
 *  My nameserver setup goes disfunctional.
 *  My web, mail and fileserver goes disfunctional.
 *  I cannot SSH and FTP into certain servers.
 *  I cannot ping my IP from the outside.
 
 Can anyone tell what's wrong?
 And maybe also how I can simplify my ruleset?

It's a question of letting DNS traffic _in_ to your nameserver:

 int_if=ep0
 ext_if=lnc0
 
 # *** Options
 #
 set block-policy drop
 
 # *** Scrub incoming packets
 #
 scrub   in all
 
 # *** NAT
 #
 nat on $ext_if from $int_if:network to any - ($ext_if)
 rdr on $int_if proto tcp from any to any \
 port 21 - 127.0.0.1 port 8021
 
 # *** Default deny policy
 #
 # block drop log all
 
 # *** Pass loopback traffic
 #
 passquick on { lo0 $int_if }
 
 # *** Outgoing
 #
 passout on $ext_if inet proto { tcp, udp, icmp } \
 from ($ext_if) to any keep state
 
 # *** Bootstrap
 #
 passout on $ext_if inet proto udp \
 from any port 68 to any port 67 keep state
 
 # *** DNS and NTP
 #
 passout on $ext_if inet proto udp \
 from ($ext_if) to any port { 53, 123 } keep state
 
 # *** SSH, HTTP and Ident
 #
 passin on $ext_if inet proto tcp \
 from any to ($ext_if) port { 22, 80, 113 } flags S/SA keep state

pass in on $ext_if inet proto { tcp, udp } \
from any to ($ext_if) port 53

^^^ that lets the traffic in

pass out on $ext_if inet proto { tcp, udp } \
from ($ext_if) port 53 to any

^^^ and that lets it back out.

If you add the query-source address * port 53; to your named.conf 
options section, that'll suffice; additionally, since your DNS query 
source port is then predictable, you can drop it from the DNS and NTP 
rule.

 # *** Active FTP
 #
 passin on $ext_if inet proto tcp \
 from port 20 to ($ext_if) user proxy flags S/SA keep state

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 9287088 (with luck)   http://ioctl.org/jan/
Usenet: The separation of content AND presentation - simultaneously.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: What is --- WRONG --- with my network?

2005-05-06 Thread Jan Grant
On Fri, 6 May 2005, Fafa Hafiz Krantz wrote:

 
 Hello boys!
 
 I just spent a few days doing a make world and kernel.
 My machine is terribly slow. Yet, my network problem hasn't
 gone away. This shows that it wasn't an asynchronisation
 between my world and kernel. I've also compiled io and mem
 into my new kernel.
 
 Here is my problem description:
 
 *  My nameserver setup is disfunctional.
 *  My web, mail and fileserver is disfunctional.
 *  I cannot SSH and FTP into certain servers.
 *  I cannot ping my IP from the outside.
 *  My ISP controls the PTR of my reverse DNS lookup.
This fails to resolve too.
 
 PF is disabled.
 
 My configuration has been running flawlessly for the past
 few months before this strange happening occured. I know for
 a fact that this is not related to a misconfigured rc.conf
 or named.conf. Maybe it is my ISP?

Unfortunately, you appear to be preemptively rejecting the most obvious 
advice, and implicitly asking that people start troubleshooting from 
the middle. Was your machine up without reboot for months? If so, 
there's no guarantee that the state of named.conf actually reflects the 
state of the previously running named prior to a reboot (alas, I've seen 
this all too often).

Can you begin by posting your fully-functional named.conf and 
resolv.conf? And possibly describing exactly what you mean by my 
nameserver is dysfunctional? Do you mean that you cannot resolve 
addresses from your host? Does dig work against your local nameserver 
instance? Can you see any of the root servers with dig? Is named just 
refusing to start? ... and so on.

You'll probably have to be more explicit about certain servers, too. 
Are they on-site? Off-site? If the latter, and the issue only appears 
with a subset of ssh servers, this may well be indicative of DNS 
problems again, since sshds can be configured to be more or less picky 
about the name resolution of their clients.

Have you tried to resolve the PTR record for your IP address from 
offsite? If this is failing, it's possibly the root cause of a lot of 
your problems, and you'd need to raise it with your ISP.

Cheers,
jan

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


Re: KDE not starting. Cannot start kdeinit

2005-04-17 Thread Jan Grant
On Sat, 16 Apr 2005, Danny Pansters wrote:

 IIRC exec used to be needed for some reason, but that's been a while, merely 
 startkde (which is just a shell script) will do.

The reasoning is in the man page for startx(1):

[[
The .xinitrc is typically a shell script which starts many clients 
according to the user's preference.  When this shell script exits, 
startx kills the server and performs any other session shutdown needed. 
Most of the clients started by .xinitrc should be run in the back- 
ground.  The last client should run in the foreground; when it exits, 
the session will exit.  People often choose a session manager, window
manager, or xterm as the ''magic'' client.
]]

Since the session stops when the .xinitrc process dies, you can either 
launch startkde from within the shell script (in which case the .xinitrc 
script waits until startkde exits, then exits), or you can use exec 
startkde to replace the .xinitrc process with the startkde one. In 
either case the only difference is that leaving out the exec means 
you've got one additional shell process hanging around until you quit X.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44 (0)117 9287088 (with luck)   http://ioctl.org/jan/
I like oranges more than apples!? - that's like comparing apples and oranges!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Is this a good or a bad idea to delete all off this ?

2005-03-15 Thread Jan Grant
On Tue, 15 Mar 2005, Michael C. Shultz wrote:

 On Tuesday 15 March 2005 06:17 am, Tom Trelvik wrote:
  Gert Cuykens wrote:
   can i do controle C when i want to go to sleep while upgrading ?
 
  A cleaner solution, regardless of whatever you're running that you'd
  like to ^c, is to just let it run inside a screen session and
  reattach to the screen session later to see how it went.
 
  Screen should be every sysadmin's best friend.  =)
 
  Tom
 
 Tom, mind providing a link that tells us non-sysadmins how to do this?

He's referring to the misc/screen port. The man page is pretty 
comprehensive. It basically gives you virtual terminal sessions that 
you can attach, detach and reattach a client to without disturbing the 
underlying session.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
Random act of violence against bread: whole pint.
  -- extract from the Hawk the Slayer drinking game
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How do I set the source address on a multi-homed host?

2005-02-16 Thread Jan Grant
On Tue, 15 Feb 2005, Daniela wrote:

 Well, if the OS selects the source IP, can't I just modify the code that 
 selects it? Will this work all the time, or just when the application lets 
 the OS select an address for it?

It should just work - that is, the source address for internal packes 
should already _be_ that of the internal interface. Your routing table 
looked good, too, IIRC. What does your NAT / ipfw configuration look 
like?

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
NOP is a trivial implementation of an executable Z subset.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How do I set the source address on a multi-homed host?

2005-02-13 Thread Jan Grant
On Sat, 12 Feb 2005, Daniela wrote:

 Yes, this happens when I connect from my machine (which functions as a router 
 with NAT to allow the other LAN machines connect to the internet) to another 
 LAN machine. When the router establishes a connection to another point in the 
 intranet, the source address used is my official IP, and not 10.0.0.1, which 
 is the intranet IP of the router.
 In other words, I want the source address to be 10.0.0.1 on every outgoing 
 connection where the destination is inside my intranet.

Assuming you haven't munged the internal IP address to hide it, and with 
all due deference to the FreeBSD mechanism, not policy mantra: no, you 
don't want to do this. The 10.0.0.0/8 block of addresses is explicitly 
for private use and is not routable on the internet.

If your firewall is causing problems with this setup, you might need to 
re-examine your firewall settings.

Having said that: technically, you specify source addresses for 
connections by calling bind(2) prior to calling connect(2). If you fail 
to do this, the operating system will select a source IP address for 
you. This'll often be the IP of the outgoing interface.

Unless your particular application explicitly supports the selection of 
source addresses, you're mostly out of luck. For instance, ping(8) 
supports this (see the -S option).

Cheers,
jan

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
Bolstered by my success with vi, I proceeded to learn C with 'learn c'.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How do I set the source address on a multi-homed host?

2005-02-13 Thread Jan Grant
On Sun, 13 Feb 2005, Jan Grant wrote:

 On Sat, 12 Feb 2005, Daniela wrote:
 
  Yes, this happens when I connect from my machine (which functions as a 
  router 
  with NAT to allow the other LAN machines connect to the internet) to 
  another 
  LAN machine. When the router establishes a connection to another point in 
  the 
  intranet, the source address used is my official IP, and not 10.0.0.1, 
  which 
  is the intranet IP of the router.
  In other words, I want the source address to be 10.0.0.1 on every outgoing 
  connection where the destination is inside my intranet.
 
 Assuming you haven't munged the internal IP address to hide it, and with 
 all due deference to the FreeBSD mechanism, not policy mantra: no, you 
 don't want to do this.

Excuse my misinformation. Misread inside for outside.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
Solution: (n) a watered-down version of something neat.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: what is /entrophy ?

2005-02-07 Thread Jan Grant
On Sun, 6 Feb 2005, Jay Moore wrote:

 On Wednesday 02 February 2005 05:52 am, Gert Cuykens wrote:
 
  what is /entrophy ? can i delete it ?
 
 I believe it is a mis-spelled version of /entropy

Your computer attempts to collect randomness by sampling the timings 
of various physical events. That's what the /dev/random device provides: 
this kernel-harvested randomness. Various cryptographic systems require 
a supply of good random numbers in order to operate.

When the machine first boots, the kernel's entropy pool is empty. It 
would consequently take potentially quite a few minutes to harvest 
sufficient randomness from interrupts in order to satisfy the needs of 
such things as sshd.

The solution is the /entropy file: when the machine shuts down, it saves 
spare random bits that have not yet been used into this file. On 
reboot, the kernel's random pool is reinitialised using these spare 
bits. Assuming nobody's sneaked a peek at them in the itme the machine's 
been turned off, this is a reasonable way to quickly satisfy the startup 
requirements for randomness.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
You see what happens when you have fun with a stranger in the Alps?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 300Gb hard drive formatting to 249Gb - boo.

2004-12-06 Thread Jan Grant
On Mon, 6 Dec 2004, Alex Teslik wrote:

 [root]/home/alex# df -h
 FilesystemSize   Used  Avail Capacity  Mounted on
 /dev/ad1s1e   271G   1.0K   249G 0%/1

This is an FAQ: see
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DISK-MORE-THAN-FULL

and the -m option of tunefs(8):
http://www.freebsd.org/cgi/man.cgi?query=tunefssektion=8

Summary: the filesystem needs elbow room to operate under typical 
load; this 8% space is reserved. (It may be consumed by the root user, 
if required.) Tuning down the reserved percentage is not recommended 
unless you know what you're doing (that is: benchmark your typical 
usage to see if the performance is still within acceptable limits).

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
You know something's gone badly wrong when your algorithm
takes O(n^2) time but uses O(2^n) space.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Is my Apache server running as the root user or not?

2004-12-04 Thread Jan Grant
On Sat, 4 Dec 2004, csnyder wrote:

 On Sat, 4 Dec 2004 04:47:49 -0500, Peter C. Lai [EMAIL PROTECTED] wrote:
  This isn't on-topic for the list, but I'll answer it anyway. The Apache
  parent runs as root so that it can attach to port 80. 
  [...]
  
  On Sat, Dec 04, 2004 at 07:24:27AM +0100, Jesper Wallin wrote:
   [...]
   If I got a lot of users connecting to my server on port 80, will
   thier requests ever be answered by the root fork or the www:www forks?
  [...]
 
 If this is really a nagging question, enable the mod_status in
 httpd.conf, then watch http://yourserver/server-status while you pound
 the server with apache/bin/ab -- you'll see exactly which PIDs are
 answering queries.

There's a description of what you're seeing here:
http://httpd.apache.org/docs-2.0/mod/prefork.html
which, although it's apache 2 documentation, also describes the apache 
1.3 preforking behaviour.

The root process creates sockets and log files, then forks child worker 
processes which retain the open file handles. However, it is only the 
child processes that ever call accept:
ps axlw | grep httpd

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
I think therefore I am. -- Ronnie Descartes
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: shell programming challenge

2004-11-26 Thread Jan Grant
On Thu, 25 Nov 2004, Don Wilde wrote:

 J65nko BSD wrote:
  On Thu, 25 Nov 2004 10:26:38 -0700, Don Wilde [EMAIL PROTECTED] wrote:
  
   Hey, folks -
   
   I need to find a way to kick off an xterm running BASH and then execute
   a program within that xterm, but NOT close the new xterm after the
   program finishes. 
 
 [snip]
 
  
  xterm -hold -e sh -c  ./ticktock 
  
  -hold is explained in the xterm man page ;)
  
 Yes and no. I don't get as command prompt back in the new xterm, either with
 sh or bash. ALso, the --rcfile arcument does not appear to work in conjunction
 with -c.
 
 This is what the man for hold specifies, but I need the prompt.

If you have the option to modify it, ensure that your script exits via 
exec sh. Alternatively a wrapper that does this is straightforward to 
build.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287864 or +44 (0)117 9287088 http://ioctl.org/jan/
Political talk? / What is said can be unsaid / with good old BS
  -- ASCII haiku
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backup/Restore

2004-10-01 Thread Jan Grant
On Fri, 1 Oct 2004, Brian McCann wrote:

 On Thu, 30 Sep 2004 13:59:05 -0700 (PDT), Richard Lynch [EMAIL PROTECTED] wrote:
  
  Brian McCann wrote:
Hi all...I'm having a conceptual problem I can't get around and
   was hoping someone can change my focus here.  I've been backing up
   roughly 6-8 million small files (roughly 2-4k each) using dump, but
   restores take forever due to the huge number of files and directories.
Luckily, I haven't had to restore for an emergency yet...but if I
   need to, I'm kinda stuck.  I've looked at distributed file systems
   like CODA, but the number of files I have to deal with will make it
   choke.  Can anyone offer any suggestions?  I've pondered running
   rsync, but am very worried about how long that will take...
  
  Do the files change a lot, or is it more like a few files added/changed
  every day, and the bulk don't change?
  
  If it's the latter, you could maybe get best performance from something
  like Subversion (a CVS derivative).
  
  Though I suspect rsync would also do well in that case.
  
  If a ton of those files are changing all the time, try doing a test on
  creating a tarball and then backing up the tarball.  That may be a simple
  managable solution.  There are probably other more complex solutions of
  which I am ignorant :-)

 I have the case where a new file is created about every second or two,
 nothing gets changed, but files get deleted occasionally (it's a mail
 server).  I thought of using tar, but it would be just as slow as dump
 I would think.  I've thought of breaking it up into chunks, but that
 still doesn't solve my speed issue...i'm beginning to consider using
 dd since it reads the actual disk bits, and just hope that a)I don't
 ever need one file and b) the system I restore to has at least or more
 space then the original server.  Any other thoughts anyone?

You might want to experiment with something like rsync to maintain a 
live (ie, on a FS) second copy. If you do this don't be put off by the 
initial rsync time (which may well take ages - tar or dump/restore may 
be faster to get the second copy in place initially). Rsync over such a 
large filesystem may take quite a while but the best bet is to actually 
try it to see if it meets your needs.

Obviously a restore of a mail repository is a pretty awful thing to have 
to do. Amongst other things, users can find the ressurrection of 
deleted mails to be a real pain. You might want to see if your mail repo 
can generate some kind of replay log - if so, this might be the best 
route for minimising the amount of time needed to synchronise mailstores 
and to get the closest fidelity out of the copy.

Breaking your mailstore into separate chunks may well help. Yes, the 
total time for a dump/restore may be close to your current state of 
play, but if you can split the partitions between machines then you have 
the option to perform these in parallel.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
...perl has been dead for more than 4 years. - Abigail in the Monastery
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: White Paper on routing freebsd

2004-09-22 Thread Jan Grant
On Tue, 21 Sep 2004 [EMAIL PROTECTED] wrote:

 Hello,
 
 I am looking for a good white paper or tutorial that will explain how to
 configure routing for freebsd.
 
 A good pointer for understanding linux  static routing will be apreciated
 too.
 
 I have already read the HandBook, but there are still couple of things that I
 haven't catch.

Are you after the basic theory behind routing? If you have specific 
questions then this list is as good a place as any to ask them.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Whenever I see a dog salivate I get an insatiable urge to ring a bell.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: what are the pros and cons of running in single user?

2004-09-16 Thread Jan Grant
On Thu, 16 Sep 2004, Ed Budd wrote:

 mailing lists at MacTutor wrote:
  I have a machine running 4.10-STABLE that will be a dedicated gateway with a
  router/firewall combo and web server plus mysql server (maybe). What would
  be the pros and cons of running this system single user? Processes that run
  under their own uid, would they be able to run?
  
  Just curious. Any extra thoughts welcome.
  
 
 er...doesn't single user mode mean no networking? My understanding is that
 this is really only for maintenance (ie. make installworld, etc.), not regular
 operations. Perhaps you meant something else or I just haven't had enough
 caffeine yet...

Single-user mode refers to the point in the boot process prior to 
running the startup scripts that make multi-user services available: for 
instance, mounting all drives, turning on swap, configuring network 
interfaces, starting daemons etc. and potentially most importantly, 
setting the securelevel.

Unlike the sysV init, there is no real magic about single-user mode 
apart from the fact that you can get init to stop the boot process and 
drop you directly into a shell in single-user mode. Running shutdown 
drops you into much the same state - that is, it kills off daemon 
processes etc. so that the machine can be administered* without 
unexpected interference from spurious processes. However, there's 
nothing (in principle) stopping you from kicking off those processes 
again, providing their environmental needs are satisfied.

So to answer the question: you can certainly tune the scripts and 
services available that launch you into multi-user mode to get a minimum 
profile on the machine. However if you modify rc to the extent that it 
turns on everything you need in order to set up bridging, run a few 
daemons etc then you're effectively duplicating the multiuser startup 
anyway.

jan

* modulo securelevel changes which can only be reverted via reboot.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
The Java disclaimer: values of 'anywhere' may vary between regions.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc34 Question - Request for help

2004-08-11 Thread Jan Grant
On Wed, 11 Aug 2004, SP Network Solutions wrote:

 Hi there,
 
 I have just install the gcc 3.4 into my FreeBSD 4.10 via the ports/lang
 
 after make, make check and make install it shows that all install...
 
 but when I type : gcc -v it still show my old version 2.95.4
 
 My question is: How do I go about in making my machine to use the new gcc34?
 
 What will be the next step after make install ?
 
 Anyone can help??...I'm confuse and this is not the first time I come 
 accross as I have the same problem with my gcc33.

The appropriate binaries are installed as gcc34, c.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Goedel would be proud - I'm both inconsistent _and_ incomplete.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: implementing spf

2004-07-26 Thread Jan Grant
On Mon, 26 Jul 2004, Robert Storey wrote:
[on spf]
 1) Is the technology useful?
 2) How does one implement spf on the server side?
 3) How does one implement spf on the client side?
I most interested in No. 3 above - specifically, is there anything that
I must do as an end-user to make use of spf?
The answer to (3) directly is, no* - which is why SPF is so useful, 
since it doesn't require large (or any) changes to a user's clients 
(assuming you're not doing mailing list expansion via your MUA, which I 
believe some packages do).

The SPF pages at pobox have all the details you could want, including 
pointers to various implementations. It's pretty simple and 
straightforward; furthermore, the license situation is positive. If the 
MARID stuff ends up encumbered with what RMS calls a 
non-free-software-compatible license then it's quite likely that it 
simply won't fly, regardless. SPF itself is in use right now, however.

jan
* if you're originating email from offsite (dialup lines etc.) then 
you may need to coordinate with your mail admin to ensure you're 
targeting the correct MSA.

--
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Donate a signature: http://ioctl.org/jan/sig-submit
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: setuid diffs...

2004-07-23 Thread Jan Grant
On Fri, 23 Jul 2004, Steve Bertrand wrote:
Hi all,
Late yesterday, I ``cloned'' my single, primary IDE FreeBSD hard disk onto
a larger one. Then, using a Promise ATA IDE RAID controller I built a
RAID-1 array.
Everything went as planned, the box is now back up using the 'ar' driver
for the array. However, in the security run output last night, I got this:
[diffs snipped]
Did this happen because the files were transferred from one disk to
another and the system knew it?
Yes. When you copied the files across, the copies were allocated 
different inode numbers on the new filesystem. It's that difference that 
the nightly check is picking up on.


--
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Strive to live every day as though it was last Wednesday.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sanitizing disks: wiping swap, non-allocated space, and file-tails

2004-07-17 Thread Jan Grant
On Sat, 17 Jul 2004, David Kreil wrote:
I wonder, in particular, how system directories like /var would be 
kept on a gdbe partition.
Much like any other, but the major issue is that, unlike /tmp/ and swap 
(which can be wiped clean when a machine boots with no ill effects), 
other partitions need to persist. That means you need to do one of two 
things:
1. Be available when the machine boots to enter the keys to mount the 
persistent partitions; or
2. Store those keys somewhere so the machine can do it for you.
If you choose (2) then you might as well not use an encrypted partition; 
secure use needs human intervention.

--
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
If it's broken really badly - don't fix it either.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: closer, no cigar.

2004-07-14 Thread Jan Grant
On Tue, 13 Jul 2004, Eric Crist wrote:

 On Tuesday 13 July 2004 22:19, Giorgos Keramidas wrote:
  The first of these processes is sendmail started in submit mode by the
 
  `rc.sendmail' startup script.  The relevant rc.conf options are:
  : sendmail_enable=NO
  : sendmail_submit_enable=YES
  : sendmail_submit_flags=-L smtpd -bd -q30m
  : -ODaemonPortOptions=Addr=localhost
 
  - Giorgos

 Can you exlpain exactly what submit mode is for?  Is it something you want
 running on a production mail server?

Eric, the first three paragraphs of section 1 of RFC 2476 explain this.

In a nutshell: an MTA is not supposed to munge email (apart from
adding Received: headers and the like); however, many local clients
submit via SMTP and the mail server needs to do lots more work:
rewriting email addresses, and so on. The split of sendmail's operation
into MTA (Transmission) and MSA (Submission) is to support this.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Whose kung-fu is the best?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: HP Visualize workstation

2004-06-29 Thread Jan Grant
On Tue, 29 Jun 2004, Ade Falusi wrote:

 Can FreeBSD be installed on an  HP visualize B132L workstation, if so how and what 
 type i.e
 alpha, amd64, i38, ia64, pc98 or sparc64.
 Pls help.

I believe that machine is based around the PA-RISC. You might want to
see if NetBSD will run on it.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
On modesty: whoever said it's hard being perfect obviously wasn't me.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [OT] Re: What's the best possible email failover solution

2004-06-23 Thread Jan Grant
On Tue, 22 Jun 2004, Bill Moran wrote:

 The other option is to take what appears to be the best IMAP server out
 there (Cyrus) and figure out a way to do real-time mirroring of the
 mailboxes.  I was wondering if it could be done with Coda, but I don't
 know anything about Coda, and it doesn't look like I'll have time to
 experiment in the near future.

A previous responder to this thread has already pointed at the cam.ac.uk
work which offers transactional replication for fast fail-over.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Impact of vulnerability: Run code of an attacker's choice
 Maximum Severity Rating: Moderate -- M$ security bulletin
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Utility to guess a remote hosts operating system?

2004-06-23 Thread Jan Grant
On Wed, 23 Jun 2004, Edd wrote:

 My question is:

 Does such a utility exist? I know nmap can guess os, but it takes a few
 seconds and a port scan is needed first. Is there just a simply util
 that can tell me without the port scan?

How would that operate? Some kind of network fingerprinting is required.
If you can narrow down the parameters of your question (eg: I have a
network of windows machines and I'd like to figure out exact versions on
each one) then you might have more luck.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
__/\/\_/\/|_ flatline
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: md5 of a filesystem / verifying filesystem integrity after dump/restore operation

2004-06-23 Thread Jan Grant
On Wed, 23 Jun 2004, Ruben Bloemgarten wrote:

 Hi all,

 Does someone know how to reliably run a checksum of sorts on a filesystem,
 to be able

 to verify filesystem integrity after a restore from dump level 0 has
 occurred?

Tripwire and its ilk live in the ports system. The base system utility,
mtree, also has this capability, although you'll have to fiddle with
its options to get it to work.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
You see what happens when you have fun with a stranger in the Alps?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [OT] Re: What's the best possible email failover solution

2004-06-22 Thread Jan Grant
On Mon, 21 Jun 2004, Bill Moran wrote:

 During my research of the IMAP protocol, I determined that _the_best_
 way to store email for high-performance would be to put them in a
 database.  This is because IMAP doesn't see email as a big blob of
 text like POP does.  It sees the headers as one thing, and the
 different MIME parts of the email each as a seperate thing that can
 be fetched independently of the other MIME parts.  This is a pretty
 good layout for a one - many relationship in a database.  Fact is,
 every current IMAP server that I'm aware of has to break emails
 apart on the fly in order to server IMAP.

Have a closer look at the cyrus layout. Each message is in a single
file, true, but they are also preparsed to extract the data required for
common IMAP operations. The index files contain things like preformed
bodystructure responses and offsets to each mime piece.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
HP-unix: Open Sauce product, available in 57 distributions.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: java not running .jar files without absolute path. (take II)

2004-06-10 Thread Jan Grant
On Wed, 9 Jun 2004 [EMAIL PROTECTED] wrote:

 hello jan,

  echo $JAVA_HOME
 JAVA_HOME: Undefined variable.

 hmmm.  i don't recall ever setting that variable.  yet, i do recall
 this not being an issue with previous installs of java.

 is JAVA_HOME a variable that is required? shouldn't the $PATH entry be
 sufficient?

Well, the path entry only suffices on my installation; I merely
hypothesised that an erroneous setting of that variable might be the
cause.

If I were you I'd take this to the freebsd-java list, there's more of a
concentration of expertise there :-)


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
New Freedom of Information Act: theirs, to yours. Happy now?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: java not running .jar files without absolute path. (take II)

2004-06-09 Thread Jan Grant
On Wed, 9 Jun 2004 [EMAIL PROTECTED] wrote:

  which java
 /usr/local/jdk1.4.2/bin/java

  java -jar Jreepad-1.0.jar
 Error: could not find libjava.so
 Error: could not find Java 2 Runtime Environment.

 however, the program will run with an absolute path:
  /usr/local/jdk1.4.2/bin/java -jar Jreepad-1.0.jar


 i don't see any typos in my $PATH (witness 'which' result above).

 the same occurs with linux-sun-jdk (when i put it earlier in the $PATH)

 am i missing something?  is this standard behaviour for java?

Works for me; is JAVA_HOME set to something broken in your environment?

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
( echo ouroboros; cat )  /dev/fd/0 # it's like talking to yourself sometimes
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: looks like i've dug my hole too deep, plz help quick.

2004-05-13 Thread Jan Grant
On Wed, 12 May 2004, carvin5string wrote:

 You have only those two files in root? What about the kernal files I
 see on my system?

You're running a -STABLE branch, the responder is running -CURRENT.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Sufficiently large=infinite for sufficiently large values of sufficiently
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: wine

2004-05-13 Thread Jan Grant
On Wed, 12 May 2004, Radu MOLNAR wrote:

 The second problem that i had is more wine related. In all of the 3 games
 i mentioned i was unable to connect to any network games or host any games
 that other could see. I posted these problems on the wine mailing list too
 but it seems that not many freebsd people use wine or play games. This is
 odd as from what i heard freebsd's power is in it's speed, something that
 i noticed for my self by using it for desktop aplications.

I've also experienced a loss of network connectivity for Wine apps since
the version around 2004-04.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Leverage that synergy! Ooh yeah, looking good! Now stretch - and relax.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: private subsubdomains

2004-04-07 Thread Jan Grant
On Wed, 7 Apr 2004, Sebastian Kutsch wrote:

 I want to setup subsubdomains to reach individuell PC's in my LAN from
 the Internet without portmapping.
 I habe got a ADSL line using ppoe to conect to my ISP getting a public
 IP on the tun0 interface. Using the no-ip service I have got a subdomain
 of the form my.domain.com. ppoe and the no-ip daemon are running on
 a saperate machin with FreeBSD 4.7 functioning as the network
 gateway/router wich is conected with dc0 to the ADSL-modem and with rl0
 (192.168.33.1) to the LAN. What I want is to do is reach an individual
 PC from the Internet by using a subsubdomain of the form
 pc1.my.domain.com.
 I have configured bind 8 running on my gateway so that I can reach the
 PC's in the LAN from within the LAN by using i.e. pc1.my.domain.com.
 But trying to reach a PC from the Internet conects me to the gateway.
 By reading the Handbook and man-pages I have not got a clue how to
 resolve this problem.

In general, you're out of luck. Pretty much every service uses IP
addressing only; thus, unless you have sufficient routable IP addresses
(ie, your ISP is providing you with a subnet) then you simply can't do
this.

The major exception is HTTP (and the various things that layer on top of
it) which carries the target hostname as part of the protocol.
Unfortunately, HTTPS leaves you back at square one since it uses SSL
directly rather than via some form of STARTTLS negotiation that might be
able to send the desired hostname.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Bolstered by my success with vi, I proceeded to learn C with 'learn c'.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to get memory usage for process?

2004-04-06 Thread Jan Grant
On Tue, 6 Apr 2004, Artem Koutchine wrote:

 Hi!

 I need to figure out how much memory process really takes.
 For example, i am running 100 perl scripts, they are all the
 same source and i guess some memory is shared among them
 (mostly perl interperter i guess). So, i need to know how much
 memory is shared and how much memory is used for each new
 running script (including buffers, e.t.c.). What command shoud
 do the trick and with what options?

You're probably after the sysutils/pmap utility, in the ports.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
...perl has been dead for more than 4 years. - Abigail in the Monastery
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: secure cvs server, urgent

2004-04-05 Thread Jan Grant
On Sun, 4 Apr 2004, dave wrote:

 Hello,
 I'm wanting to offer cvs services to a select group of users from my
 internal server. I need this to be as secure as possible using ssh. I've
 tried cvsd, and although it starts when i try to log in, i'm using :pserver:
 at the moment, i get the message, premature end of file from server, consult
 above messages if any. There are none and nothing in the logs. When i tried
 to use the :ext method i got the error:
 login can only be used with the pserver method.
 If anyone has secure cvs services going behind a firewall to users on
 the net please let me know.
 Thanks.
 Dave.

Depends what you mean by secure. Typical use with ssh is to set

CVSROOT=:ext:[EMAIL PROTECTED]:/path/to/cvs/repo
CVS_RSH=ssh

in which case the user will need an account on your machine. If you set
up public/private key pairs then cvs access from the command line is
seamless without requiring cvs login (you use ssh-agent to keep your
passphrases for you).

You can force a command line by configuring the user's
.ssh/authorized_keys file; you might want to consider setting up a
jailed environment for your users with sshd and cvs in it.

Even after all that, cvs still has enough mechanisms to permit the
execution of arbitrary programs on the server with the user's
credentials; so your cvs server still effectively has a high level of
trust in your users.

If you want something secure like this you might want to consider an
alternative source control system. Or maybe, if licensing permits,
offload that risk to sourceforge, who've got a lot of practice at this
sort of thing.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Personal responsibility for corporate decisions:
if they've nothing to hide, they've nothing to lobby against.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Java Requires X Windows?

2004-03-29 Thread Jan Grant
On Sat, 27 Mar 2004, Matthew Seaman wrote:

 On Fri, Mar 26, 2004 at 06:01:51PM -0900, Joe Pokupec wrote:

  Do I need to have X Windows installed for Java to 1.4 to run on FreeBSD 5.1?

To run, no. To build, what Matthew said.

 You don't need a full installation of XFree86: all you need are the
 devel/imake4 and the x11/XFree86-4-libraries ports.

Although if you're doing any AWT stuff server-side (eg, rendering
graphics on the fly for delivery by servlet) you may find you need this:

JAVA_OPTS=-Djava.awt.headless=true

I believe the 1.4 release notes for Java include details about its
somewhat improved (ie, it works) headless support.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
...and then three milkmaids turned up
(to the delight and delactation of the crowd).
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: sleeping for 30 seconds

2004-03-26 Thread Jan Grant
On Fri, 26 Mar 2004, Richard P. Williamson wrote:

 What's a good sh algorithm for the above?  (assume  10
 seconds indicates error condition and a 50 second sleep
 between iterations when necessary, and I don't need a
 'five attempts then sleep' thing).  Also, assume I've
 simplified for the home audience.  The sh script is
 lots more involved then the example above implies.

You might, if the possibility is there, want to use the exit value of
the main process to indicate errors, which is perhaps a little more
reliable.

If you want the time in seconds between two points, you might try
something like this:

start_time=`date +%s`
# ... do something
end_time=`date +%s`
time_taken=$(($end_time - $start_time))



-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
New Freedom of Information Act: theirs, to yours. Happy now?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: The chown command

2004-03-23 Thread Jan Grant
On Mon, 22 Mar 2004, Gerald S. Stoller wrote:

  This gives the system owner the flexibility to leave
 it this way, or to restrict this ability to  root  as it is now by
 seting  chown's  permissions to  500 , it is already owned by  root.

The chown command merely uses the chown system call. It is perfectly
possible for a user to write and compile their own version of the chown
command; so setting permissions on a particular executable do not, in
and of themselves, prevent users from effectively duplicating the effect
of the command. This is broadly true across all unixalikes.

   This is all that a single actual user (as most home systems are)
 system needs, but for a true multi-user system one may want to restrict
 the change to cases where the new owner and the current owner are members
 of one group (and the system administrater should be careful about adding
 users to the group  wheel ).  If the system has some groups that contain
 all users, we may want to allow them to be excluded from consideration,
 though we shouldn't worry about this now.
   I would like to push for such a change and wish others would
 join me; if anyone knows of any possible problems from this change, or
 has any objections to it, please let me know.

This seems overly complicated. The reasons chown is generally limited
are security-motivated: for example, one can subvert a quota system by
giving away files.

Rather than present your solution first, perhaps you could indicate the
use cases that motivate your suggestion. There may be other ways to
achieve the goals you have.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
...perl has been dead for more than 4 years. - Abigail in the Monastery
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Why does `df` lie about free space (it doesn't)

2004-03-18 Thread Jan Grant
On Thu, 18 Mar 2004, Kyryll A Mirnenko wrote:

 Using tunefs -m. You need to be really careful doing this, and read
 the man page for tunefs again, particularly the warning about how
 lowering this number can trash your filesystem's performance.

   I don't want that, I need to allow using preserved 8% of disk space
 to a little group of non-root users (for ex. postgres  rootty, my
 unprivileged user), but noone more. How do I do this?

You don't, without hacking filesystem code. The suggestion of another
poster to buy more disk is a good one.

 PS. You keep on appearing to confuse the notion of free data blocks with
 free inodes. They're not the same thing: they are two distinct resources
 and your filesystem can run out of either pretty much independently.

   inode(5) descrbes inodes as a table of block addresses kinda FAT but
 with variable block sizes inodes point to. That is.

It's not really like FAT operation at all; but another responder has
given some detail along these lines.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Theory and practice _are_ the same thing. In theory.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Why does `df` lie about free space

2004-03-17 Thread Jan Grant
On Wed, 17 Mar 2004, Kyryll A Mirnenko wrote:

   Thanks, thats what I want. So that means nobody but root can write
 to that preserved (with `tunefs -m`) space? How can I allow more users
 to do that?

Using tunefs -m. You need to be really careful doing this, and read
the man page for tunefs again, particularly the warning about how
lowering this number can trash your filesystem's performance.

   (my mail server crashed on friday, so I didn't receive freebsd
 digest about this)

jan

PS. You keep on appearing to confuse the notion of free data blocks with
free inodes. They're not the same thing: they are two distinct resources
and your filesystem can run out of either pretty much independently.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Don't annihilate, assimilate: MacDonalds, not missiles.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 1 processor vs. 2

2004-03-05 Thread Jan Grant
On Thu, 4 Mar 2004, Chuck Swiger wrote:

 The parity calculations for RAID-5 are a lot of work and that work scales
 linearly with the number of drives in the array.  The longer you make the
 array, the worse the performance becomes for small writes in particular.

How did you come to this conclusion? For a RAID 5 with a single parity
drive, the reason you zero the disks out completely on initialisation is
to set up the integrity of the parity check. Then any update to any
RAID5 with single parity requires a read of two drives (the target
sector and the corresponding parity drive), an in-memory exclusive or
against the new data, and two writes. Reads and writes can be in
parallel.

The work for parity updates only scales linearly with number of disks
if you use a naive parity algorithm. Or, obviously, if a drive fails.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
There's no convincing English-language argument that this sentence is true.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: RAID1 vs RAID5 [ was Re: 1 processor vs. 2]

2004-03-05 Thread Jan Grant
On Thu, 4 Mar 2004, Chuck Swiger wrote:

 Also, RAID-5 performance degrades horribly if a drive is down, whereas RAID-1
 does fine...

Using the algorithm you indicate below, RAID-5 performance would not
degrade on the loss of a drive, it's start out that badly.

 A five-disk RAID-5 array has to read 4 sectors and write five sectors if you
 change one byte.

Wrong; see previous response.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Q: What's yellow and equivalent to the axiom of choice? A: Zorn's lemon.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem with sed and awk

2004-03-01 Thread Jan Grant
On Thu, 26 Feb 2004, [iso-8859-2] RoubĂ­?ek Zden?k (T-Systems PragoNet) wrote:


  Hello questions

  Any idea what I am missing?

 cat test
 1;1
 2;2
 awk -F ';' '{print $1}'
 1
 2
 awk -F ' FS=; {print $1}'
 1;1
 2
 

The FS=; is a pattern expression that is used to match the first line
of input, after it has already been split into fields. It evaluates true
so the block it guards is always run. After the first line has been
dealt with, future lines will be split using the new FS setting. As
another poster supplied, slap the FS setting in a BEGIN-guarded block.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
If it's broken really badly - don't fix it either.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Shell scripting woes.

2004-02-26 Thread Jan Grant
On Wed, 25 Feb 2004, Mathias Haas wrote:

 Oh my! What stupidity! Of course. I'm afraid sometimes my DOS-roots are
 revealed...  Thanks!

In general, you ought to be aware that cron sets up only a minimal
environment. If you want your scripts to run predictably then you
probably ought to ensure the first thing they do is to recreate the
environment you're after: setting $PATH, the working directory, umask,
and so on.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Boycott Arabic numerals! What have they ever done for us?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Move to insert here mail server? WAS Re: Sending mail gets 'Relaying Denied' from off network.

2004-02-18 Thread Jan Grant
On Wed, 18 Feb 2004, Eric F Crist wrote:

 OK, I'm tired of trying to configure sendmail.  I think I give up.  I've hear
 postfix and qmail recommendations the most.  I need a mail server that can do
 a couple of things for me:

 1) Host multiple domains on the same server
 2) Easy user management and control (quotas?)
 3) I NEED MY SPAM ASSASSIN
 3) Webmail recommendation for this mail server.
 4) Your love and support with what I choose... ;)

 Sendmail, since I've used it heavily, has become too much of a burden for me.
 Please reply with a 'vote' and possibly and howtos or 'change-over'
 instructions.  If you all recall, I've failed this once before.

They'll all do this. Personally: exim (actually, multiple exims, but
I've a rather unusual setup) as MTA, cyrus as mailstore, MailScanner in
queue-to-queue mode, and silkymail as webmail client.

Unfortunately, depending on how you want to manage your users, cyrus is
one of the heavier imap servers out there. I love it to bits but it
can be tricky to get exactly right. You will need some scripting to tie
your directory/authentication to cyrus quotas.

You'll probably get the same story with most roll-your-own setups. There
are a number of products that claim to be email appliances and you
might look at those, depending on how much preexisting infrastructure
you've got for managing virtual domains and users.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Axioms speak louder than words.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Lock order reversal

2004-01-29 Thread Jan Grant
On Thu, 29 Jan 2004, Piotr Gnyp wrote:

 What is exactly lock order reversal? I`ve encountered something like
 this on my console:
 lock order reversal
  1st 0xc720dce4 vm object (vm object) @ vm/swap_pager.c:1323
  2nd 0xc06c01a0 swap_pager swhash (swap_pager swhash) @
 vm/swap_pager.c:1838
  3rd 0xc0c358c4 vm object (vm object) @ vm/uma_core.c:873

A lock is a software object that is attached to a piece of data in order
to prevent multiple concurrent accesses/updates to that data getting an
inconsistent picture of the data.

FreeBSD names classes of lock depending on the objects they protect.

There are situations that can arise called deadlock where process A
holds lock x and waits for lock y; process B holds lock y and waits for
lock x.

Various schemes for ordering lock acquisition can be used to guarantee
that deadlocks can arise. A lock order reversal means that the
debugging watchdog in your kernel has detected that locks of two classes
were acquired in different orders.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
If you have received this email in error, do whatever the hell
you want with it. It's not like I can stop you anyway.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: portupgrade

2004-01-23 Thread Jan Grant
On Fri, 23 Jan 2004, Jeff Elkins wrote:

 Ouch!

 I'm located somewhere deep within a portupgrade cycle. I misunderstood the
 command (portupgrade -a), and assumed that it would only upgrade ports that
 I had installed, not pkgs installed with pkg_add -r.

 How can I avoid portupgrade touching big packages such as KDE, Mozilla and
 OpenOffice which were installed from binary?

Look for HOLD_PKGS in /usr/local/etc/pkgtools.conf


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Axioms speak louder than words.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NOQUEUE: SYSERR (root): host localhost unknown ?

2004-01-15 Thread Jan Grant
On Thu, 15 Jan 2004, Rommel B. Ikeda wrote:

 Thank you very much for the reply...
 This was what was in my /etc/hosts before your response...

   ::1 IBM-R40e [EMAIL PROTECTED]
   127.0.0.1   IBM-R40e [EMAIL PROTECTED]
   192.168.1.35IBM-R40e [EMAIL PROTECTED]

 This is my new /etc/hosts now:
   ::1 localhost
   127.0.0.1   localhost
   10.0.0.1[EMAIL PROTECTED]

Domain names should not contain @ characters.

 I had to supply 10.0.0.1 [EMAIL PROTECTED] because Gnome 2 complains
 that it can not find it...So, I just invented it...I hope that it is
 right...
 One thing I do not I understand is that when I do:
   %host localhost.
 It will be give a Host not found response...But, my system is working
 fine...What do you think is wrong with it...

The host command doesn't use the full resolver; it uses DNS queries
only.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Theory and practice _are_ the same thing. In theory.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems using portupgrade to recompile all ports

2004-01-15 Thread Jan Grant
On Thu, 15 Jan 2004, Scott I. Remick wrote:

 So I'm upgrading my 5.1R desktop to 5.2R. Used cvsup, followed the
 instructions in UPGRADING, did a custom kernel, etc etc. That part went
 fine, no probs.

 I noticed some of my daemons (from ports) seemed a bit annoyed though upon
 booting up 5.2. I tried using portupgrade -Rf on them individually, and
 then all was well. I decided then that it'd be best to do everything (-Raf)
 to play it safe. I've done this before.

 So it finally finished last night, but not really... about 132 ports were
 failed/skipped. My problem is figuring out the most efficient way to deal
 with it from here. LAST time I did a portupgrade -Raf I had a much smaller
 number failed/skipped, and what I did was work out the dependency tree for
 the remaining ones by hand using pkg_info -R and -r, figure out the order,
 and do a portupgrade -f on each in the proper order. This was to avoid
 rebuilding stuff already built on the first -Raf pass, and multiple times
 over (since I was taking care of each remaining one individually). Seems to
 me that if 50 of those 132 are X apps and I do a portupgrade -Rf on each,
 I'll be rebuilding XFree86 50 times. Hence the need to work out the install
 order by-hand based upon dependencies and only use -f. But I don't see that
 as practical this time around with so many left to do.

 So... my ultimate question is: how do you pros handle situations like this?
 Is there a trick I'm missing?

Do you know why the failure happened? The most frequent cause of this
when I've encountered the problem is that a distfile could not be
fetched. I tend to try to avoid that these days by prefetching the
distfiles prior to a build (ie, while I'm around to sort out problems
manually rather than overnight).

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
If it's broken really badly - don't fix it either.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to count the lines of code in a project?

2003-12-23 Thread Jan Grant
On Tue, 23 Dec 2003, Zhang Weiwu wrote:


 Hello. How to count the number of lines in all *.c file in a directory?

 I can think of this on csh:

  grep -c  `find . -name *.c` | sed s/.*:/e=e+/  /tmp/countlines.py

 And edit the py file, and e=0 as first line, print e as the last
 line, and execute the python script. wooo pretty cool for a newbie like
 me:)

 So is there a better method?

Not bad; but when it comes to basic operations on text files, unix has a
surfeit of tools that probably already do what you want. In this case:

find . -type f -name \*.c -print0 | xargs -0 wc -l



-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
(ECHOY GRUNTING) (EERIE WHISPERS) aren't subtitles great?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: use vi style in all line-edit environment

2003-12-23 Thread Jan Grant
On Tue, 23 Dec 2003, Zhang Weiwu wrote:

 I have been using vi all the time, even in csh I set bindkey -v to use vi
 style command-line edit.

 But when the context is switched to python, mysql, or scilab I have to warn
 myself not to type in vi style. Very often in mysql I mistyped something
 and try to type a x to correct it, or I press A and thought I would go
 to the end of the line.

 Is it possible to make a global configuration to let all command-line
 processor accept vi style key?

Most of the tools you're referring to use the GNU readline library. The
manpage (readline(3)) _claims_ that it offers a vi-style editing mode.
You'll have to suck it and see: try

echo set editing-mode vi  ~/.inputrc

and check the man page for more information.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Solution: (n) a watered-down version of something neat.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: /usr/home directory

2003-12-23 Thread Jan Grant
On Wed, 24 Dec 2003, flux wrote:

 Maybe kinda strange question, but...
 Why users' home directory located in /usr by default, not in
 root directory unlike Linux?
 Any ideas?

Hysterical raisins. Amongst other things, /home was often given to the
automounter so people's home directories could rove. If you want to
change this,

pw useradd -D -b /home

will probably do the trick (you will need to move existing directories).

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Impact of vulnerability: Run code of an attacker's choice
 Maximum Severity Rating: Moderate -- M$ security bulletin
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: spamassassin

2003-12-21 Thread Jan Grant
On Sun, 21 Dec 2003, Lowell Gilbert wrote:

 Doug Reynolds [EMAIL PROTECTED] writes:

  I've been trying to setup spamassassin on my freebsd box with postfix.
  I was reading the other thread about spamassassin.  What i couldn't
  figure out, was how it got the mail from the mail system.  I looked at
  spamd but it didn't look like the program.  I googled and still
  couldn't find a good tutorial.  If someone knows of a good tutorial and
  could give me a quick explaination, i'd be greatful.  Oh, I am running
  5.1-RELEASE.  thanx

 My preferred method is by filtering through procmail.  It's a simple
 procmail recipe:
 # pass through spamassassin
 :0fw: spamassassin.lock
 | /usr/local/bin/spamassassin

 (where the w flag tells it to continue procmail processing after
 running the message through spamassassin)

This is ok on workstations but it's hard to manage the load on a
multiuser system, since procmail is effectively a final delivery.
There's also a port for MailScanner, which operates prior to final
delivery on mail spools. It can integrate SpamAssassin and the virus
scanner(s) of your choice; as a plus, the load generated is far more
predictable.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Rereleasing dolphins into the wild since 1998.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD CVS for DOS/Windows sources?

2003-12-21 Thread Jan Grant
On Sun, 21 Dec 2003, Doug Lee wrote:

 On Sun, Dec 21, 2003 at 08:58:30PM +, Daniela wrote:
  On Sunday 21 December 2003 17:25, Doug Lee wrote:
   I'm trying to use FreeBSD's CVS (v1.11.5) to manage DOS/Windows
   projects, which of course means files with CR/LF line endings.  The
   docs claim the repository will internally store everything (text files
   anyway) with only LF endings, but in fact I'm seeing CR/LF endings in
   repository text files.  This is still fine until I pull a project out
   with a DOS/Windows CVS client (the standard cvs.exe), which gives me
   lines ending in CR/CR/LF.  If I pull the project under Unix, I get the
   CR/LF endings just fine; but my coworkers will not be telneting to
   Unix just to pull code...
 
  I don't know anything about Micro$oft Winblows eXPensive, but why don't you
  just strip the CR on the server? So the Windoze client can add the CR, and
  you always get the native format, respectively.
  This is definitely the fault of the client, so don't blame the server :-)

 Actually I wasn't sure whose fault it was, since the docs say the
 CR's should not be stored by the server.  Given that, the client did
 what it should under the circumstances.

If the file is stored in text mode, the _client_ does line-ending
conversions according to local conventions. The server expects the files
to be in the unix \n-terminated format.

So the problem is actually the fault of the unix client since it
knows that it doesn't need to do any CRLF translation on upload.

You see this a lot when using Unix CVS to deal with windows-originated
files. Your options are either to do the first import using a windows
cvs client, or to correct the line ends (eg, with dos2unix) on the unix
cvs client prior to upload.

Once the files are correctly formatted on the server, both unix and
windows clients will be able to deal with them correctly.

 I didn't edit the repo because I don't consider myself savvy enough
 about CVS yet to start playing with repo files directly, except to
 look at them with a curious eye.

For text files, they're line-oriented. The server itself will not insert
any '\r' characters, so any that are in your repo files definitely came
from a borked upload. You should be able to strip them out and
re-checkout the files: diffs will be unaffected.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
There's no convincing English-language argument that this sentence is true.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: When FreeBSD have higer performans than Linux and When Linux have higher performans than FreeBSD

2003-12-12 Thread Jan Grant
On Thu, 11 Dec 2003, Vahric MUHTARYAN wrote:

 I red Explaining BSD documents and on 4.7 Which should I use , BSD or
 Linux section it said that  BSD systems , in particular FreeBSD , can have
 notably higer performans than Linux but this is not accross the board In
 many cases , there is little or no difference in performans. In some cases ,
 LInux may performa better than FreeBSD .

 *Now , I wonder When or Which situations FreeBSD have more performans
 than Linux ?!

 *I wondor too When or Which situations Linux have more performasn than
 FreeBSD ?!

 I used Linux too much but I never use FreeBSD in production Env. because
 of this I can't compare it

Suck it and see. That is, if you're interested in comparing
performance for your application, run your application on both platforms
and measure the performance. If you have specific questions about tuning
for a particular application, then the man page tuning(7) has some
information; or bring specifics to the list.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Work #90: As many pseudo-intellectual sycophants as necessary to make one
inarticulate scotsman think he's a genius in command of The Profound.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: last question about up-to-date ( I hope )

2003-12-12 Thread Jan Grant
On Thu, 11 Dec 2003, Vahric MUHTARYAN wrote:

 Hi ,

 For keep up to date FreeBSD I think all people are using source update
 method ( When I sent a message to list almost everybody adviced this ) Only
 one person said that binary update but this is not recommanded because
 compiled version always work better and I saw that compile update program is
 not working quickly because  Colin Percival waiting lest version 


 I'm just wonder Why patching is not used instead of source update..
 it's patching source tree too for security bugs ... I checking output of the
 cvsup -g -L 2 stable-supfile command . it's only download openssh , bind and
 like this almost what writen in security advisories .

 if you said soruce-update method more then security update Thats Okey .
 But I want to know or understand if I don't want to use new features and
 only interest with security updates ( patch updates ) Why patches does not
 enough ?!

You _are_ downloading patches when you use cvsup. However, the tool
provides a handy level of automation and therefore can prevent simple
pilot error compared to hand-application of patches.

You are not required to track the -STABLE branch. Every (recent) release
also has a maintenance branch, which merely receives security updates.
Cvsup can track these just as easily for you. The handbook has more
information on this.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Political talk? / What is said can be unsaid / with good old BS
  -- ASCII haiku
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how to build Spamassassin

2003-12-09 Thread Jan Grant
On Mon, 8 Dec 2003, Tony Jones wrote:

 Hi.

 Over time I've got into the habit of either using packages or building
 directly from the source.  Last time I tried this (Postfix) and asked a Q
 here, I was rapped over the knuckles :-) and told to use the Ports.

 Right now I'm trying to build spamassassin, so I decided I'd be good and do
 it the Ports way.

 My current system is 4.9-PRERELEASE #5,  upgraded for many years from src
 using CTM.

 - Read the handbook, ran /stand/sysinstall to get the ports tree, this failed
   not finding the download location on ftp.freebsd.org and telling me to
   manually change it

 - So I went and got it manually.   Was a little confused as many years ago
   I recalled their being a ports tree per release.  Now ports-stable and
   ports-current both point to ports.

 - I downloaded ports,tar.gz.   Unpacked it and changed into
 ports/mail/p5-Mail-SpamAssassin

 - Did a make which immediately failed with

 Makefile, line 27: Malformed conditional (${PERL_LEVEL}  500600)
 Makefile, line 27: Need an operator
 Makefile, line 31: if-less endif
 Makefile, line 31: Need an operator
 Makefile, line 33: Malformed conditional (${PERL_LEVEL}  500800)
 Makefile, line 33: Need an operator
 Makefile, line 35: if-less endif
 Makefile, line 35: Need an operator

 I recalled being able to make individual ports this way in the past.

Where did you unpack the ports tree to? /usr/share/mk/bsd.port.mk
expects /usr/ports, or the PORTSDIR variable to be set if the tree lives
elsewhere.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
printf 'cat\nhello world' | `sh -c 'read c; echo $c'`
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: x11/kde3 and libglut error

2003-12-08 Thread Jan Grant
On Sat, 6 Dec 2003, Ryan Moe wrote:

 [EMAIL PROTECTED] wrote:

 Hello. I'm using FreeBSD 4.8-RELEASe p14. I'm trying to install kde3 on my
 system and get this error
 
 /usr/libexec/elf/ld: cannot find -lGL
 *** Error code 1

 I believe the problem lies with XFree86-4-libraries.  I had the same
 problem and portupgrade -f XFree86-4-libraries followed by portupgrade
 -f libglut fixed it for me..

Are either of you using the nvidia-driver port? If so, it puts GL libs
in place which break this build. Fortunately, it keeps the old libraries
nearby, so rather than a full rebuild of the XFree86-4-libraries, you
can pkg_deinstall nvidia-driver, do the build, then reinstall
nvidia-driver. Much quicker. Incidentally pkgtools.conf can be taught to
do this for you.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
No generalised law is without exception. A self-demonstrating axiom.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Ports intelligent?

2003-11-28 Thread Jan Grant
On Fri, 28 Nov 2003, Steve Bertrand wrote:

 Traditionally, when installing for a new Internet server, I have
 installed everything from sources in a particular method.

 This is a nightmare to upgrade, and would like to know if installing
 from ports would be sensible.

 MySQL, Apache 1.x, PHP, Vpopmail, Courier-imap, Qmail etc.

 In which order should I install? I need to have mysql driven vpopmail,
 and apache and php must talk to mysql also. IMAP support must be built
 into PHP too.

 How do I put this mess together sensibly?

Install portupgrade and use that to manage your ports. It can be a chore
to get things right to begin with, but is definitely worth persevering
with. Check the makefiles of the ports you're interested in for tunable
build switches.  Read pkgtools.conf carefully. Take copies of all your
config files; port upgrades don't usually overwrite these, but if they
do you'll be able to recover (and report the matter to the port
maintainer).

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Recursion with grep?

2003-11-14 Thread Jan Grant
On Thu, 13 Nov 2003, Francisco Reyes wrote:

 On Fri, 14 Nov 2003, JacobRhoden wrote:

  No need to hack grep plese! just use -R (it appears the man page does not
  document the -R function, but you need to use -R in grep for it to recurse.

 -R == -r

 That was mentioned in the previous emails. It only recurses directories.
 It will not work with a filemask.

 You can't say
 grep -r string *.c

 You can only say
 grep -r string directory

That's correct, but the Unix Way is* to use small tools that do one job
well* and compose them for the desired effect. Someone's already given
you an invocation of find and xargs that (almost) does what you want:

find . -type f -name \*.c -print0 | xargs -0 grep -h searchstring

If you like, wrap this up with a script. Call the script grep and
stick it closer to the start of your path than the system one.

Even the win32 shell is more capable of command composition these days.
Chucking as much disparate functionality as possible into each tool
is a poor tactic because you wind up with every tool being
indistinguishable from its peers, modulo the totally incompatible and
irregular interface :-)

G'luck,
jan

* allegedly :-)

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
and Nostradamus never dreamed of the Church of the Accellerated Worm
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: exim not running after portupgrade?

2003-11-13 Thread Jan Grant
On Thu, 13 Nov 2003, Ceri Davies wrote:

 On Thu, Nov 13, 2003 at 08:50:31AM -0500, William O'Higgins wrote:
  I recently ran portupgrade to get to a state that approximates current,
  and when I rebooted exim is not running.  It used to, just fine, but now
  when I boot I've got no MTA.  I can tell you, fetchmail thinks this is
  quite the problem :-)
 
  What could have caused this?  As far as I can tell it was being started
  *somehow* before, and now it isn't.  It works fine if I just remember to
  # sudo exim -bd -q5m
  but I think it shouldn't have stopped starting just because of a
  portupgrade.  I went from exim 4.12 to 4.24, but there are no changes in
  the configuration needed for that update.

 I'm pretty sure that sometime during that gap a requirement for
 exim_enable=YES in /etc/rc.conf was introduced.

Yes, exactly. The exim port is now compatible with -current's rcng; if
you look at /usr/local/etc/rc.d/exim.sh you'll probably see it's
checking for that flag.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
printf 'cat\nhello world' | `sh -c 'read c; echo $c'`
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: portupgrade -arR

2003-11-12 Thread Jan Grant
On Tue, 11 Nov 2003, William O'Higgins wrote:

 Quite foolishly, I ran this command without thinking it through:

 portupgrade -arR

 It's been running for 15 hours or so now, and I'm wondering how much
 longer it is likely to take?  I realize that that depends grin /

Well, that depends; many ports can be upgraded quickly. However
compilation of C++ is markedly slower than compilation of C, so whenever
you see things like KDE or Qt meeding an upgrade, expect it to take a
while.

If you use portversion -v | grep -v = then you'll see the list of
ports which remain that need updating. (You need to run portsdb after a
cvsup for the output of this, and portupgrade's operation, to be
accurate.)

 Any suggestions?  Thanks.

If you've got packages installed that you don't want, portupgrade _can_
be safely interrupted and will pick up pretty much from where it left
off when you kick it off again.

It's often worthwhile checking the Makefiles for the ports you install
for tunable variables. Many ports offer interactive menus to select
features to build; Murphy's law would suggest that one of these might
well pop up just after you leave portupgrade to do its thing and go to
bed. You can normally select batch operation and choose the appropriate
options by putting them into /usr/local/etc/pkgtools.conf; the exact
mechanism used to indicate non-interactive mode isn't uniform across
all ports, however.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
printf 'cat\nhello world' | `sh -c 'read c; echo $c'`
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mesa port

2003-11-11 Thread Jan Grant
On Tue, 11 Nov 2003, Lutz Kittler wrote:

 Hi,

 whats going on with

 Port:   Mesa-3.4.2_2
 Path:   /usr/ports/graphics/Mesa3

 It is deleted in ports database,but many packages ( eg. kde* )
 depend on this port.
 So portupgrade brings up many errors.
 What to do ?

pkgdb -F

The above fixed the issue (automatically) for me.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Goth isn't dead, it's just lying very still and sucking its cheeks in.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Backing up kernel before upgrade - 4.9 - how?

2003-11-06 Thread Jan Grant
On Thu, 6 Nov 2003 [EMAIL PROTECTED] wrote:

 In order to have a safety belt I'd like to backup my current kernel
 before upgrading (i.e. make installkernel) my newly compiled kernel.

 Which files do I need to back up?

 I thought about

 /kernel (file)
 /modules (directory)

 Anything else?

 TIA for your help,

make installkernel will rename your current kernel and modules to
kernel.old and modules.old for you.

I tend to explicitly grab a copy of configs (/etc) prior to using
mergemaster; this is purely paranoia on my part.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Axioms speak louder than words.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Is Java/Tomcat on FBSD practical?

2003-11-05 Thread Jan Grant
On Tue, 4 Nov 2003, Heath Volmer wrote:

 Hi. I'm new to FreeBSD, my previous -nix experience coming from OSX and
 Debian/Suse linux.  I've been generally very happy with the performance
 and relative ease of setup on my 4.8 system.

 My biggest problem has been Java.  I've done the diablo 1.3 package and
 java seemed to work (java -v), but when I install Tomcat it won't start.
 I've done the same install on mac and windows with no problem.  The
 stack trace is completely alien to me and I can try to get it if it
 would help.

 I'm basically wondering if running Tomcat or any other java on this
 machine is realistic or not.

 Thanks, Heath

Check on how up-to-date your system is. There were fixes that went into
the base system post 4.8-R which are probably relevant.

FWIW I've got tomcat running happily under the 1.3 and the 1.4 native
ports on a -stable freebsd.


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
(Things I've found in my attic, #2: A hundredweight of pornography.)
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: PostgreSQL on FreeBSD

2003-10-28 Thread Jan Grant
On Tue, 28 Oct 2003, Wayne Pascoe wrote:

 On Mon, Oct 27, 2003 at 04:04:28PM -0500, Lowell Gilbert wrote:
  Why does setting them in
   /etc/sysctl.conf or /etc/loader.conf not work ?
 
  You're doing something wrong.  That's all I can say when the
  description of the failure is just not work.

 Allow me to expand on that then... I put the options in /etc/sysctl.conf
 as follows:
 kern.ipc.somaxconn=512
 kern.ipc.shmmax=268435456
 kern.ipc.shmall=65536
 kern.ipc.shmmni=128
 kern.ipc.semmns=256

 When I reboot, sysctl -a | grep kern.ipc.semmns returns
 kern.ipc.semmns: 60

I believe -current now has code to pull values for these out of the
kernel environment; that's missing in -stable (IIRC; not checked, but I
have a vague recollection of trying to figure out how the hell the
values were supposed to get into the sysctl value until I looked at the
-current tree).

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
I like oranges more than apples!? - that's like comparing apples and oranges!
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ssh keys - howto?

2003-10-26 Thread Jan Grant
On Fri, 24 Oct 2003, Frank Knobbe wrote:

 On Fri, 2003-10-24 at 17:28, [EMAIL PROTECTED] wrote:
  Okay, I'm stumped. Just need to get ssh keys working. I have FBSD-5.1 web
  server with
  sshd running. I have a workstation running W2K with WinSCP3. I have tried
  Puttygen to
  create the keys and copied the key to .ssh directory on FBSD, renamed it
  authorized_keys
  but it don't work. I then ran ssh_keygen on the BSD box, but don't know
  what to do with the
  two files it created, there are no instructions about that part in the man
  file. Does anyone
  have a how-to on settup of ssh between w2k and fbsd?


 I'm not aware of a How-To, but you have to create the files on FBSD.

No, you don't. Use puttygen to create the key (as you've done) and copy
the public half of it to your FreeBSD box (as you've done). Note that
puttygen itself is not sufficient; you need to let the putty session
know to use your private key - there's an option somewhere on the
session details. Once you've done that it should all just work. If you
continue to have problems it's worthwhile looking to get putty to dump
debug information as it tries to connect (again, there's an option for
this somewhere IIRC).


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
New Freedom of Information Act: theirs, to yours. Happy now?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: how do you actually download an up date for KDE

2003-10-26 Thread Jan Grant
On Sat, 25 Oct 2003, hawley wrote:

 How do you actually download an up date for KDE. I have been playing with
 Freebsd off and on for 3 yrs now. At present I have DSL internet access. I
 am running a 500 meg Hz intell machine. I have read untell my eyes bleed and
 tryed things untell my fingers cramped: NOTHING EVER WORKS I am now to
 the point where I would pay to have someone walk me through a successfull
 download. Any thoughts?

If you can afford the time for a compile, the simplest approach is to
utilise cvsup to keep your ports tree up-to-date (you may already be
doing this to update your kernel and base userland system). Details of
this are in the handbook. From an up-to-date ports system, install
portupgrade. It's a handy tool which will help you to automate the
maintenance of your installed packages. You can tell portupgrade to try
to fetch binary packages to upgrade, or (if none are available) it can
grab the sources for the packages you need and build them for you.

There tends to be a teething period as you switch to portupgrade (if
you've been doing things by hand up until now) but it is definitely
worth persevering with. There's plenty of advice on using it contained
in the archives of this mailing list (also on freebsd-stable).

Note that a from-source rebuild of KDE and its dependencies, while
generally painless, will take quite a bit of time on your machine - but
somewhat less than three years :-)

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
On modesty: whoever said it's hard being perfect obviously wasn't me.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: firebird, java, artsd, sound

2003-10-23 Thread Jan Grant
On Wed, 22 Oct 2003, John Nielsen wrote:

 The problem I'm seeing is that when a java applet uses sound, and another
 application tries to use sound, the applet crashes, soon followed by the
 browser.  Once the browser exits, the sound in the other application will
 play.  I am using KDE as my desktop, so I assume that this has something to
 do with artsd.  The other application in question that makes sounds in
 kmess, which I use as an MSN Messenger clone.

 I don't know if this is a configuration issue or a bug, and if it's a bug I
 don't know what program the bug is in.  So I'm hoping someone can shed some
 light on the situation--ideally one that leads to a solution.  Any takers?

There's probably contention over the sound devices. Have a look at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html
section 16.2.3 - maybe you can get the various subsystems using
different virtual sound devices?

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
You see what happens when you have fun with a stranger in the Alps?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How DBA solved overload problem ?

2003-09-18 Thread Jan Grant
[cc list cut]

On Thu, 18 Sep 2003, Supote Leelasupphakorn wrote:

 To all,

As a newly DBA, I really don't know how I deal with
 this problem. My problem is not so long ago, my database
 server seem to overloaded. It take me a time to find
 the cause of problem. I realize that some program don't
 queried wiht inappropriated SQL statement. I mean they're
 not efficient one.

 AS DBA how do you solved this problem?

 Thanks in advance,

It depends on your database to some extent; but basically, you need to
gather information. Assuming privacy and monitoring concerns have been
dealt with (hey, it happens), you ideally need to find a way to crank up
your DB's logging levels so that it records query statistics. You're
looking for particularly expensive queries. The usual crop of tools
(explain) can help you to tune your datyabase (eg, via index creation,
materialised views, etc.) or track down users to impart clue. From that
you should be able to identify the applications that are the source of
your problems.

You're probably better off directing specific questions at support
mailing lists for the DB in question.

jan

PS. If the DB in question is postgresql, you may find that complex query
performance is highly erratic due to the genetic planner kicking in.
Either turn up the number of generations it uses by an order of
magnitude or so, or turn it off.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Just because I have nothing to hide doesn't mean I have nothing to fear.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Upgrading sshd?

2003-09-16 Thread Jan Grant
On Tue, 16 Sep 2003, Johan Paul wrote:

 Hi all,

 Refering to the latest sshd vurnability
 (http://slashdot.org/articles/03/09/16/1327248.shtml?tid=126tid=172) I
 was thinking of upgradeing my sshd as well. So I cvsup'ed my system
 (FBSD 4.8) and there seems to be a updated file for sshd. But how do I
 upgrade sshd safly since when I type 'pkg_info |grep ssh' it return no
 packages. I guess sshd is included somehow by the default install (??)
 but how can I now upgrade it? I was thinking of portupgrade, but it
 needs a package to upgrade...

 Thanks!

cd /usr/src/secure/usr.sbin/sshd; make; make install

Then restart it.

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Random act of violence against bread: whole pint.
  -- extract from the Hawk the Slayer drinking game
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


  1   2   >