Re: how to add a few hundred ip on one interface?

2011-02-10 Thread Matthew Seaman
On 10/02/2011 23:52, patrick wrote:
> The standard way is to configure this in your /etc/rc.conf[.local]:
> 
> ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffnn"
> ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0x"
> ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0x"
> ... etc.

That used to be the case, but in fact no longer.  Nowadays you can put
this single line into /etc/rc.conf to configure a whole raft of IP
addresses on an interface:

ipv4_addrs_re0="xxx.xxx.yyy.134-147/23"

See rc.conf(5) for details.

> See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-ALIASES
> for more info. Note that aliases should have a netmask of 0x
> (255.255.255.255).

Also something that was once true, but is actually no longer required.
Nowadays you can give alias IPs the natural netmask of the network they
belong to.  Which has the handy consequence that there's no real
distinction between what was the first address, and what are aliases --
so you can easily renumber an interface on the fly, simply by adding a
new address/netmask, then removing the old one.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


[RELEASE] host-setup(1): a dialog(1)-based utility for configuring FreeBSD

2011-02-10 Thread Devin Teske
Hi All,

I'd like to announce the release of a new script. A script that I've
developed for our field engineers that I'd like to share with the rest
of the world.

http://druidbsd.sourceforge.net/download/host-setup.txt

host-setup(1) is a dialog(1)-based utility (written in sh(1)) designed
to make configuring FreeBSD more efficient.

We have this script configured to be run as root's initial login
immediately after "first-boot". The field engineer uses our custom
installer to install RELENG_8, and after the machine presents a login
prompt, they login with the pre-configured root password. After which
they are presented with this dialog (image attached:
host-setup.pub.png).

The dialogs should all be intuitive, and I hope that you like my work.
I've worked very hard to make this utility smooth, robust,
fault-tolerant and even enjoyable to use. Not only that, but it helps
prevents mistakes that could arise in doing these steps by-hand (like
forgetting to unmount active NFS-mounts before executing "route flush").

Please give it a try and let me know what you think.
--
Devin

P.S. This is not a trivial script. ``More nuclear reactor than bike
shed'' ^_^

P.P.S. Should be backward compatible to RELENG_4.

P.P.S. I know the screenshot says "host-setup.pub" -- that's only
because our in-house-only version has more functionality than the one
I'm releasing to the general public today (no functionality that anyone
in the public audience would ever care about though).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Recording from sound card

2011-02-10 Thread Robert Ames

I'm having problems trying to record from a sound card under
8.1-RELEASE.  The last time I tried this was many releases ago,
possibly 4.x-RELEASE.  Back then I would do something like "cat
/dev/dsp > file" but now when I try it I just end up with a 0 byte
file.  I'm using a different sound card than before so maybe that
has something to do with it.  Or possibly I just don't know which
device to use.  Playing sounds using "cat file.wav > /dev/dsp0.0"
works fine, but I can't get recording to work.  Does anyone have
any suggestions?  Thanks.

$ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0:  (play/rec) default

$ sysctl -a | egrep '(snd|pcm|sound)'
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: 
PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2009061500/i386
hw.snd.default_auto: 0
dev.pcm.0.%desc: Creative CT5880-C
dev.pcm.0.%driver: pcm
dev.pcm.0.%location: slot=9 function=0
dev.pcm.0.%pnpinfo: vendor=0x1274 device=0x5880 subvendor=0x1274 
subdevice=0x2003 class=0x040100
dev.pcm.0.%parent: pci0
dev.pcm.0.eapd: 1
dev.pcm.0.play.vchans: 1
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.buffersize: 4096
dev.pcm.0.bitperfect: 0
dev.pcm.0.spdif_enabled: 0
dev.pcm.0.latency_timer: 32
dev.pcm.0.polling: 0

$ mixer
Mixer vol  is currently set to  75:75
Mixer pcm  is currently set to  75:75
Mixer speaker  is currently set to  75:75
Mixer line is currently set to  75:75
Mixer mic  is currently set to  73:73
Mixer cd   is currently set to  75:75
Mixer rec  is currently set to  75:75
Mixer igainis currently set to   0:0
Mixer ogainis currently set to  50:50
Mixer line1is currently set to  75:75
Mixer phin is currently set to   0:0
Mixer phoutis currently set to   0:0
Mixer videois currently set to  75:75
Recording source: mic

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


