Re: scalable FreeBSD based LNS (with L2TPv2)

2009-10-20 Thread Matthew Seaman

Vincent Hoffman wrote:

Rogelio wrote:

Has anyone created/used/found/seen a FreeBSD based LNS that supports
thousands L2TPv2 tunnels?  Right now, the only solution I see that scales to
this level is Redback, and if not a Redback box, then lots of Cisco 7200
boxes.

  

I understand MPD (ports/net/mpd5) is used in large scale deployments.
I've only ever used it as a proof of concept though, (for which it
worked great, sadly they went for a pair of 7200s instead.)


It's Linux based, rather than FreeBSD  (and it is tuned for the way
things are in the UK) but check out http://www.firebrick.co.uk/products_6000.php

Cheers,

Matthew

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



signature.asc
Description: OpenPGP digital signature


Re: Mouse and keyboard don't work in Xorg 7.4

2009-10-20 Thread Ondřej Majerech
2009/10/20 Polytropon :
>
>> Mouse and keyboard works without it too.
>
> I just re-read the chapters on X in the handbook. Setting
> a specific keyboard language (german in my case) now involves
> messing with XML in the HAL configuration.
>
> I'm just keen to know where I now have to set my mouse in
> order to work properly. It's a three-button mouse from Sun.
>
> In the past, all X settings (resolution, mouse, keyboard,
> fonts etc.) could be controlled via one centralized file.
> Sadly, this seems to be scattered among many subsystems
> now...

You can still do it this way -- just disable HAL device autodetection
and everything works as usual.  I also have keyboard layouts set up in
my xorg.conf file.  In fact, I'd be willing to bet that your current
xorg.conf will work on a newer X.org version, if you just add the line
to disable HAL autodetection.

~ Ondra M.
___
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: PHP5 + fastcgi + apache2.2 ... how to for FreeBSD?

2009-10-20 Thread Johan Hendriks

Install from ports lang/php5

do NOT build the apache module (checkbox number 3)
│[ ] APACHE Build Apache module

Then install from ports www/mod_fcgid


Create a file in /usr/local/etc/apache22/Includes   (if you have apache22) else 
use the dir from your apache version.

Name it something like fcgi.conf

Put the following in there.

LoadModule fcgid_module libexec/apache22/mod_fcgid.so


AddHandler  fcgid-script .fcgi
Action  application/x-httpd-php /cgi-bin/php5.fcgi
AddHandler  application/x-httpd-php .php


DirectoryIndex index.html index.php


Now create a file in /usr/local/www/apache22/cgi-bin
Call this one php5.fcgi
make it executable: chmod ug+x /usr/local/www/apache22/cgi-bin/php5.fcgi
give it the right user and group: chmod www:www 
/usr/local/www/apache22/cgi-bin/php5.fcgi

In this file put the following
#!/bin/sh
PHPRC="/usr/local/etc"
export PHPRC
#PHP_FCGI_CHILDREN=4
#export PHP_FCGI_CHILDREN
#PHP_FCGI_MAX_REQUESTS=5000
#export PHP_FCGI_MAX_REQUESTS
exec /usr/local/bin/php-cgi

I comment some things out, try for yourself if these works.
This should be it in great line.

Succes.
regards,
Johan Hendriks







-Oorspronkelijk bericht-
Van: owner-freebsd-questi...@freebsd.org 
[mailto:owner-freebsd-questi...@freebsd.org] Namens Marc G. Fournier
Verzonden: dinsdag 20 oktober 2009 0:22
Aan: freebsd-questions@freebsd.org
Onderwerp: PHP5 + fastcgi + apache2.2 ... how to for FreeBSD?


Is there one somewhere?  I'm finding *alot* of Debian ones dealing with 
their whole apget stuff, but would like to find something that "speaks 
normally" :)

Thx ...


Marc G. FournierHub.Org Hosting Solutions S.A.
scra...@hub.org http://www.hub.org

Yahoo:yscrappySkype: hub.orgICQ:7615664MSN:scra...@hub.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"

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.422 / Virus Database: 270.14.20/2444 - Release Date: 10/18/09 
09:04:00

No virus found in this outgoing message.
Checked by AVG - www.avg.com 
Version: 8.5.422 / Virus Database: 270.14.20/2444 - Release Date: 10/18/09 
09:04:00
___
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: Error when changin from -ro to rw on /etc/exports, FREEBSD STABLE 7.2

2009-10-20 Thread Jeronimo Calvo
I'm wondering if that /etc/exports format will work:

/DATA1   192.168.11.6(rw)
/DATA2   192.168.11.6(rw)

or needs to be like this?

> [root@ /DATA1]# cat /etc/exports
> /DATA1  -rw 192.168.11.6
> /DATA2  -rw 192.168.11.6




2009/10/19 Jeronimo Calvo :
> Hi folks,
>
> Today I decide to change the settings from my server, allowing RW
> access to 2 currently mapped NFS partions on my Freebsd box.
> The used to be RO only.
>
> What i notice is when I change it as follows:
>
> [root@ /DATA1]# cat /etc/exports
> /DATA1  -rw 192.168.11.6
> /DATA2  -rw 192.168.11.6
>
>
> I am not able to map them anymore from my opensolaris client.
> When changing back to RO, it maps correctly.
>
> All permissions are set un as 755 -R on /DATA1 and /DATA2
>
> When on RO, it maps when requested via AutoFS perfectly:
>
> /net/192.168.11.5/DATA1 on 192.168.11.5:/DATA1
> remote/read/write/nosetuid/nodevices/xattr/dev=4ec0007 on Mon Oct 19
> 23:09:45 2009
> /net/192.168.11.5/DATA2 on 192.168.11.5:/DATA2
> remote/read/write/nosetuid/nodevices/xattr/dev=4ec0008 on Mon Oct 19
> 23:09:46 2009
>
> Any ideas? im sure im mistaking somewhere... :S
>
> --
> () ASCII Ribbon Campaign | Against HTML e-mail
> /\  www.asciiribbon.org  | Against proprietary extensions
>



-- 
() ASCII Ribbon Campaign | Against HTML e-mail
/\  www.asciiribbon.org  | Against proprietary extensions
___
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: ZFS: Strange performance issues

2009-10-20 Thread Christopher Key
Carl Chave wrote:
> relatively idle. You can request a more accurate view of current
> bandwidth usage by specifying
> an interval.

