Re: global make -s

2012-01-22 Thread cliftonr

On 22.01.2012 07:54, Michael BlackHeart wrote:

Hello, I'd like to know is there any good way to implement make -s
behaivor as a default, 'cos in man make.conf  examplet/etc/make.conf
there's no anything about it. In most cases I just don't want to see
echo output of make. I've added an alias to .cshrc like this^

alias make  make -s \!:1

but I don't know could be there any negativity. Any advices?


You can set MAKEFLAGS=-s in your shell environment, or add -s to 
whatever

other value you're using for MAKEFLAGS.

IMHO, this would be a fine thing in a universe where everything would
always go right; in our own universe, I doubt that this is a good idea
because when things do go wrong you won't have any context for it.

  -- Clifton

--
   Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
 Custom programming, network design, systems and network consulting 
services


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: global make -s

2012-01-22 Thread cliftonr

On 22.01.2012 03:54, Michael BlackHeart wrote:

Hello, I'd like to know is there any good way to implement make -s
behaivor as a default, 'cos in man make.conf  examplet/etc/make.conf
there's no anything about it. In most cases I just don't want to see
echo output of make. I've added an alias to .cshrc like this^

alias make  make -s \!:1

but I don't know could be there any negativity. Any advices?


You can set MAKEFLAGS=-s in your shell environment, or add -s to the
current value of MAKEFLAGS if you have one.  That should work.

IMHO this would be good practice only in a universe where everything 
would
always work right.  In our own, this means anytime something goes 
wrong,
you'll have no context for it.  If you don't mind having to change 
flags
and rerun whatever make command failed, when something fails, to find 
out

what went wrong where, it's your call.
-- Clifton

--
   Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
 Custom programming, network design, systems and network consulting 
services


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread cliftonr

On 12.01.2012 15:52, Doug Barton wrote:

chflags -R noschg /usr/obj/usr
rm -rf /usr/obj/usr


It's much faster to do:

/bin/rm -rf ${obj}/* 2 /dev/null || /bin/chflags -R 0 ${obj}/* 
/bin/rm -rf ${obj}/*


If I could just add one thing here, for those who might be tempted
to immediately cut and paste that elegant command line:

Consider, how does that command evaluate if the shell variable obj
is not set, and you're running that literal string as root?

A: You will very systematically wipe your entire server, starting
at the root, and doing a second pass to get any protected files you
missed.

I'd recommend something safer like approximately this (untested):

  if [X${obj} != X -a -d ${obj}]; then cd ${obj}  (rest of cmds); 
fi


Sorry for the wasted bandwidth, for those to whom it was obvious,
but anybody who has ever had to clean up after a junior admin's
attempt to do something a little too clever will appreciate why I'm
posting this.

On the efficiency front, for the core file deletion operators, I've
had good results with this trick (requires Perl and makes use of
its implicit-operand idioms):

  find ${obj} | perl -nle unlink

If rm had an option to take files from standard input, or if
there's another program I'm not aware of which does this, it
could serve as the right-hand side of this.
  -- Clifton

--
   Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
 Custom programming, network design, systems and network consulting 
services


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: GENERIC make buildkernel error / fails - posix_fadvise

2012-01-22 Thread cliftonr

On 22.01.2012 13:16, Matthew Seaman wrote:

On 22/01/2012 19:00, clift...@volcano.org wrote:

If rm had an option to take files from standard input, or if
there's another program I'm not aware of which does this, it
could serve as the right-hand side of this.


xargs(1) -- generic solution to taking a list of command arguments 
from

a file or pipe, and building a command line from them.

...

xargs(1) is very commonly used in pipelines with find(1).


Thanks for making it clear that my comment was unclear. :-)

I had meant a program which reads the input file list as xargs
does and operates directly on its operands as xargs does

I'm very familiar with xargs, and have used it in many a shell script.
However, it has the weakness that it will end up doing many invocations
on the executable operand, as it batches up the input into command line
arguments.  I don't know to what extent that overhead would compare to 
the
other sources of overhead discussed earlier, or the overhead of 
executing

a Perl interpreter opcode per input, but I'd guess it's higher.

I think I tried that specific comparison of xargs rm vs. perl -nle 
unlink

once, some years ago, for some kind of temp file cleanup, and found the
latter was faster.  I don't have any numbers though, and if I did 
they'd

be long out of date.
  -- Clifton

--
  Clifton Royston  --  clift...@iandicomputing.com / 
clift...@volcano.org
  Custom programming, network design, systems and network consulting 
services


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: FreeNAS to Custom FAMP Server

2011-12-03 Thread cliftonr

On 01.12.2011 13:10, list, mailing wrote:

Hello Everyone!!

Server I have:
4 Drives No-RAID - 500GB Each
2GB RAM
Dual core Xeon 2.4 GHz

I'm looking to make an internal office machine running:
 - Backup System (Software RAID5 or ZFS)
 - Apache
 - MySQL
 - PHP

Traffic is just internal (Website) and a Backup Server
Looking to Install
Backup Raid (FreeNAS or something else)
Install Ports from FreeBSD Port Tree for extra software
Reconfigure the Default Apache config for an internal Webserver using 
MySQL

and PHP

Looked into install FreeBSD with ( Gvinum and graid)
 -- 9.0 Gives me error to bootcode
 On boot to cd went to cd setup drives with gvinum with raid5 and
started the gvinum setup
 Went back to installer again and on the drive setup I used 
Guided

installer and it gives me bootcode error


Since it doesn't appear anybody else has replied to you, I feel I 
should

mention that 9.0 is not yet released - it's going through pre-release
release candidates to shake the bugs out.  I wouldn't use it for 
something
like this yet, particularly if you're not yet very familiar with 
FreeBSD.


If you were going by the 9.0 release schedule page on freebsd.org, I
regret to say that you should ignore it - it's not being kept up to 
date

with the actual status and slippage of the release.  Treat 9.0 as
unreleased until you see the official announcement of its release.

The latest official release is 8.2, and I would start there.

Next, having all your drives in RAID-5 under gvinum may not be the 
right

choice or even a workable choice.  That would imply that you are going
to boot off the gvinum RAID-5 plex.  In that case, before the OS can 
set

up the gvinum drive, the boot loader, kernel, and the gvinum module
must all be readable via simple BIOS disk reads - but with RAID-5, they
won't be.  Gmirror can do this, but does only simple mirroring.

Possibly you would want to look at putting the drives in ZFS and 
setting

up boot from ZFS instead.  That's a more future-proof solution.

Once the drive set up is selected, and the OS installed, the rest of 
what

you want installed is pretty simple, I think, using the ports manager.
For an appliance style configuration, it's possible that FreeNAS 
would
be better for you; I'm sorry to say I haven't got around to trying it 
yet.


Best wishes,
  -- Clifton

--
clift...@volcano.org

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org