Re: how to add a few hundred ip on one interface?

2011-02-10 Thread Vladislav V. Prodan
11.02.2011 1:52, patrick wrote:
> See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-ALIASES
> for more info. Note that aliases should have a netmask of 0x
> (255.255.255.255).

Much difference in the appointment of netmask /23 or /32 are not seen.

# ifconfig re0
re0: flags=8843 metric 0 mtu 1500

options=389b
ether 90:e6:ba:25:1c:b5
inet XXX.XXX.XXX.12 netmask 0xfe00 broadcast XXX.XXX.XXY.255
inet6 fe80::92e6:baff:fe25:1cb5%re0 prefixlen 64 scopeid 0x1
inet XXX.XXX.XXX.18 netmask 0xfe00 broadcast XXX.XXX.XXY.255
inet 192.168.1.201 netmask 0xff00 broadcast 192.168.1.255
inet XXX.XXX.XXX.22 netmask 0x broadcast XXX.XXX.XXX.22
nd6 options=3
media: Ethernet autoselect (100baseTX )
status: active


# netstat -rn | grep XXX.XXX.XXX
defaultXXX.XXX.XXX.1  UGS 060026re0
XXX.XXX.XXX.0/23   link#1 U   0 1605re0
XXX.XXX.XXX.12 link#1 UHS 00lo0
XXX.XXX.XXX.18 link#1 UHS 00lo0
XXX.XXX.XXX.22 link#1 UHS 00lo0 =>
XXX.XXX.XXX.22/32  link#1 U   00re0

-- 
Vladislav V. Prodan
VVP24-UANIC
+38[067]4584408
+38[099]4060508
vla...@jabber.ru
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: switching from gnu make to bsd make

2011-02-10 Thread Robert Bonomi

> From: Vikash Badal 
> Date: Thu, 10 Feb 2011 11:30:02 +0200
> Subject: RE: switching from gnu make to bsd make
>
> > -Original Message-
> > From: Polytropon [mailto:free...@edvax.de] Sent: 10 February 2011 10:11 
> > AM To: Vikash Badal Cc: freebsd-questions@freebsd.org Subject: Re: 
> > switching from gnu make to bsd make
> >
> > Of course, in my testing case OBJDIR and SRCDIR are empty, and I didn't 
> > define any of CC, CFLAGS, INCDIR or LIBDIR, so the defaults have been 
> > chosen.
> >
> > Do you encounter a specific problem?
>
> This is my problem:
>
> vix:$ make make: don't know how to make src/%.c. Stop

Just telling people "what happened" is *NOT* enough for intelligent
diagnosis of the  problem.  You also have to tell people  WHAT YOU DID
that provoked the error you encountered.

That said, dusting off my crystal ball -- which appears to be *working*
today -- you simply typed "make" at the shell prompt.

Try typing "make all" and see what happens then.