Thanks Carl,

I was aware of the option, the posted stats were from:

# zpool iostat -v 10

with the 10s period wholly within the ~40s transfer time.

King regards,

Chris
___
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: glabel clarification

2009-10-20 Thread PJ
Polytropon wrote:
> On Mon, 19 Oct 2009 13:12:06 -0400, PJ  wrote:
>   
>> this is ad12; ad6 is the same - I guess I hae to get rid of those labels
>> in ad6 but am not sure if I need to use glabel to remove them or if just
>> editing fstab will do it?
>> 
>
> You could indicate if a given disk is your working disk (w)
> or your backup disk (b). A possible fstab would look like
> this:
>
> The working disk:
>   /dev/label/w-swap none  swap  sw  0  0
>   /dev/label/w-rootfs   / ufs   rw  1  1
>   /dev/label/w-tmp  /tmp  ufs   rw  2  2
>   /dev/label/w-var  /var  ufs   rw  2  2
>   /dev/label/w-usr  /usr  ufs   rw  2  2
>   /dev/label/w-home /home ufs   rw  2  2
>   /dev/label/w-backups  /backups  ufs   rw  2  2
>
> The backup disk:
>   /dev/label/b-swap none  swap  sw  0  0
>   /dev/label/b-rootfs   / ufs   rw  1  1
>   /dev/label/b-tmp  /tmp  ufs   rw  2  2
>   /dev/label/b-var  /var  ufs   rw  2  2
>   /dev/label/b-usr  /usr  ufs   rw  2  2
>   /dev/label/b-home /home ufs   rw  2  2
>   /dev/label/b-backups  /backups  ufs   rw  2  2
>
> (Note that I sorted the partitions by "usage priority".)
>
> The downside is that you would have to keep a difference
> between /etc/fstab(w) and /etc/fstab(b). On its own, each
> disk will work on any controller (because of proper labels).
>
> Funny question: What happens if a system has access to
> two disks with labelled partitions where the labels are
> identical?
>   
Exactly what is happening on my system. That's basically what has been
troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6...
well, everytime I boot from ad6 the boot is from ad12 because both have
identical labels. The only way out is to change the labels on ad6 to
point to ad6 partitions and not to /dev/label/name.
So the only reason to use glabel, in my case, is to boot from the clone
on another system without worrying about the actual disk label. Once
it's booted, the label can be changed to conform to the label on the new
system.
___
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"


where are Bulgarian FTP mirrors?

2009-10-20 Thread Cyrille Vladimirov
Guys!

Today I decided to use Bulgarian FTP mirror for couple odf installations
of FreeBSD and wondered that both of them ( ftp.bg.freebsd.org and
ftp2.bg.freebsd.org) missed. I checked out I wondered once more that
there isn't such of domain "bg.freebsd.org"
I have had to use other mirror for my installations
Is this something temporary or these mirrors have removed from the list
With best regards,

Cyrille Vladimirov
___
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: Write attempt to file in ZFS snapshot dir causes panic

2009-10-20 Thread krad
2009/10/19 Carl Chave 

> I'm new to FreeBSD.  Been experimenting with 8.0-RC1 and zfs in a VM.
> Really haven't even installed it yet, just getting familiar with zfs
> usage from the fixit environment.  I experienced some strange behavior
> and was wondering if this would warrant a bug report:
>
> 1. load zfs from bootloader prompt and then boot.
> 2. enter fixit environment.
> 3. import zpool (in this case a 2 disk vmware mirror named sodpool)
> 4. cd to previously created snapshot at sodpool/test/myfs/.zfs/snapshot/one
> 5. attempting to create a new file here results in:
>
> Fixit# echo hello > hello.txt
> cannot create hello.txt: Read-only file system
>
> 6. That seems like the desired response.  Next, attempt to modify a
> file that already exists in the snapshot:
>
> Fixit# echo hello >> test.txt
> panic: dirtying snapshot!
>
> I know I'm not supposed to be modifying a snapshot file, but a panic
> doesn't seem like the best response to this situation.
>
> I'm using DVD iso named 8.0-RC1-amd64-dvd1.iso
>
> This bug report has the same panic but the scenario is different:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/138764
>
> Is there someplace else I should check for existing issues?
> ___
> 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 dont see these issues

$ echo i > o
bash: o: Read-only file system
$ pwd
/usr/local/.zfs/snapshot/20090816
$ echo i >> o
bash: o: Read-only file system
$ uname -a
FreeBSD X 8.0-RC1 FreeBSD 8.0-RC1 #71: Sun Oct 18 07:05:25 BST 2009
r...@x:/usr/obj/usr/src/sys/me  amd64
___
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: scalable FreeBSD based LNS (with L2TPv2)

2009-10-20 Thread Rogelio
Vince and Matthew, thanks to both of you.

Vince, I found MD5 and am still looking for whether or not it supports
L2TPv2 (gotta have that older version, not any v3)

Matthew, I put in an inquiry to Firebrick, as well.

cheers!

Rogelio

-- Also on LinkedIn?  Feel free to add me as a friend: scubac...@gmail.com
___
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: Write attempt to file in ZFS snapshot dir causes panic

2009-10-20 Thread krad
2009/10/20 Carl Chave 

> Does file o exist?  In my example I first try to create a new file
> which fails as expected.  I then try to append to an existing file
> which triggers the panic.
>
> On Tue, Oct 20, 2009 at 6:17 AM, krad  wrote:
> >
> >
> > 2009/10/19 Carl Chave 
> >>
> >> I'm new to FreeBSD.  Been experimenting with 8.0-RC1 and zfs in a VM.
> >> Really haven't even installed it yet, just getting familiar with zfs
> >> usage from the fixit environment.  I experienced some strange behavior
> >> and was wondering if this would warrant a bug report:
> >>
> >> 1. load zfs from bootloader prompt and then boot.
> >> 2. enter fixit environment.
> >> 3. import zpool (in this case a 2 disk vmware mirror named sodpool)
> >> 4. cd to previously created snapshot at
> >> sodpool/test/myfs/.zfs/snapshot/one
> >> 5. attempting to create a new file here results in:
> >>
> >> Fixit# echo hello > hello.txt
> >> cannot create hello.txt: Read-only file system
> >>
> >> 6. That seems like the desired response.  Next, attempt to modify a
> >> file that already exists in the snapshot:
> >>
> >> Fixit# echo hello >> test.txt
> >> panic: dirtying snapshot!
> >>
> >> I know I'm not supposed to be modifying a snapshot file, but a panic
> >> doesn't seem like the best response to this situation.
> >>
> >> I'm using DVD iso named 8.0-RC1-amd64-dvd1.iso
> >>
> >> This bug report has the same panic but the scenario is different:
> >> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/138764
> >>
> >> Is there someplace else I should check for existing issues?
> >> ___
> >> 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 dont see these issues
> >
> > $ echo i > o
> > bash: o: Read-only file system
> > $ pwd
> > /usr/local/.zfs/snapshot/20090816
> > $ echo i >> o
> > bash: o: Read-only file system
> > $ uname -a
> > FreeBSD X 8.0-RC1 FreeBSD 8.0-RC1 #71: Sun Oct 18 07:05:25 BST 2009
> > r...@x:/usr/obj/usr/src/sys/me  amd64
> >
> >
>