>
>
> this is my make file:
>
> --
>
> CC= cc 
* LIBS  = -lpthread -lmysqlclient_r 
> CFLAGS= -Wall -g 
> INCDIR= -Iinclude -I/usr/local/include -I/usr/local/include/mysql 
> LIBDIR= -L/usr/local/lib -L/usr/local/lib/mysql 
> OBJDIR= obj 
> SRCDIR= src 
> BINDIR= bin 
> PREFIX= /usr/local/nntpd 
> BINDIRFILES   = ${BINDIR}/nntpd
> OBJS  = ${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \
> ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o 
> ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o 
> ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o 
> ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o 
> ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
> ${OBJDIR}/nntpd.o
>
> $(OBJDIR)/%.o:${SRCDIR}/%.c
> ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@
>
> all:${OBJS}
> ${CC} -o ${BINDIR}/nntpd ${LIBS} ${CFLAGS} ${INCDIR} ${LIBDIR} \
>   ${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \
> ${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o ${OBJDIR}/nntp.o \
> ${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o ${OBJDIR}/sqlpool.o \
> ${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o ${OBJDIR}/daemon.o \
> ${OBJDIR}/list.o ${OBJDIR}/tcpserver.o ${OBJDIR}/tmpfiles.o \
> ${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
> ${OBJDIR}/nntpd.o
>
> --


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


Re: how to add a few hundred ip on one interface?

2011-02-10 Thread patrick
The standard way is to configure this in your /etc/rc.conf[.local]:

ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffnn"
ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0x"
ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0x"
... etc.

You could make a script to generate the correct configuration lines,
and then include it in your rc.conf:

/etc/rc.conf:

. /path/to/ifconfig_entries.sh

/path/to/ifconfig_entries.sh:
ifconfig_re0="inet xxx.xxx.yyy.134 netmask 0xffnn"
ifconfig_re0_alias0="inet xxx.xxx.yyy.135 netmask 0x"
ifconfig_re0_alias1="inet xxx.xxx.yyy.136 netmask 0x"

See http://www.freebsd.org/doc/en/books/faq/networking.html#ETHERNET-ALIASES
for more info. Note that aliases should have a netmask of 0x
(255.255.255.255).

Patrick


On Thu, Feb 10, 2011 at 3:36 PM, Vladislav V. Prodan  wrote:
> only a shell script at startup? or there are other standard tools?
> Is there a limit on the number of IP on one interface?
>
> ## make aliases IP
> for i in 134 135 136 137 138 139 140 141 142 143 144 145 146 147
> do
> ifconfig re0 xxx.xxx.yyy.$i/23 alias
> done
>
> for j in 134 135 136 137 138 139 140 141 142 143 144 145 146 147
> do
> ifconfig re0 xxx.xxx.xxx.$i/23 alias
> done
>
>
>
> --
> Vladislav V. Prodan
> VVP24-UANIC
> +38[067]4584408
> +38[099]4060508
> vla...@jabber.ru
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


how to add a few hundred ip on one interface?

2011-02-10 Thread Vladislav V. Prodan
only a shell script at startup? or there are other standard tools?
Is there a limit on the number of IP on one interface?

## make aliases IP
for i in 134 135 136 137 138 139 140 141 142 143 144 145 146 147
do
ifconfig re0 xxx.xxx.yyy.$i/23 alias
done

for j in 134 135 136 137 138 139 140 141 142 143 144 145 146 147
do
ifconfig re0 xxx.xxx.xxx.$i/23 alias
done



-- 
Vladislav V. Prodan
VVP24-UANIC
+38[067]4584408
+38[099]4060508
vla...@jabber.ru
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Run your own portsnap mirror?

2011-02-10 Thread Jason Helfman

On Thu, Feb 10, 2011 at 10:13:38PM +, RW thus spake:

On Thu, 10 Feb 2011 14:52:01 -0500
Lowell Gilbert  wrote:


patrick  writes:

> Is there any official way to run a private portsnap mirror? ie. Have
> one, external server fetch from the official portsnap sources, and
> then internal servers pulling from the private mirror?

It runs over pipelined HTTP, so all you need to do is set up a caching
HTTP proxy, and have your internal servers use that.


If you are going to do that then you need to set HTTP_PROXY
and/or http_proxy consistently. If either of these are set portsnap uses
them to to seed it's choice of server rather than a pure random
selection.

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



I would be highly interested in running my own internal portsnap mirror
based on an internal ports tree with local ports, as well.

Has anyone done this?

--
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Run your own portsnap mirror?

2011-02-10 Thread RW
On Thu, 10 Feb 2011 14:52:01 -0500
Lowell Gilbert  wrote:

> patrick  writes:
> 
> > Is there any official way to run a private portsnap mirror? ie. Have
> > one, external server fetch from the official portsnap sources, and
> > then internal servers pulling from the private mirror?
> 
> It runs over pipelined HTTP, so all you need to do is set up a caching
> HTTP proxy, and have your internal servers use that.

If you are going to do that then you need to set HTTP_PROXY
and/or http_proxy consistently. If either of these are set portsnap uses
them to to seed it's choice of server rather than a pure random
selection.

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


Re: Run your own portsnap mirror?

2011-02-10 Thread Rob Farmer
On Wed, Feb 9, 2011 at 2:56 PM, patrick  wrote:
> Is there any official way to run a private portsnap mirror? ie. Have
> one, external server fetch from the official portsnap sources, and
> then internal servers pulling from the private mirror?
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>

http://www.freebsd.org/cgi/cvsweb.cgi/projects/portsnap/

There is a note explaining why this might not be a good idea, though.

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


Re: Bad hard driver [SOLVED]

2011-02-10 Thread Michael Powell
Daniel Zhelev wrote:

[snip]
> 
> The last worrying thing is the
> 
>  200 Multi_Zone_Error_Rate   0x0008   200   189   000Old_age   Offline
>-   3
> 
> Which according to the Internet is some mysterious value that none knows
> what it stands for, so is 3 of that mystery good?
> 

Each cylinder track has a width. A head seek is nominally supposed to 
exactly center the head over the central axis. There is some slight 
tolerance as to accidental offset, but the maximum concentration of gaussian 
magnetic domain orientation should be concentrated in the center of each 
cylinder track.

Temperature changes between cold and 'steady state' operation cause very 
small changes in the size of mechanical moving parts. A little slop factor 
will happen when read/write happens while a drive is warming up from cold. 
As long as the number remains small and doesn't change often it's probably 
nothing to worry over. If it does change a lot constantly it may be an 
indicator of worn mechanical parts. Such a thing should correlate with a 
large value of power on hours. A drive near the end of it's life may get 
wobbly head syndrome. :-)

The main consideration in both questions is a small number that maybe 
increments every once in a blue moon is nothing to become overly concerned 
with. Rather consider them a long term baseline and only become alarmed when 
they show a rather sudden and large deviation in rate of change from the 
baseline. Generally when this occurs the numbers will change in fairly 
dramatic fashion quickly and generally continue this change from that point 
on. It is this pattern you look for as a possible "pre failure" warning.

-Mike
[snip]


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


Re: Run your own portsnap mirror?

2011-02-10 Thread Lowell Gilbert
patrick  writes:

> Is there any official way to run a private portsnap mirror? ie. Have
> one, external server fetch from the official portsnap sources, and
> then internal servers pulling from the private mirror?

It runs over pipelined HTTP, so all you need to do is set up a caching
HTTP proxy, and have your internal servers use that.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Portupgrade and "Updating the portsdb"

2011-02-10 Thread Eduardo
Try to move these files out of the way (all INDEX files and pkgdb.db)

/usr/ports/INDEX-*
/var/db/pkg/pkgdb.db

and run (it will take a while)

portsdb -Uu

as another option you can remove the files above and reinstall ruby
and ruby-bdb on those servers.

Are you running on version 7 or 8 ?  are you mounting the NFS rw ?


On Thu, Feb 10, 2011 at 11:33 AM, c0re  wrote:
> Hello all!
>
> I've got set of servers that uses NFS mounted /usr/ports. When I use
> "portupgrade samba" on 1st server it says
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument] [Updating the portsdb  in /usr/ports ... -
> 22601 port entries found  error] Remove and try again.
> [Updating the portsdb  in /usr/ports ... - 22601 port
> entries found 
> .1000.2000.3000.4000.5000.6000.7000.8000.9000.1.11000.12000.13000.14000.15000.16000.17000.18000.19000.2.21000.22000..
> . done]
>
> Okay. It took 10-15 mins to rebuild.
>
> Then I say "portupgrade samba" on 2nd server it says again
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument] [Updating the portsdb  in /usr/ports ... -
> 22601 port entries found  error] Remove and try again.
> and rebuild portsdb.
>
> Why is it so?
>
> Ports are updated via "portsnap fetch update".
>
> /etc/portsnap.conf has
> INDEX INDEX-5 DESCRIBE.5
> INDEX INDEX-6 DESCRIBE.6
> INDEX INDEX-7 DESCRIBE.7
> INDEX INDEX-8 DESCRIBE.8
>
> So while portupgrade rebuilds portsdb it's not possible use
> portupgrade on 2nd server because later build process will fail on 1st
> or second server.
>
> What can I do with it? Why portupgrade always thinks that
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument]?
>
> Thanks!!!
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Portupgrade and "Updating the portsdb"

2011-02-10 Thread Daniel Bye
On Thu, Feb 10, 2011 at 04:33:17PM +0300, c0re wrote:
> Hello all!
> 
> I've got set of servers that uses NFS mounted /usr/ports. When I use
> "portupgrade samba" on 1st server it says
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument] [Updating the portsdb  in /usr/ports ... -
> 22601 port entries found  error] Remove and try again.
> [Updating the portsdb  in /usr/ports ... - 22601 port
> entries found 
> .1000.2000.3000.4000.5000.6000.7000.8000.9000.1.11000.12000.13000.14000.15000.16000.17000.18000.19000.2.21000.22000..
> . done]
> 
> Okay. It took 10-15 mins to rebuild.
> 
> Then I say "portupgrade samba" on 2nd server it says again
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument] [Updating the portsdb  in /usr/ports ... -
> 22601 port entries found  error] Remove and try again.
> and rebuild portsdb.
> 
> Why is it so?
> 
> Ports are updated via "portsnap fetch update".
> 
> /etc/portsnap.conf has
> INDEX INDEX-5 DESCRIBE.5
> INDEX INDEX-6 DESCRIBE.6
> INDEX INDEX-7 DESCRIBE.7
> INDEX INDEX-8 DESCRIBE.8
> 
> So while portupgrade rebuilds portsdb it's not possible use
> portupgrade on 2nd server because later build process will fail on 1st
> or second server.
> 
> What can I do with it? Why portupgrade always thinks that
> [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
> argument]?

Are you using the same versions of ruby, portupgrade, ruby-bdb and bdb on
both machines?

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgp3ptuxyGw1i.pgp
Description: PGP signature


Re: VESA and SDL in tty terminal

2011-02-10 Thread Anonymous
David Demelier  writes:

> Hello,
>
> The SDL's pkg-message says we can use video driver in tty terminal.
>
>  To do this you have to load the vesa kernel module or enable it in your
>  kernel, and set environment variable "SDL_VIDEODRIVER=vgl".
>
> I tried it with mplayer :
>
> $ SDL_VIDEODRIVER=vgl; export SDL_VIDEODRIVER
> $ mplayer -vo sdl 
[...]
> [VO_SDL] Set_fullmode: SDL_SetVideoMode failed: Unable to switch to
> requested mode.

IIRC, vgl(3) mode setting unlike vidcontrol(8) doesn't work as regular user.
Try running mplayer under root, e.g.

  $ sudo mplayer -msgmodule -msglevel vo=9 -vo sdl 
  [...]
  DEMUX: VIDEO:  [avc1]  1280x720  24bpp  23.976 fps0.0 kbps ( 0.0 
kbyte/s)
   VIDEOOUT: SDL: Opening Plugin
   VIDEOOUT: [VO_SDL] Using driver: vgl.
   VIDEOOUT: X11 opening display: 
   VIDEOOUT: vo: couldn't open the X11 display ()!
  [...]