ah whops it does panic my box 8(

its fine on opensolaris though so is a bsdism

$ pwd
/vms/windows_update/.zfs/
snapshot/zfs-auto-snap:hourly-2009-07-29-21:00/tmc-vmx
$ ls -l Windows\ XP\ Professional-s004
-rwxrwx--- 1 cscott staff 2145976320 2009-06-19 11:23 Windows XP
Professional-s004
$ echo oo >> Windows\ XP\ Professional-s004
bash: Windows XP Professional-s004: Read-only file system
 $ uname -a
SunOS cscott-desktop2 5.11 snv_111b i86pc i386 i86pc Solaris
___
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: glabel clarification

2009-10-20 Thread Polytropon
On Tue, 20 Oct 2009 05:57:53 -0400, PJ  wrote:
> Exactly what is happening on my system. That's basically what has been
> troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6...
> well, everytime I boot from ad6 the boot is from ad12 because both have
> identical labels. The only way out is to change the labels on ad6 to
> point to ad6 partitions and not to /dev/label/name.

That is a solution for the case that you want to keep both
disks running in the system. If you just want to make one
disk (b) available in order to swap it when the master disk
fails (w), then labels are fine.

I'm not sure what your main purpose of cloning the disks
was. Two options:
a) keep two disks in sync, so you can use your
   backup disk when the working disk fails and
   needs to be extracted
b) make a clone of your working disk so it can
   be placed into another system



> So the only reason to use glabel, in my case, is to boot from the clone
> on another system without worrying about the actual disk label. Once
> it's booted, the label can be changed to conform to the label on the new
> system.

The label doesn't need to be changed when the disk in question
is placed into another system. Labels work independent from
the different settings you might find in different computers,
such as different device names (due to different position on
the controller).




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


hplip problem on 8.0 (Re: "All in one" printer?)

2009-10-20 Thread Patrick Lamaiziere
Le Fri, 16 Oct 2009 22:24:20 +0200,
Patrick Lamaiziere  a écrit :

> > Thanks guys, so I bought today a HP PhotoSmart C4680 "all in one".
> > 
> > It mostly works fine (printing and scanning) out of the box.
> 
> Hmmm, in fact no. There are some problems on printing (missing part).

That was because a small bug in the new libusb on 8.0, fixed.
see : http://www.mail-archive.com/freebsd-...@freebsd.org/msg05811.html

It works fine now.
___
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: PHP5 + fastcgi + apache2.2 ... how to for FreeBSD?

2009-10-20 Thread Michael Powell
Marc G. Fournier wrote:

> 
> Is there one somewhere?  I'm finding *alot* of Debian ones dealing with
> their whole apget stuff, but would like to find something that "speaks
> normally" :)
> 
[snip]

Install your choice of flavor of Apache. Me, I'm using the event-mpm for 
testing to verify the way to use non-thread safe PHP with a threaded server 
is FastCGI.


Install lang/php5 with various CLI options, as opposed to and instead of 
mod_php. This is set of options I used:

# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for php5-5.2.11
_OPTIONS_READ=php5-5.2.11
WITH_CLI=true
WITH_CGI=true
WITHOUT_APACHE=true
WITHOUT_DEBUG=true
WITH_SUHOSIN=true
WITH_MULTIBYTE=true
WITHOUT_IPV6=true
WITHOUT_MAILHEAD=true
WITH_REDIRECT=true
WITH_DISCARD=true
WITH_FASTCGI=true
WITH_PATHINFO=true

Do not try and use MAILHEAD and SUHOSIN together; that combination is 
broken. Install the /lang/php5-extensions you require. Currently there seems 
to be a problem with extension=sqlite.so, and since I don't use/need it's 
commented out of my extensions.ini.


Install www/mod_fcgid from ports. In httpd.conf use:

LoadModule fcgid_module libexec/apache22/mod_fcgid.so

instead of the usual:

LoadModule php5_modulelibexec/apache22/libphp5.so


Also, further down in httpd.conf:

[...]
# This should be changed to whatever you set DocumentRoot to.
#


[...]



# added to enable mod_fcgid


  AddHandler fcgid-script .fcgi .php
  SocketPath /var/run/fcgidsock/
  IPCConnectTimeout 10
  IPCCommTimeout 20
  OutputBufferSize 0



#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

DirectoryIndex index.html index.php

[...]


If all went well you should be able to restart Apache and be in business. A 
phpinfo(); should execute and provide details. Any problems the quickest way 
to check PHP is to just execute php -v at a shell prompt. If it doesn't 
segfault it will print out a short descriptive output text.

I believe this is better than the usual script based approach you will 
locate on the web. It starts/spawns PHP as a long running process when 
Apache starts instead of starting a new CGI each time PHP script is 
executed. 

The mod_fcgid is configurable:

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

I believe this project was fairly recently folded into the Apache.org 
umbrella, but when I began it was separate and standalone. The docs on the 
Apache site look like they are for the upcoming 2.3 update to 2.2, and there 
may be discrepancies present. I had originally used the docs from the old 
site and I don't know if they are even still available.

-Mike


P.S. - Also, if you need to use Alias they will look like this:

Alias   /xcache-admin   "/usr/local/share/examples/xcache/admin/"

#SetHandler None
FCGIWrapper /usr/local/bin/php-cgi .php
Options ExecCGI
Order allow,deny
Allow from 192.168.10.2
Deny from none





___
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: Fwd: upgrading remote server

2009-10-20 Thread Artifex Maximus
Hello!

On Mon, Oct 19, 2009 at 11:29 PM, John Almberg  wrote:

> Okay! After a lot of googling/reading I successfully upgraded to 7.2, now
> I'm trying to upgrade ports...
>
> I ran portmaster -L and got a long list of ports that need upgrading...
> From my reading, it seems like the only way to do this is to go through the
> list, one by one, and either (1) delete unused ports or (2) upgrade ports
> that seem to need it.
>
> This is going to take quite a bit of time... am I missing something (other
> than the fact that I should have been doing this all along?)
>
>

That is a time consuming process indeed. Don't forget this is a major
version update. You must upgrade all ports because there is possibly some
change in library versions, API or any other part of system. Might use:

portmaster -a -f

which direct portmaster to process all ports and force rebuild of all ports.
And again read /usr/src/UPGRADING and /usr/ports/UPGRADE for more
information.

Bye,
a
___
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"


Invitation to connect on LinkedIn

2009-10-20 Thread lokesh bevara
LinkedIn


lokesh bevara requested to add you as a connection on LinkedIn:
--

Jerry,

I'd like to add you to my professional network on LinkedIn.

- lokesh

Accept invitation from lokesh bevara
http://www.linkedin.com/e/1o3bCy0npDqyzD3wjrAbLV0nLmqMr8R-MulSGyDnb3nr/blk/I1518943135_2/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_cBYRcP4Pd3AUcjkNiiZTpDwNq6ITiyYTejAPdPATc3wLrCBxbOYWrSlI/EML_comm_afe/

View invitation from lokesh bevara
http://www.linkedin.com/e/1o3bCy0npDqyzD3wjrAbLV0nLmqMr8R-MulSGyDnb3nr/blk/I1518943135_2/39vdjcNcPgVe34RckALqnpPbOYWrSlI/svi/

--

Why might connecting with lokesh bevara be a good idea?

People lokesh bevara knows can discover your profile:
Connecting to lokesh bevara will attract the attention of LinkedIn users. See 
who's been viewing your profile:

http://www.linkedin.com/e/wvp/inv18_wvmp/

 
--
(c) 2009, LinkedIn Corporation

___
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: FreeBSD 7.2 savecore panic

2009-10-20 Thread Patrick Lamaiziere
Le Mon, 19 Oct 2009 14:53:27 -0700,
Bogdan Webb  a écrit :

Hello,

> What's wrong with my bsd box (witch i'm in love so much now) and how
> can i prevent it from panicking

No one will be able to answer without a dump of the panic.
Please see
http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-gdb.html
to know how to extract useful informations from the saved core-dump.

Regards.
___
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"


cross-link serial console

2009-10-20 Thread Frederique Rijsdijk
If I have 2 machines, could I connect the machines to each other via
serial cable, in order to be able to reach each others' console in case
of out of band issues?

I know how to config it, I was just wondering if it would not bite each
other.


-- FR

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


xscreensaver 'core' files

2009-10-20 Thread carmel_ny
I have been getting a couple of dozen core dumps with xscreensaver
(xscreensaver-gl-hel.core) daily. The screen saver seems to be working
correctly, however. It is being run under FreeBSD-7.2 and Xfce 4
Desktop Environment version 4.6.1 (Xfce 4.6).

What, if anything, should I do in regards to this?

-- 
Carmel_NY
carmel...@hotmail.com

I went to a Grateful Dead Concert and they played for SEVEN hours.
Great song.

Fred Reuss
___
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: need C help, passing char buffer[] by-value....

2009-10-20 Thread David Kelly
On Tue, Oct 20, 2009 at 05:08:40AM +0200, Polytropon wrote:
> On Mon, 19 Oct 2009 08:58:05 -0500, David Kelly  wrote:
> > On Mon, Oct 19, 2009 at 05:43:44AM +0200, Polytropon wrote:
> > > to make sure s is not NULL, or testing for it explicitely like
> > > 
> > >   if(!s)
> > >   ... error handling here ...
> > 
> > You are missing my point that *s == 0 is not a good out of bounds
> > range check.
> 
> That's correct. Test != NULL just ensures that it is not a NULL
> pointer. Range checking should always be applied additionally.

Polytropon's "if(!s)" is testing for null pointer and thats a useful
test, but I'm testing for a pointer to a null which is something else.

Access through a null pointer should result in a memory violation core
dump.

-- 
David Kelly N4HHE, dke...@hiwaay.net

Whom computers would destroy, they must first drive mad.
___
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: need C help, passing char buffer[] by-value....

2009-10-20 Thread David Kelly
On Tue, Oct 20, 2009 at 05:42:41AM +0200, Polytropon wrote:
> Just a little and quite formal side note:
> 
> On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan  wrote:
> >while (*tp != '\0' && *tp++ != '<');
> 
> It's often a good choice, especially for increasing readability
> of code, to code the "empty statement" on a line on its own (as
> you usually put any statements on an own line for clarity), so
> the reader doesn't accidentally take it as and "end of command"
> notification, e. g.
> 
>   while(1)
>   ;
> 
> instead of
> 
>   while(1);

Agreed. I did exactly this in a code sample posted earlier in this
thread.

-- 
David Kelly N4HHE, dke...@hiwaay.net

Whom computers would destroy, they must first drive mad.
___
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: cross-link serial console

2009-10-20 Thread Gary Gatten
Ahh  A Null modem cable?  Or, perhaps BSD will allow you to
configure the serial interface in the software - make one end a DCE type
and the other by default will remain a DTE.

-Original Message-
From: owner-freebsd-questi...@freebsd.org
[mailto:owner-freebsd-questi...@freebsd.org] On Behalf Of Frederique
Rijsdijk
Sent: Tuesday, October 20, 2009 9:06 AM
To: FreeBSD-Questions
Subject: cross-link serial console

If I have 2 machines, could I connect the machines to each other via
serial cable, in order to be able to reach each others' console in case
of out of band issues?

I know how to config it, I was just wondering if it would not bite each
other.


-- FR

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








"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."


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


/tmp on mfs

2009-10-20 Thread Christopher Hilton
Reading the list yesterday I came across a little controversy about  
swap backed /tmp filesystems. I've been using this in my /etc/rc.conf