CPLAYER: Starting playback...
CPLAYER: Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
CPLAYER: VO: [sdl] 1280x720 => 1280x720 Planar YV12 
   VIDEOOUT: SDL: Using 0x32315659 (Planar YV12) image format
   VIDEOOUT: SDL: using hardware-surface
   VIDEOOUT: SDL: setting zoomed fullscreen with modeswitching
   VIDEOOUT: SDL Mode: 0:  1600 x 1200
   VIDEOOUT: SDL Mode: 1:  1280 x 1024
   VIDEOOUT: SDL Mode: 2:  1024 x 768
   VIDEOOUT: SDL Mode: 3:  800 x 600
   VIDEOOUT: SDL Mode: 4:  640 x 400
   VIDEOOUT: SDL Mode: 5:  640 x 480
   VIDEOOUT: SDL Mode: 6:  320 x 240
   VIDEOOUT: SDL Mode: 7:  320 x 400
   VIDEOOUT: SDL Mode: 8:  320 x 200
   VIDEOOUT: SET SDL Mode: 1:  1280 x 1024

In case your keymap doesn't work under vo_sdl(vgl) try below workaround

%%
Index: multimedia/mplayer/files/patch-vgl-xlate_keys
===
RCS file: multimedia/mplayer/files/patch-vgl-xlate_keys
diff -N multimedia/mplayer/files/patch-vgl-xlate_keys
--- /dev/null   1 Jan 1970 00:00:00 -
+++ multimedia/mplayer/files/patch-vgl-xlate_keys   10 Feb 2011 14:34:43 
-
@@ -0,0 +1,62 @@
+  use character codes for vgl driver
+
+--- configure~
 configure