tmpmfs="YES"# Set to YES to always create an mfs /tmp, NO  
to never

tmpsize="1g"# Size of mfs /tmp if created
tmpmfs_flags="-S -o async,noexec"   # Extra mdmfs options for the  
mfs /tmp


To mount /tmp on a swap backed filesystem. I've been assuming that  
data stored in the /tmp directory was held in RAM and then written to  
the swap space only when the system had a more pressing need for the  
RAM. I typically configure my systems with swap == 2 * RAM or more.  
And on the systems in question I have at least 1Gb of RAM. I was  
hoping to  use this trick to enhance the performance of the postgresql  
database (temp_tablespace=/tmp/pgsql/) Is my assumption about  
where the data in a temporary file is stored incorrect?


-- Chris
___
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: glabel clarification

2009-10-20 Thread michael

Polytropon wrote:

On Tue, 20 Oct 2009 05:57:53 -0400, PJ  wrote:
  

Exactly what is happening on my system. That's basically what has been
troubling me. I cloned ad12 to ad6 and then wanted to boot from ad6...
well, everytime I boot from ad6 the boot is from ad12 because both have
identical labels. The only way out is to change the labels on ad6 to
point to ad6 partitions and not to /dev/label/name.



That is a solution for the case that you want to keep both
disks running in the system. If you just want to make one
disk (b) available in order to swap it when the master disk
fails (w), then labels are fine.

I'm not sure what your main purpose of cloning the disks
was. Two options:
a) keep two disks in sync, so you can use your
   backup disk when the working disk fails and
   needs to be extracted
b) make a clone of your working disk so it can
   be placed into another system



  

So the only reason to use glabel, in my case, is to boot from the clone
on another system without worrying about the actual disk label. Once
it's booted, the label can be changed to conform to the label on the new
system.



The label doesn't need to be changed when the disk in question
is placed into another system. Labels work independent from
the different settings you might find in different computers,
such as different device names (due to different position on
the controller).



  

LONGEST glabel discussion ever.
___
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"


phpscheduleit not allowing login

2009-10-20 Thread Noah

Hi there,

I just installed 1.2.11 and running apache
I get the Log in screen and I am able to register.
As soon as I enter my account information at the main Login page i am 
sent right back to the page and the error message is "You are not logged 
in!"


Nothing is appearing in the log eventhough I have it configured:

--- snip ---

// If we should log system activity or not

*

$conf['app']['use_log'] = 1;
// Directory/file for log ['/var/log/phpscheduleitlog.txt']
$conf['app']['logfile'] = '/var/log/phpscheduleitlog.txt';

--- snip ---

What else can I try here?

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


Display TSV files with columns aligned

2009-10-20 Thread Tom Worster

is there a cli command that lays out tsv files for display with a fixed width
font?

that is, it figures how wide each column needs to be and pads each field in
the file with a suitable about of space?

tom
-- 
View this message in context: 
http://www.nabble.com/Display-TSV-files-with-columns-aligned-tp25979622p25979622.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
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: Display TSV files with columns aligned

2009-10-20 Thread Dan Nelson
In the last episode (Oct 20), Tom Worster said:
> is there a cli command that lays out tsv files for display with a fixed
> width font?
> 
> that is, it figures how wide each column needs to be and pads each field
> in the file with a suitable about of space?

The "rs" command should do what you want, if you can figure out the correct
commandline options.  It's not easy, though...

-- 
Dan Nelson
dnel...@allantgroup.com
___
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: /tmp on mfs

2009-10-20 Thread Vincent Hoffman
Christopher Hilton wrote:
> Reading the list yesterday I came across a little controversy about
> swap backed /tmp filesystems. I've been using this in my /etc/rc.conf
>
> tmpmfs="YES"# Set to YES to always create an mfs /tmp, NO
> to never
> tmpsize="1g"# Size of mfs /tmp if created
> tmpmfs_flags="-S -o async,noexec"   # Extra mdmfs options for the
> mfs /tmp
>
> To mount /tmp on a swap backed filesystem. I've been assuming that
> data stored in the /tmp directory was held in RAM and then written to
> the swap space only when the system had a more pressing need for the
> RAM. I typically configure my systems with swap == 2 * RAM or more.
> And on the systems in question I have at least 1Gb of RAM. I was
> hoping to  use this trick to enhance the performance of the postgresql
> database (temp_tablespace=/tmp/pgsql/) Is my assumption about
> where the data in a temporary file is stored incorrect?
>
Thats certainly always been my interpretation of the manpage.
  "Storage for this type of memory disk is allocated
from
  buffer memory.  Pages get pushed out to the swap when
  the system is under memory pressure, otherwise
they stay
  in the operating memory."

If thats not the case I'd be interested to know how it does work.

Vince
> -- Chris
> ___
> 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: phpscheduleit not allowing login

2009-10-20 Thread Brent Bloxam

Noah wrote:

Hi there,

I just installed 1.2.11 and running apache
I get the Log in screen and I am able to register.
As soon as I enter my account information at the main Login page i am 
sent right back to the page and the error message is "You are not logged 
in!"


Nothing is appearing in the log eventhough I have it configured:

--- snip ---

// If we should log system activity or not

*

$conf['app']['use_log'] = 1;
// Directory/file for log ['/var/log/phpscheduleitlog.txt']
$conf['app']['logfile'] = '/var/log/phpscheduleitlog.txt';

--- snip ---

What else can I try here?

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


Hi Noah,

This is the FreeBSD questions mailing list, perhaps you should try their 
forums for support: http://www.php.brickhost.com/forums/

___
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: cross-link serial console

2009-10-20 Thread Nikos Vassiliadis

Gary Gatten wrote:

Ahh  A Null modem cable?  Or, perhaps BSD will allow you to
configure the serial interface in the software - make one end a DCE type
and the other by default will remain a DTE.


He has to use a null-modem cable. The wires sending and receiving data
are fixed, so one cannot change these using software.

To the original poster:
Did you plan to run a getty/login on the serial link?
That would be messy, since login on system A will writing
data to login on system B and vice versa. I think creating
a PPP link between the two and using IP is the way to go.

Nikos
___
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"


building lynx with ssl

2009-10-20 Thread Noah

Hi there,

I Built lynx-2.8.7 from the .tar.gz and unable to get ssl support to work

the error is:

Alert!: This client does not contain support for HTTPS URLs.


and the build strategy used is:
./configure --with-ssl && make && sudo make install

what am I doing wrong?
___
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 build from ports without downloading ports

2009-10-20 Thread Noah

Hi there,

I have a server with minimal disk space.  is there a way to build from 
ports without downloading ports or only downloading what is needed for 
the build and then it is removed?


Cheers,

Noah
___
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: building lynx with ssl

2009-10-20 Thread Chuck Swiger

On Oct 20, 2009, at 1:31 PM, Noah wrote:

and the build strategy used is:
./configure --with-ssl && make && sudo make install

what am I doing wrong?


You're building stuff yourself without looking at how the ports  
maintainer already solved this issue.  Try doing ./configure --with- 
ssl=/usr or ./configure --with-ssl=/usr/local, depending on which  
OpenSSL installation you want to use


Regards,
--
-Chuck

___
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 build from ports without downloading ports

2009-10-20 Thread Chuck Swiger

On Oct 20, 2009, at 1:35 PM, Noah wrote:
I have a server with minimal disk space.  is there a way to build  
from ports without downloading ports or only downloading what is  
needed for the build and then it is removed?


You're describing the default behavior of ports-- it only downloads  
sources which are needed for the current build.  To clean up sources  
and so forth, look to portsclean (from portupgrade).  You might also  
consider using pre-built packages, where available.


Regards,
--
-Chuck

___
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 build from ports without downloading ports

2009-10-20 Thread Pieter de Goeje
On Tuesday 20 October 2009 22:35:54 Noah wrote:
> I have a server with minimal disk space.  is there a way to build from
> ports without downloading ports or only downloading what is needed for
> the build and then it is removed?

That is technically possible but it's usually a lot easier to mount the ports 
tree from an NFS server. If you share the ports tree between a number of 
servers make sure WRKDIRPREFIX is set to a local path before you start 
building ports or you might run into concurrency issues when multiple servers 
build a port at the same time.

Regards,

Pieter
___
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 build from ports without downloading ports

2009-10-20 Thread Roland Smith
On Tue, Oct 20, 2009 at 01:35:54PM -0700, Noah wrote:
> Hi there,
> 
> I have a server with minimal disk space.  is there a way to build from 
> ports without downloading ports 

Not directly.

But you can install pre-built packages instead. The only downside in that
case is that you cannot choose which options a package is built with.

Another option is to build the ports on another machine (with the same FreeBSD
version and hardware architecture!) and just copy (using e.g. rsync or tar &
nc) /usr/local from the build machine to the server. The latter is especially
handy if you have more than one machine to keep up to date.

> or only downloading what is needed for 
> the build and then it is removed?

Ports as a rule do not download more than is needed to build and run the
port. After installing the port, you should always run 'make clean' in the
port directory to reclaim space used for the build. Additionally you can
reclaim disk space by e.g. removing everything under /usr/ports/distfiles.

But why go to all this trouble? Disk space is cheap these days, why not add an
extra disk?  If you don't have space in the chassis, consider using an
external USB disk for /usr/ports.

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


pgp2YYs2iEw87.pgp
Description: PGP signature


Re: how to build from ports without downloading ports

2009-10-20 Thread Robert Huff

Chuck Swiger writes:

>  > I have a server with minimal disk space.  is there a way to build  
>  > from ports without downloading ports or only downloading what is  
>  > needed for the build and then it is removed?
>  
>  You're describing the default behavior of ports-- it only
>  downloads sources which are needed for the current build.  To
>  clean up sources and so forth, look to portsclean (from
>  portupgrade).

There is also the "distclean" target of make, which will get
rid of the source tarball.


Robert Huff

___
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: device nodes in usb2 stack

2009-10-20 Thread Alexander Best
Hans Petter Selasky schrieb am 2009-10-19:
> On Sunday 18 October 2009 23:08:14 Alexander Best wrote:
> > posted this to freebsd-questions@ a while ago and got no answer.

> > alex

> Hi,

> For every USB device there is /dev/usb/XXX . Currently the USB
> Bluetooth
> driver does not have any file nodes. Entries appearing in devd.conf
> might not
> always be matched due to /dev/XXX creation. In that regard the USB
> stack fakes
> ugenX.Y device messages for devd.conf.

> --HPS

i see. will this stay the way it is or are there any plans to also add file
nodes for usb dongle devices?

alex
___
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 build from ports without downloading ports

2009-10-20 Thread Sean Cavanaugh

--
From: "Noah" 
Sent: Tuesday, October 20, 2009 4:35 PM
To: "User Questions" 
Subject: how to build from ports without downloading ports


Hi there,

I have a server with minimal disk space.  is there a way to build from 
ports without downloading ports or only downloading what is needed for the 
build and then it is removed?


I assume you mean that you have such little space that you would not be able 
to download an entire port and its prerequisites and then delete it after 
everything is compiled and installed as you could with a simple "make 
install clean"


I would recommend doing make install clean in spurts so that you don't run 
out of space (get a couple of prerequisites out of the way at a time), or 
install the packages for the programs you want and then update them with 
ports.




___
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 build from ports without downloading ports

2009-10-20 Thread Robert Huff

Roland Smith writes:

>  But why go to all this trouble? Disk space is cheap these days,
>  why not add an extra disk?  If you don't have space in the
>  chassis, consider using an external USB disk for /usr/ports.

Sometimes ... because the machine hardware is not under your
control.
In the mid 90's, I worked on a major workstation upgrade for
the customer support division of a large financial services firm: we
were replacing 386/20s with Pentium 90s.
Most of the old machines were still serviceable - even the ones
that were half-filled with dust still ran - so we looked around for
something to do with them other than the scrap heap.
Off in a cranny in one of the machine rooms was a 286/,
whose job it was to dial out twice a day, retrieve a specific piece
of data, and put it in an equally specific place on the file
server.  It had been running 24/7 for, well, since you could hook a
286 up to a network file server..
Surely, we thought, we could move things over and increase
reliability, etc..
The word came down from two or threee levels up the food chain:
"Absolutely not.  Don't even shut it down to dust."


Robert Huff


___
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: need C help, passing char buffer[] by-value....