+@@ -4579,6 +4579,19 @@ EOF
+   fi
+ fi
+ if test "$_sdl" = yes ; then
++  cat > $TMPC << EOF
++#ifdef CONFIG_SDL_SDL_H
++#include 
++#else
++#include 
++#endif
++int main(void) { SDL_VIDEO_DRIVER_VGL; return 0; }
++EOF
++  if cc_check -DCONFIG_SDL_SDL_H $_inc_tmp -lvgl || cc_check $_inc_tmp -lvgl 
; then
++_ld_tmp="$_ld_tmp -lvgl"
++  fi
++fi
++if test "$_sdl" = yes ; then
+   def_sdl='#define CONFIG_SDL 1'
+   extra_cflags="$extra_cflags $_inc_tmp"
+   libs_mplayer="$libs_mplayer $_ld_tmp"
+--- libvo/sdl_common.c~
 libvo/sdl_common.c
+@@ -27,6 +27,11 @@
+ #include "input/mouse.h"
+ #include "video_out.h"
+ 
++#ifdef SDL_VIDEO_DRIVER_VGL
++#include 
++#include 
++#endif
++
+ static int old_w;
+ static int old_h;
+ static int mode_flags;
+@@ -44,6 +49,9 @@ int vo_sdl_init(void)
+ SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, 100 
/*SDL_DEFAULT_REPEAT_INTERVAL*/);
+ 
+ // Easiest way to get uppercase characters
++#ifdef SDL_VIDEO_DRIVER_VGL
++VGLKeyboardInit(VGL_XLATEKEYS);
++#endif
+ SDL_EnableUNICODE(1);
+ 
+ // We don't want those in our event queue.
+@@ -56,8 +64,12 @@ int vo_sdl_init(void)
+ 
+ void vo_sdl_uninit(void)
+ {
+-if (SDL_WasInit(SDL_INIT_VIDEO))
++if (SDL_WasInit(SDL_INIT_VIDEO)) {
++#ifdef SDL_VIDEO_DRIVER_VGL
++VGLKeyboardInit(VGL_CODEKEYS);
++#endif
+ SDL_QuitSubSystem(SDL_INIT_VIDEO);
++}
+ }
+ 
+ void vo_sdl_fullscreen(void)
%%
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Portupgrade and "Updating the portsdb"

2011-02-10 Thread c0re
Hello all!

I've got set of servers that uses NFS mounted /usr/ports. When I use
"portupgrade samba" on 1st server it says
[/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
argument] [Updating the portsdb  in /usr/ports ... -
22601 port entries found  error] Remove and try again.
[Updating the portsdb  in /usr/ports ... - 22601 port
entries found 
.1000.2000.3000.4000.5000.6000.7000.8000.9000.1.11000.12000.13000.14000.15000.16000.17000.18000.19000.2.21000.22000..
. done]

Okay. It took 10-15 mins to rebuild.

Then I say "portupgrade samba" on 2nd server it says again
[/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
argument] [Updating the portsdb  in /usr/ports ... -
22601 port entries found  error] Remove and try again.
and rebuild portsdb.

Why is it so?

Ports are updated via "portsnap fetch update".

/etc/portsnap.conf has
INDEX INDEX-5 DESCRIBE.5
INDEX INDEX-6 DESCRIBE.6
INDEX INDEX-7 DESCRIBE.7
INDEX INDEX-8 DESCRIBE.8

So while portupgrade rebuilds portsdb it's not possible use
portupgrade on 2nd server because later build process will fail on 1st
or second server.

What can I do with it? Why portupgrade always thinks that
[/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid
argument]?

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


Re: Bad hard driver [SOLVED]

2011-02-10 Thread Bruce Cran
On Thu, 10 Feb 2011 11:59:37 +0200
Daniel Zhelev  wrote:

> The last worrying thing is the
> 
>  200 Multi_Zone_Error_Rate   0x0008   200   189   000Old_age
> Offline
>-   3
> 
> Which according to the Internet is some mysterious value that none
> knows what it stands for, so is 3 of that mystery good?

Look at the first 3 results from
http://www.google.co.uk/search?q=Multi+Zone+Error+Rate

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


Re: switching from gnu make to bsd make

2011-02-10 Thread J65nko
On Thu, Feb 10, 2011 at 8:32 AM, Vikash Badal  wrote:
> Can someone please advise me as to how I switch the following lines of gnu 
> make to bsd make
>
>
> $(OBJDIR)/%.o:${SRCDIR}/%.c
>        ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@
>

I use BSD make for XML and XSLT transformations, so I cannot advise
you about this particular issue, but there is a very nice tutorial
about the BSD make at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/pmake/index.html

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


Re: Bad hard driver [SOLVED]

2011-02-10 Thread Daniel Zhelev
On Wed, Feb 9, 2011 at 10:44 PM, Michael Powell wrote:

> Chuck Swiger wrote:
>
> > On Feb 9, 2011, at 11:15 AM, Daniel Zhelev wrote:
> >> The following warning/error was logged by the smartd daemon:
> >>
> >> Device: /dev/ad7, 3 Offline uncorrectable sectors
> >
> > It means that the drive has detected errors in three sectors, and is
> > attempting to recover them without data loss to spare sectors, so far
> > without success.  It could also indicate that the drive has exhausted the
> > spare sectors, in which case all future errors will cause additional data
> > loss.
>
> As long as the remap region is not full the next write attempt to these
> sectors will clear this. It can be done by dd'ing zero to the entire drive,
> or formatting the entire drive as a shotgun approach. This entails a
> complete backup and restore cycle though. A little extreme, as this
> particular error is actually rather benign and eventually self-correcting
> as
> long as there is space in the remap area.
>
> Early in a drive's life this may be tolerable until the remap fills. Even
> if
> the remap area has space available, and these errors get cleared by the
> next
> write to the defective sectors I would still watch for more of these. If
> you
> get these errors cleared only to start to see more new ones it indicates
> media failure spreading across the platters. At such a point in a drive's
> life it only makes sense to replace it, as at some point the remap region
> fills and you will have lost data.
>
> >>From the "SMART Self-test log", it seems like you are running short
> >>self-tests every 24 hours, and periodically running extended tests on
> some
> >>interval as well.  The smartctl FAQ recommends doing so at weekly
> >>intervals; doing it daily is putting significant testing load onto the
> >>drive.
> >
> >> I know about the how to -
> >> http://smartmontools.sourceforge.net/badblockhowto.html
> >>
> >> But how can I get the LBA?
> >> And is there some diagnostic tool for WD in ports?
> >
> > Doing a "dd if=/dev/ad7 of=/dev/null bs=64k" will read-scan the entire
> > drive, and ought to produce a warning in the logs indicating the LBA of
> > the bad sectors.  As for diagnostic tools, WD makes utilities for DOS and
> > Windows, not FreeBSD.  See:
> >
> >   http://support.wdc.com/product/download.asp?groupid=613&lang=en
> >
> > ...for something which you can run off of a boot floppy, USB pendrive,
> > etc.
>
> The quick test will tell you about bad sectors and then direct you to run
> the full surface scan which destroys data. But it will "fix" the drive.
> Back
> to the dump/restore cycle. I run this on any used drive about to recycled
> back into use. It almost always finds something and "fixes" it.
>
> Excellent idea on how to find the LBA. If the exact sector addresses can be
> located a dd write to the specific sector(s) will clear the error
> condition,
> and should (in theory) be doable without losing data. I would still
> recommend an entire dump backup be done prior to trying anything.
>
> -Mike
>
>
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>

Thanks all for the info,

I`ve fix it with the shotgun methood

dd if=/dev/zero of=/dev/ad7 bs=64k

Since the drive is new ( >6 moths ) I won`t go trough the warranty procedure
yet .
The strange this is that the

  5 Reallocated_Sector_Ct   0x0033   200   200   140Pre-fail  Always
  -   0