2009-10-20 Thread Gary Kline
On Tue, Oct 20, 2009 at 05:42:41AM +0200, Polytropon wrote:
> Just a little and quite formal side note:
> 
> On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan  wrote:
> >while (*tp != '\0' && *tp++ != '<');
> 
> It's often a good choice, especially for increasing readability
> of code, to code the "empty statement" on a line on its own (as
> you usually put any statements on an own line for clarity), so
> the reader doesn't accidentally take it as and "end of command"
> notification, e. g.
> 
>   while(1)
>   ;
> 
> instead of
> 
>   while(1);
> 
> which could be confused with the syntactical meaning of
> 
>   whatsthis(1);
> 
> I'm just mentioning this because I saw this in a programming
> project when I was at university. A young programmer who was
> given the task to look at code a very skilled programmer gave
> him. Somewhere in the code, an endless loop caused the program
> not to work properly. The student could not find this endless
> loop because it was coded in the manner as given above. It was
> not the polite form of for(;;); :-)


yeah; i already fixed this in the pointer version that patrick 
suggested.

that's the one nice thing about perl; you gotta use braces even for a 
single
clause.  

if  foo
{
}

while bar
{
}

can't get away with while ();

:-)

gary


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

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.31a release of Jottings: http://jottings.thought.org/index.php

___
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: need C help, passing char buffer[] by-value....

2009-10-20 Thread Gary Kline
On Mon, Oct 19, 2009 at 08:24:49PM -0700, Patrick Mahan wrote:
> 
> 
> Gary Kline wrote:
> >On Mon, Oct 19, 2009 at 11:09:19AM -0700, Patrick Mahan wrote:
> >>See comments interspaced below -
> >
> >
> > You've got it exactly right, Patrick.  There were no "C" classes in 
> > 1978--I taught myself.  Obviously, not that well because I have 
> > already dreaded pointers.  ---Well, usually.
> 
> You are welcome, glad to help.
> 
> [examples snipped]
> 
> >
> >
> > Your examples help a lot!   Everything works except when there are 
> > two or more tags on one line such as:
> >
> >  > SIZE="4">
> >
> >
> > I think I see where is your skiptags--pointer arithematic 
> > function--this can be
> > caught.  Thanks much!
> >
> 
> If I might make a suggestion.  Make use of a case (switch) statement:
> 
> switch(buf[c]) {
> case '<': /* start of tag, skip it if requested */
>  if (skiptags) c = skiptag(&buf[c]);
>  ...
> 
> default: /* handle normal stuff */
>   ...
> }
> 
> Inside your while() statement.


It took me over half an hour of fumbling, until i understood that you 
meant the 
"while (fgets(buf, sixeof buf, fpin))" if that's right.  then i fumbled 
the 
ball because i used your pointer example rather than the indexing-into 
method,
case 'B'.

Just a  FWIW, But for middle-involved cases like this program--what? a 
couple k lines
long--when i get wedged like this, i almost always break it down into 
like a
main{
fgets()

}
THEN:
skiptags()

i didn't figure this 'keep it simple, Sire' paradigm until a few 
[7-9,10] years ago.
that's godawful late to learn new tricks.  it's hard to understand 35 
lines of code 
in the midst of 2400 :_)

gary



> 
> Good luck,
> 
> Patrick
> 
> ___
> 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"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 7.31a release of Jottings: http://jottings.thought.org/index.php

___
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 build from ports without downloading ports

2009-10-20 Thread RW
On Tue, 20 Oct 2009 13:35:54 -0700
Noah  wrote:

> Hi there,
> 
> I have a server with minimal disk space.  is there a way to build
> from ports without downloading ports or only downloading what is
> needed for the build and then it is removed?
> 

There's a howto here:

http://codeidol.com/unix/bsd/Keeping-Up-to-Date/Build-a-Port-Without-the-Ports-Tree/


However the ports tree is only  ~0.5GB, so you would have to be very
short of space to go to that much trouble
___
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: /tmp on mfs

2009-10-20 Thread Giorgos Keramidas
On Tue, 20 Oct 2009 11:20:38 -0400, Christopher Hilton  
wrote:
> Reading the list yesterday I came across a little controversy about swap
> backed /tmp filesystems. I've been using this in my /etc/rc.conf
>
> tmpmfs="YES"# Set to YES to always create an mfs /tmp, NO to never
> tmpsize="1g"# Size of mfs /tmp if created
> tmpmfs_flags="-S -o async,noexec"   # Extra mdmfs options for the mfs /tmp
>
> To mount /tmp on a swap backed filesystem. I've been assuming that
> data stored in the /tmp directory was held in RAM and then written to
> the swap space only when the system had a more pressing need for the
> RAM. I typically configure my systems with swap == 2 * RAM or more.
> And on the systems in question I have at least 1Gb of RAM. I was
> hoping to use this trick to enhance the performance of the postgresql
> database (temp_tablespace=/tmp/pgsql/) Is my assumption about
> where the data in a temporary file is stored incorrect?

Hi Christopher,

The rc.conf(5) options for `tmpmfs' and `varmfs' use the mdmfs(8) to
create the respective filesystems.  The default behavior of mdmfs(8) is
to create a swap-backed filesystem.  Swap-backed filesystems, as the
manpage of mdconfig(8) described them, work exactly as you wrote:

swap Storage for this type of memory disk is allocated
 from buffer memory.  Pages get pushed out to the
 swap when the system is under memory pressure,
 otherwise they stay in the operating memory.  Using
 swap backing is generally preferable over malloc
 backing.

So your understanding of the way tmpmfs behaves is fine.

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


maxima can not be built, because gnuplot fails on download

2009-10-20 Thread Henry Olyer
I have a fix for gnuplot;
How do I get it reviewed and perhaps incorporated into FreeBSD?  Notice, I
am not saying gnuplot is bad, it just doesn't work, not since at least FBSD
6.1.  Earlier than that I don't know.
___
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: /tmp on mfs

2009-10-20 Thread ill...@gmail.com
2009/10/20 Christopher Hilton :
> Reading the list yesterday I came across a little controversy about swap
> backed /tmp filesystems. I've been using this in my /etc/rc.conf
>
> tmpmfs="YES"            # Set to YES to always create an mfs /tmp, NO to
> never
> tmpsize="1g"            # Size of mfs /tmp if created
> tmpmfs_flags="-S -o async,noexec"       # Extra mdmfs options for the mfs
> /tmp

Not to butt in (and tangentially, anyway), but noexec on /tmp will cause
"make installworld" to fail.  Or at least, it did last time I tried it
(2005?).  If
you never build world, I guess this is completely unimportant.

-- 
--
___
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: Write attempt to file in ZFS snapshot dir causes panic

2009-10-20 Thread Carl Chave
Thanks for testing it out krad.  I went ahead and submitted the PR:

http://www.freebsd.org/cgi/query-pr.cgi?pr=139806
___
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"


Question about FreeBSD syscall usage

2009-10-20 Thread Yan, Yeqing
Hi:
I'm from Intel China. Our project use FreeBSD 7.0 and I have some questions 
about the FreeBSD syscall.
I don't know how to use these syscall below.
Is there having some doc or example about how to use these syscall?

kse_exit
kse_wakeup
kse_create
kse_thr_interrupt
kse_release
kse_switchin

mac_syscall

thr_create
thr_suspend
thr_kill2

Thank you very much!

Best Regards
Yan, Yeqing

___
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: Error when changin from -ro to rw on /etc/exports, FREEBSD STABLE 7.2

2009-10-20 Thread ill...@gmail.com
2009/10/20 Jeronimo Calvo :
> I'm wondering if that /etc/exports format will work:
>
> /DATA1   192.168.11.6(rw)
> /DATA2   192.168.11.6(rw)
>
> or needs to be like this?
>
>> [root@ /DATA1]# cat /etc/exports
>> /DATA1  -rw 192.168.11.6
>> /DATA2  -rw 192.168.11.6


Try it without the "-rw" at all, as according to man 5 exports
read/write is the default, and no read/write flag is given.

I believe you will have to specify permissions (via the -maproot
or -mapall options) or make the exported filesystems writable
by "nobody" (uid 65534) to actually use the write functionality.

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: how to build from ports without downloading ports

2009-10-20 Thread b. f.
> I have a server with minimal disk space.  is there a way to build
> from ports without downloading ports or only downloading what is
> needed for the build and then it is removed?
>

You could:

1) build packages on another machine or cluster, and  then install the
packages via a remote PKG_PATH/PACKAGEROOT/PACKAGESITE shared over a
network (you could even use a remote PKG_TMPDIR as a staging area to
save further space during installation);

2) build ports on the server but use a filesystem on a removable
drive, memory-backed filesystem (tmpfs(5) or mdmfs(8)), or remote
filesystem shared over a network  to hold your PORTSDIR, DISTDIR
and/or WRKDIR. While building the ports, you could pursue the strategy
outlined in previous posts where you only download portions of a ports
tree that are necessary for the ports that you want, and build the
ports one at a time in dependency order(you can do this with
ports-mgmt/portupgrade or ports-mgmt/portmaster, or via a hand-rolled
script using make(1) and tsort(1), for example), cleaning the WRKDIR
after each port build, and perhaps the DISTDIR as well.  You can
configure the ports to save space via OPTIONS, NO_INSTALL_MANPAGES,
and NOPORTDOCS.  Finally, you could compress many of your binaries
after installation with archivers/upx, or place the ports on a
filesystem with transparent compression, using ZFS or geom_uzip(4).

Don't forget that you can remove unneeded parts of the base system via
src.conf(5) and a custom (compressed) kernel, too.

b.
___
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"


Force installation of dependencies

2009-10-20 Thread Warren Liddell
is there a command that when comnpiling a certain pkg will tell it to 
forcefully re-do every single dependcy for that particular pkg ?

___
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: Force installation of dependencies

2009-10-20 Thread Adam Vande More
On Tue, Oct 20, 2009 at 10:53 PM, Warren Liddell wrote:

> is there a command that when comnpiling a certain pkg will tell it to
> forcefully re-do every single dependcy for that particular pkg ?
>

Judging from the topics of your recent posts, I assume you're not using a
port managment tools to handling installing and upgrading your
applications.  Become familar with portmaster or portupgrade, you'll save
yourself a lot of headache.


-- 
Adam Vande More
___
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: Force installation of dependencies

2009-10-20 Thread Warren Liddell

Adam Vande More wrote:
On Tue, Oct 20, 2009 at 10:53 PM, Warren Liddell > wrote:


is there a command that when comnpiling a certain pkg will tell it
to forcefully re-do every single dependcy for that particular pkg ?


Judging from the topics of your recent posts, I assume you're not 
using a port managment tools to handling installing and upgrading your 
applications.  Become familar with portmaster or portupgrade, you'll 
save yourself a lot of headache.



--
Adam Vande More
i use portupgrade .. but atm im getting no options or solutions to my 
problem .. so im trying to think of radical ways an means of solving it 
.. re-installing all dependencies of this pkg im hoping will solve my issue

___
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: maxima can not be built, because gnuplot fails on download

2009-10-20 Thread Dan Nelson
In the last episode (Oct 20), Henry Olyer said:
> I have a fix for gnuplot;
> How do I get it reviewed and perhaps incorporated into FreeBSD?  Notice, I
> am not saying gnuplot is bad, it just doesn't work, not since at least FBSD
> 6.1.  Earlier than that I don't know.

What errors are you getting?  Portsmon says that gnuplot builds fine on
all three branches:

  http://portsmon.freebsd.org/portoverview.py?category=&portname=gnuplot

If you have a patch, send a PR:
http://www.freebsd.org/doc/en/articles/problem-reports/article.html

-- 
Dan Nelson
dnel...@allantgroup.com
___
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: Force installation of dependencies

2009-10-20 Thread Adam Vande More
On Tue, Oct 20, 2009 at 11:42 PM, Warren Liddell wrote:

> Adam Vande More wrote:
>
>  On Tue, Oct 20, 2009 at 10:53 PM, Warren Liddell > shin...@maydias.com>> wrote:
>>
>>is there a command that when comnpiling a certain pkg will tell it
>>to forcefully re-do every single dependcy for that particular pkg ?
>>
>>
>> Judging from the topics of your recent posts, I assume you're not using a
>> port managment tools to handling installing and upgrading your applications.
>>  Become familar with portmaster or portupgrade, you'll save yourself a lot
>> of headache.
>>
>>
>> --
>> Adam Vande More
>>
> i use portupgrade .. but atm im getting no options or solutions to my
> problem .. so im trying to think of radical ways an means of solving it ..
> re-installing all dependencies of this pkg im hoping will solve my issue
>

portupgrade -Rf  should do the trick.

pkgdb -L sometimes helps

-- 
Adam Vande More
___
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"