Has not changed, so the sectors were good?
Also I`ve noticed that these sectors were in the end of the disk - the disk
is 932GB usable space after fs installation usable space is around 900GB the
bad sectors were beyond the usable space.
Also fsck didn`t detect any fs corruption.

The last worrying thing is the

 200 Multi_Zone_Error_Rate   0x0008   200   189   000Old_age   Offline
   -   3

Which according to the Internet is some mysterious value that none knows
what it stands for, so is 3 of that mystery good?

//offtopic Spinrite  is very good tool hopefully I didn`t have to use it
this time, but it is really useful. In mine situation the drive failure is
not so critical(some temporary dumps on it), but if the hole machine is
down(this is the only not mirrored disk) it would be much worse.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: switching from gnu make to bsd make

2011-02-10 Thread Vikash Badal
> -Original Message-
> From: Polytropon [mailto:free...@edvax.de]
> Sent: 10 February 2011 10:11 AM
> To: Vikash Badal
> Cc: freebsd-questions@freebsd.org
> Subject: Re: switching from gnu make to bsd make
> 
> Of course, in my testing case OBJDIR and SRCDIR are
> empty, and I didn't define any of CC, CFLAGS, INCDIR or
> LIBDIR, so the defaults have been chosen.
> 
> Do you encounter a specific problem?

This is my problem:

vix:$ make
make: don't know how to make src/%.c. Stop


this is my make file:

--

CC= cc
LIBS  = -lpthread -lmysqlclient_r
CFLAGS= -Wall -g
INCDIR= -Iinclude -I/usr/local/include -I/usr/local/include/mysql
LIBDIR= -L/usr/local/lib -L/usr/local/lib/mysql
OBJDIR= obj
SRCDIR= src
BINDIR= bin
PREFIX= /usr/local/nntpd
BINDIRFILES   = ${BINDIR}/nntpd
OBJS  = ${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \
${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o ${OBJDIR}/nntp.o \
${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o ${OBJDIR}/sqlpool.o \
${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o ${OBJDIR}/daemon.o \
${OBJDIR}/list.o ${OBJDIR}/tcpserver.o ${OBJDIR}/tmpfiles.o \
${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
${OBJDIR}/nntpd.o

$(OBJDIR)/%.o:${SRCDIR}/%.c
${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@

all:${OBJS}
${CC} -o ${BINDIR}/nntpd ${LIBS} ${CFLAGS} ${INCDIR} ${LIBDIR} \
${OBJDIR}/log.o ${OBJDIR}/cleanup.o ${OBJDIR}/config.o \
${OBJDIR}/leecherpool.o ${OBJDIR}/mytime.o ${OBJDIR}/nntp.o \
${OBJDIR}/upstream.o ${OBJDIR}/mysleep.o ${OBJDIR}/sqlpool.o \
${OBJDIR}/sql.o ${OBJDIR}/signalhandler.o ${OBJDIR}/daemon.o \
${OBJDIR}/list.o ${OBJDIR}/tcpserver.o ${OBJDIR}/tmpfiles.o \
${OBJDIR}/listenpool.o ${OBJDIR}/workers.o \
${OBJDIR}/nntpd.o

--
> 
> 
> 
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
Please note: This email and its content are subject to the disclaimer as 
displayed at the following link 
http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm. 
Should you not have Web access, send a mail to disclaim...@is.co.za and a copy 
will be emailed to you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: switching from gnu make to bsd make

2011-02-10 Thread Polytropon
On Thu, 10 Feb 2011 09:32:06 +0200, Vikash Badal  wrote:
> Can someone please advise me as to how I switch the following lines of gnu 
> make to bsd make
> 
> 
> $(OBJDIR)/%.o:${SRCDIR}/%.c
> ${CC} -c ${CFLAGS} ${INCDIR} ${LIBDIR} $< -o $@

It sems to work with BSD make, I've tried it.

% make foo
... starts compiling foo.c ...

The only thing I would change is the order of the last
arguments, which should be "-o $@ $<" (input files last),
and a space after ":" in the first line (for better
reading). Anyway, it seems to be compatible.

Of course, in my testing case OBJDIR and SRCDIR are
empty, and I didn't define any of CC, CFLAGS, INCDIR or
LIBDIR, so the defaults have been chosen.

Do you encounter a specific problem?



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