UTF-8 file + console

2009-03-31 Thread Arek Czereszewski
Hi,

I have php application in UTF-8 on server
(in files are 4 languages: PL, SK, CZ and EN).

Is there any chance to edit this files on console?
Or should I edit files in Linux/Mac/Win editor with
UTF support and upload then to server?

Regards
Arek
-- 
Arek Czereszewski
arek (at) wup-katowice (dot) pl
UNIX allows me to work smarter, not harder.
___
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 forcing fsck at boottime

2009-03-31 Thread manish jain


Hi,

I am migrating from Linux and am still learning the basics of FreeBSD. 
One thing that I would to carry over from my Linux days is to force an 
fsck on all filesystems at system startup. On Linux, this was simply a 
matter of editing /etc/rc.sysinit. Things seem a bit more complicated in 
the BSD world. Can somebody please point me in the right direction ?


--
Thank you and Regards
Manish Jain
invalid.poin...@gmail.com
+91-99830-62246

NB : Laast year I kudn't spell Software Engineer. Now I are won.
___
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


guile-1.8.6 build core dumps (autoconf issue ?)

2009-03-31 Thread manish jain


Hi,

I portsnapped the lastest tarball a couple of days back. Doing a build 
in lang/guile (1.8.6) core dumps with the following message :



Making all in libguile
gmake[2]: Entering directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile'
 cd ..  /bin/sh ./config.status libguile/Makefile depfiles
config.status: creating libguile/Makefile
config.status: executing depfiles commands
gmake[2]: Leaving directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile'
gmake[2]: Entering directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile'
Generating libpath.h...
sed  ./version.h.in  version.h.tmp \
  -e s:@-GUILE_MAJOR_VERSION-@:1: \
  -e s:@-GUILE_MINOR_VERSION-@:8: \
  -e s:@-GUILE_MICRO_VERSION-@:6:
mv version.h.tmp version.h
if [ no = yes ]; then \
cc -DHAVE_CONFIG_H  -I.. -I.. -I.. -c -o gen-scmconfig.o 
gen-scmconfig.c; \
else \
cc -DHAVE_CONFIG_H   -I.. -I.. -I.. -I/usr/local/include  -O2 
-fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror -c -o 
gen-scmconfig.o gen-scmconfig.c; \
fi
if [ no = yes ]; then \
cc -o gen-scmconfig gen-scmconfig.o; \
else \
/bin/sh ../libtool --tag=CC   --mode=link cc  -O2 
-fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror  -L/usr/local/lib 
-o gen-scmconfig gen-scmconfig.o  -llthread -lgmp -lcrypt -lm -lltdl ; \
fi
libtool: link: cc -O2 -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes 
-Werror -o gen-scmconfig gen-scmconfig.o  -L/usr/local/lib -llthread 
/usr/local/lib/libgmp.so -lcrypt -lm /usr/local/lib/libltdl.so -Wl,-rpath 
-Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
rm -f scmconfig.h.tmp
cat ./scmconfig.h.top  scmconfig.h.tmp
./gen-scmconfig  scmconfig.h.tmp
Segmentation fault (core dumped)
gmake[2]: *** [scmconfig.h] Error 139
gmake[2]: Leaving directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/lang/guile/work/guile-1.8.6'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/lang/guile.


The complete logfile is more than 27 kb, which anybody can get from me 
by sending me a separate mail. One point of interest in the previous 
sections of the build states that guile-1.8.6 is to be configured with 
autoconf-2.63 whereas the latest autoconf port available is 2.62.


--
Thank you and Regards
Manish Jain
invalid.poin...@gmail.com
+91-99830-62246

NB : Laast year I kudn't spell Software Engineer. Now I are won.
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 08:05:11 manish jain wrote:

 I am migrating from Linux and am still learning the basics of FreeBSD.
 One thing that I would to carry over from my Linux days is to force an
 fsck on all filesystems at system startup. On Linux, this was simply a
 matter of editing /etc/rc.sysinit. Things seem a bit more complicated in
 the BSD world. Can somebody please point me in the right direction ?

fsck -p is done by default (meaning, filesystems are not fully scanned if they 
are marked clean). If pruning fails, background_fsck is checked, which will 
work on UFS systems with soft updates, but is not recommended by many as it 
may leave some errors unchecked.

If background_fsck is set to NO, things will stop and operator intervention is 
required, unless one has set fsck_y_enable. All this logic is implemented in 
/etc/rc.d/fsck.

The rc.conf(5) manpage and related rc(8), rcorder(8) and rc.subr(8) are a good 
read when migrating.
-- 
Mel
___
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: guile-1.8.6 build core dumps (autoconf issue ?)

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 08:15:56 manish jain wrote:
 Hi,

 I portsnapped the lastest tarball a couple of days back. Doing a build

 in lang/guile (1.8.6) core dumps with the following message :
  Making all in libguile
  gmake[2]: Entering directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' cd ..  /bin/sh
  ./config.status libguile/Makefile depfiles
  config.status: creating libguile/Makefile
  config.status: executing depfiles commands
  gmake[2]: Leaving directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' gmake[2]: Entering
  directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile' Generating
  libpath.h...
  sed  ./version.h.in  version.h.tmp \
-e s:@-GUILE_MAJOR_VERSION-@:1: \
-e s:@-GUILE_MINOR_VERSION-@:8: \
-e s:@-GUILE_MICRO_VERSION-@:6:
  mv version.h.tmp version.h
  if [ no = yes ]; then \
  cc -DHAVE_CONFIG_H  -I.. -I.. -I.. -c -o gen-scmconfig.o
  gen-scmconfig.c; \ else \
  cc -DHAVE_CONFIG_H   -I.. -I.. -I.. -I/usr/local/include  -O2
  -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror -c -o
  gen-scmconfig.o gen-scmconfig.c; \ fi
  if [ no = yes ]; then \
  cc -o gen-scmconfig gen-scmconfig.o; \
  else \
  /bin/sh ../libtool --tag=CC   --mode=link cc  -O2 
  -fno-strict-aliasing
  -pipe -Wall -Wmissing-prototypes -Werror  -L/usr/local/lib -o
  gen-scmconfig gen-scmconfig.o  -llthread -lgmp -lcrypt -lm -lltdl ; \ fi
  libtool: link: cc -O2 -fno-strict-aliasing -pipe -Wall
  -Wmissing-prototypes -Werror -o gen-scmconfig gen-scmconfig.o 
  -L/usr/local/lib -llthread /usr/local/lib/libgmp.so -lcrypt -lm

vs mine:
libtool: link: /usr/local/libexec/ccache/world-cc -O2 -fno-strict-aliasing -
pipe -Wall -Wmissing-prototypes -Werror -o gen-scmconfig gen-scmconfig.o  -
L/usr/local/lib /usr/local/lib/libgmp.so -lcrypt -lm /usr/local/lib/libltdl.so 
-Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib

Where does -llthread come from?
-- 
Mel
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Rudy

manish jain wrote:

 Hi,

 I am migrating from Linux and am still learning the basics of FreeBSD.
 One thing that I would to carry over from my Linux days is to force an
 fsck on all filesystems at system startup. On Linux, this was simply a
 matter of editing /etc/rc.sysinit. Things seem a bit more complicated
 in the BSD world. Can somebody please point me in the right direction ?

man fsck
Traditionally, fsck is invoked before the file systems are mounted and all
 checks are done to completion at that time.  If background checking is
 available, fsck is invoked twice.  It is first invoked at the
traditional
 time, before the file systems are mounted, with the -F flag to do
check-
 ing on all the file systems that cannot do background checking.

Also, you can set this in /etc/rc.conf
fsck_y_enable=YES
if you want to automatically run 'fsck -y' ... handy for remote servers.

Oh, and if you use ZFS, there is no such thing as 'fsck'.  That file
system never needs fsck.  :)  If you want less fsck headaches on a big
disk system, make the large partion (/home ?) ZFS.
 http://en.wikipedia.org/wiki/Zfs
 http://wiki.freebsd.org/ZFSQuickStartGuide

Rudy

___
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: UTF-8 file + console

2009-03-31 Thread Jeff Laine
On Tue, Mar 31, 2009 at 07:47:56AM +0200, Arek Czereszewski wrote:
 Hi,
 
 I have php application in UTF-8 on server
 (in files are 4 languages: PL, SK, CZ and EN).
 
 Is there any chance to edit this files on console?
 Or should I edit files in Linux/Mac/Win editor with
 UTF support and upload then to server?
 
 Regards
 Arek
 -- 
 Arek Czereszewski
 arek (at) wup-katowice (dot) pl
 UNIX allows me to work smarter, not harder.


I use bluefish editor (www/bluefish) for such purposes of mine. It  can handle 
various 
encodings and highlight code.


-- 
Best regards,
Jeff

| Nobody wants to say how this works.  |
|  Maybe nobody knows ...  |
|   Xorg.conf(5)|
___
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: UTF-8 file + console

2009-03-31 Thread Jeff Laine
Sorry, I missed that you need a console editor. bluefish requires X

-- 
Best regards,
Jeff

| Nobody wants to say how this works.  |
|  Maybe nobody knows ...  |
|   Xorg.conf(5)|
___
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: UTF-8 file + console

2009-03-31 Thread Arek Czereszewski
Jeff Laine pisze:
 Sorry, I missed that you need a console editor. bluefish requires X
 
Yes, I don't have X on my servers.



-- 
Arek Czereszewski
arek (at) wup-katowice (dot) pl
UNIX allows me to work smarter, not harder.
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Bruce Cran
On Tue, 31 Mar 2009 11:35:11 +0530
manish jain invalid.poin...@gmail.com wrote:

 
 Hi,
 
 I am migrating from Linux and am still learning the basics of
 FreeBSD. One thing that I would to carry over from my Linux days is
 to force an fsck on all filesystems at system startup. On Linux, this
 was simply a matter of editing /etc/rc.sysinit. Things seem a bit
 more complicated in the BSD world. Can somebody please point me in
 the right direction ?
 

I found this from a post last year:

echo '/sbin/fsck -y -f'  /etc/rc.early

-- 
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: Question about forcing fsck at boottime

2009-03-31 Thread Wojciech Puchar
i don't know why you do want to FORCE it every boot. in FreeBSD it's not 
needed.


but you may add
background_fsck=NO

to check filesystems at boot when needed, not delayed.

IMHO this background fsck isn't good idea at all
___
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: Crontab for different ime zones

2009-03-31 Thread Olivier Nicole
  Is there a way to start jobs with cron using different a time-zone
  different from local time zone?
 
  I am in a TZ that has no Daylight Savings Time, and would like to
  start a job (reccording of a web cast) in a TZ that has DST (so with a
  time difference that changes along the year).
 
  Is there an automatic/intelligent way to do that?
 
 Not that I know of, yet since timezones only change twice a year you
 can look up the changes for the coming year and adjust the crontab
 accordingly.
 
Hey, I am too lazyto change my crontab twice a year, and we have
computers, they should do the work for us.

The way I did it:

- start the cron job at the earliest of both time (winter time, or
  summer time).

- at the begining of the job, have a small Perl script that will wait
  until it is the specified time in the specified time zone: at best
  it will not wait, at worst the perl script will sit idled for one
  hour before giving the hand back to the real job.

Et voila (well, it will be et voila once the job will have completed
succesfully once :)

Thanks,

Olivier
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Daniel Marsh

On Tue, 31 Mar 2009 15:01:37 +0800, Bruce Cran br...@cran.org.uk wrote:


On Tue, 31 Mar 2009 11:35:11 +0530
manish jain invalid.poin...@gmail.com wrote:



Hi,

I am migrating from Linux and am still learning the basics of
FreeBSD. One thing that I would to carry over from my Linux days is
to force an fsck on all filesystems at system startup. On Linux, this
was simply a matter of editing /etc/rc.sysinit. Things seem a bit
more complicated in the BSD world. Can somebody please point me in
the right direction ?



I found this from a post last year:

echo '/sbin/fsck -y -f'  /etc/rc.early




You could also replace rc.early with rc.local if you want it to run later  
in the boot process.



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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: Crontab for different ime zones

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 09:56:14 Olivier Nicole wrote:
   Is there a way to start jobs with cron using different a time-zone
   different from local time zone?
  
   I am in a TZ that has no Daylight Savings Time, and would like to
   start a job (reccording of a web cast) in a TZ that has DST (so with a
   time difference that changes along the year).
  
   Is there an automatic/intelligent way to do that?
 
  Not that I know of, yet since timezones only change twice a year you
  can look up the changes for the coming year and adjust the crontab
  accordingly.

 Hey, I am too lazyto change my crontab twice a year, and we have
 computers, they should do the work for us.

Once a year, since you can use months and days. In fact, iirc DST changes are 
known 5 years ahead (I'm sure Ill be corrected if this is not the case) so 
one can even run a yearly cronjob to change the crontab ;)

Of course, waiting an hour during summertime is an option, as is running cron 
in a jail with /etc/localtime of the target timezone - use tzsetup(8) for that 
inside the jail (though seems overkill for the purpose).
-- 
Mel
___
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: Why?? (prog question)

2009-03-31 Thread Polytropon
I don't want to start a style debate, but forgive me the
following annotations:

1. Use the tab character for indentation. You can set its
   length with your favourite editor (e. g. mcedit: F9,
   Options, General; joe: ^TD). Don't waste with spaces.

2. The main() function should be declared as
int main(int argc, char *argv[])
   or
int main(int argc, char **argv)
   Note that it's returning (int). Use this functionality.

3. In case of errors (e. g. incorrect number of parameters)
   use fprintf() to stderr, or perror() with the builtin
   error handling (e. g. for file not found by fopen()).

4. Use the predefined return codes, don't hardcode them.
   FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
   maximum compatibility (such as with Linux). There are
   more exit codes for differentiation, but they're specific
   to FreeBSD, as far as I know.

5. This is highly debatable: Use a good style for { and }.

6. Use delimiters around operators, e. g. buf[strlen(buf) - 1]
   instead of buf[strlen(buf)-1]; increases readability.

Here is the program again, with some stylistic modifications
and the correct (read: recommended, usual) exit code handling:




/*
 * simple prog to join all | very nearly all lines of a text file
 * that make up one paragraph into one LONG line.  
 *
 * paragraphs are delimiated by a single \n break.
 */

#include stdio.h
#include string.h
#include stdlib.h

int main(int argc, char *argv[])
{
char buf[65536];


if(argc == 1) {
fprintf(stderr, Usage: %s  file  newfile\n, argv[0]);
exit(EXIT_FAILURE);
}

while (fgets(buf, sizeof buf, stdin)) {
if(*buf == '\n') {
fprintf(stdout, \n\n);
} else {
buf[strlen(buf) - 1] = ' ';
fputs(buf, stdout);
}
}

return EXIT_SUCCESS;
}





Note that compiling with -Wall (always a good option) doesn't
show any warning.



I read my advices again... makes me sound so old! :-)



-- 
Polytropon
From 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


Re: UTF-8 file + console

2009-03-31 Thread Paul B. Mahol
On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
 Hi,

 I have php application in UTF-8 on server
 (in files are 4 languages: PL, SK, CZ and EN).

 Is there any chance to edit this files on console?
 Or should I edit files in Linux/Mac/Win editor with
 UTF support and upload then to server?

You can edit them inside vim, but they will not be
displayed correctly.


-- 
Paul
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Chris Rees
2009/3/31 Wojciech Puchar woj...@wojtek.tensor.gdynia.pl:


 IMHO this background fsck isn't good idea at all

Why?

Chris
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
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: UTF-8 file + console

2009-03-31 Thread Paul B. Mahol
On 3/31/09, Thomas Dickey dic...@radix.net wrote:
 On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
 On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
  Hi,
 
  I have php application in UTF-8 on server
  (in files are 4 languages: PL, SK, CZ and EN).
 
  Is there any chance to edit this files on console?
  Or should I edit files in Linux/Mac/Win editor with
  UTF support and upload then to server?

 You can edit them inside vim, but they will not be
 displayed correctly.

 That might be a configuration issue rather than the program.
 (EN in particular ;-)

Generally speaking FreeBSD console doesnt support UTF-8. So even if
program (in this case vim) supports UTF-8 it will not work.


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


Issues with OpenLDAP 2.4.15 and FreeBSD 8.0-CUrrent as well as with FreeBSD 7.2-PRE using DB 4.7

2009-03-31 Thread O. Hartmann
I reported this earlier here and now I'm about to file a PR. Before 
that, I will ask whether there is a solution out here or someone can 
give a hint in case I ran into a hidden misconfiguration.


First I see on all FreeBSD flavours (7.2 and 8.0) a coredump of LDAP 
clients when doing ldapsearch, ldappasswd. The client performs well, but 
at the end it terminates with some SIG 11.


Another very severe issue is with Db 4.7 and OpenLDAP 2.4.15 as taken 
from ports. On FreeBSD 7.1/7.2 I was running a OpenLDAP 1.4.15 server, 
used with DB 4.6. Several experimental boxes with FreeBSD 8.0-CURRENT 
and FreeBSD 7.1/7.2 were referring to that LDAP server for user 
authetication. After backing up the database, installing DB 4.7, 
recompiling everything that depends on DB 4.X, recompiling at last 
OpenLDAP and doing a Db recover ends up in a problem. The clients which 
were willing to perform logins via ssh by autheticating users via this 
LDAP server refuses now authentication! The same client authenticates 
the users of the LDAP server via LDAP authentication when accessing 
protected webpages served by lighttpd. I also can enumerate /home with 
users taken from the LDAP server, except login in via ssh. I did not 
change sshd's config, so I suspect something else. Watching console log 
and slapd log I see no issues aside the slapd log, but console and sshd 
log tell something about an unknown user with uid . Googling for 
this error I find a lot of sshd/nss/ldap related issues - but no 
solution. Doinf a 'sudo' or 'su' on the same machine to users residing 
on LDAP db is possible. But connection via ssh isn't possible.


Another very strange behaviour occurs on FreeBSD 8.0-CURRENT serving as 
OpenLDAP 2.4.15 server with cysrus-sasl compiled in and DB 4.7. 
Authentication to this server, even from the local host, takes 
approximately 20 - 30 seconds, connecting LUMA for administering also 
takes that long, even showing up the DIT in LUMA takes unconveniently 
long times to perform. This happens when this server was updated from 
FreeBSD 7.2-PRE to FreeBSD 8.0-CURRENT with all the stuff completely 
fresh installed. Before the upgrade, the OpenLDAP server was running 
2.4.15 with DB 4.7 as well as it does now under FreeBSD 8.0-CUR.


Well, even with fresh standard installations taken from the templates 
when using nss_ldap/pam_ldap/OpenLDAP shows those strange issues on all 
mentioned boxes and OS flavours.


Now I think I ran into a severe issue with either OpenLDAP 2.4.15 and/or 
FreeBSD 8.0.


Regards,
Oliver
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread hv


Am 30.03.2009 um 21:21 schrieb Juan Miscaro:


Hi gang,

I'm running a remote 6.2 system which recently got shut down
unexpectedly (tower was physically nudged and apparently lost power).
I am running a 2-disk striped array with the geom_stripe.ko module.

So my fstab line is

/dev/stripe/st0a/data   ufs rw,acls  
2   2


Thing is, the /dev/stripe directory no longer exists.

Make sure the the geom_stripe module is actually loaded. (with kldstat)

If it's not already loaded, do a kldload geom_stripe (which creates  
the /dev/stripe directory, if the metadata exist on the disk  
(automatic mode) and perform a normal fsck afterwards. (e.g fsck -y / 
dev/stripe/st0a)
If the metadata /(manual mode) are not stored on the disk, you need to  
issue exactly the same commands to recreate it as you originally did.

All this is nicely documented in the man page (man gstripe)

By adding the following line

geom_stripe_load=YES

to /boot/loader.conf you make sure the stripe will be available after  
reboot (at least in automatic mode).


Hope this helps

Regards
--
Henry Vogt h...@tuebingen.mpg.de (Fon: ++49-7071-601-511, Fax: -826)
Campus Max-Planck-Institute, Spemannstr. 32-41, Tübingen, Germany



PGP.sig
Description: Signierter Teil der Nachricht


Re: Question about forcing fsck at boottime

2009-03-31 Thread manish jain

Bruce Cran wrote:

On Tue, 31 Mar 2009 11:35:11 +0530
manish jain invalid.poin...@gmail.com wrote:


Hi,

I am migrating from Linux and am still learning the basics of
FreeBSD. One thing that I would to carry over from my Linux days is
to force an fsck on all filesystems at system startup. On Linux, this
was simply a matter of editing /etc/rc.sysinit. Things seem a bit
more complicated in the BSD world. Can somebody please point me in
the right direction ?



I found this from a post last year:

echo '/sbin/fsck -y -f'  /etc/rc.early



Hi Bruce/Everyone else,

Thanks for the rc.early tip.

BTW, a lot of people who posted replies thought I was not aware that a 
preen is always executed at startup. When I said I wanted to force an 
fsck, I meant 'fsck -fy'. As for background checks, they are - in my 
opinion - a real nightmare. Even though I am just a learner on FreeBSD 
still, I can assure anyone, putting background_fsck=NO into your 
rc.conf is one of the best things you can do.


As for the reason why I want to force fsck is that it has now happened 3 
timed that, after a clean and proper shutdown - with no foreign 
filesystems mounted, FreeBSD has complained on system restart (twice on 
a 5.x distribution I had briefly used and now once on 7.1) that / was 
not properly unmounted. Having bgfsck enabled is like inviting a dragon 
to dinner when this happens.


--
Thank you and Regards
Manish Jain
invalid.poin...@gmail.com
+91-99830-62246

NB : Laast year I kudn't spell Software Engineer. Now I are won.
___
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: UTF-8 file + console

2009-03-31 Thread Maciej Milewski
Tuesday 31 March 2009 12:15:33 Paul B. Mahol napisał(a):
 On 3/31/09, Thomas Dickey dic...@radix.net wrote:
  On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
  On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
   Hi,
  
   I have php application in UTF-8 on server
   (in files are 4 languages: PL, SK, CZ and EN).
  
   Is there any chance to edit this files on console?
   Or should I edit files in Linux/Mac/Win editor with
   UTF support and upload then to server?
 
  You can edit them inside vim, but they will not be
  displayed correctly.
 
  That might be a configuration issue rather than the program.
  (EN in particular ;-)

 Generally speaking FreeBSD console doesnt support UTF-8. So even if
 program (in this case vim) supports UTF-8 it will not work.
What about editing with vim and setting manualy fileencoding=utf8?
Next time you open this file vim should know that it is utf8 file or am I 
wrong?

-- 
Regards,
Maciej Milewski
___
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: Cleaning up multiplicates in elf ldconfig path

2009-03-31 Thread Parv
in message 200903302145.48743.mel.flynn+fbsd.questi...@mailing.thruhere.net,
wrote Mel Flynn thusly...

 On Sunday 29 March 2009 16:39:15 Parv wrote:
  I am on FreeBSD/i386 6.4-STABLE (around Mar 1, 2009).  I failed
  to find a solution to the (cosmetic) problem of ldconfig path
  having duplicate directories (dmesg output wrapped for this
  email) ...
( ... and both /usr/{X11R6,local} point to /misc/local ... )
 I've been running without /usr/X11R6 symlink for a long time and
 since XFree86 support has been removed from ports, it seems
 logical it can be safely deleted. However, flz@ (maintainer of
 xorg) has the authoritative answer.

Thanks Mel, at least for the confirmation.  Since I sent the email,
I have moved out /usr/X11R6 link (effectively deleted).  After two
days of daily use I have not seen anything different, besides
cleaned up dmesg(1) output.


  - Parv

-- 

___
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: installing freebsd 7.1 ( error mounting /dev/acd0 input/outputerror)

2009-03-31 Thread ajeesh joseph
 hello,I have tried the way how you suggested. But unfortunately iam getting 
same error.today i tried to install by plugging HDD as primary master and cdrom 
and primary slave.I tried to install.During install a new problem of 
/dev/ad0s1a on /mnt : input/output error appears,,can you help me in solving 
this so that i can install freebsd. Original message From:Wojciech Puchar 
woj...@wojtek.tensor.gdynia.pl Date: 30 Mar 09 20:16:00Subject:Re: installing 
freebsd 7.1 ( error mounting /dev/acd0 input/outputerror)To: Kevin Kinsey 
CD/DVD DMA problems are commontryset hw.ata.atapidma=0 bootafter getting to 
bootloader prompt (6)On Mon, 30 Mar 2009, Kevin Kinsey wrote: ajeesh joseph 
wrote: Hello,I was installing freebsd 7.0/7.1to my Ampro RB700,celeron 
processor,usb hdd 80gb using my CD drive.during the time of installation i 
get error error mounting /dev/acd0 input/output error  could any one tell 
me how to solve this and how can i install the OS..regardsAjeesh  /dev/a
 cd0 is your CDROM drive.   Try using a different CD for starters ... (a  
2nd copy) ... if that doesn't work, it might  be a bad CDROM drive.   HTH,  
 Kevin Kinsey   If one studies too zealously, one easily loses his pants.   
A. Einstein freebsdquesti...@freebsd.org mailing list  
http://lists.freebsd.org/mailman/listinfo/freebsdquestions  To unsubscribe, 
send any mail to freebsdquestionsunsubscr...@freebsd.org
freebsdquesti...@freebsd.org mailing list 
http://lists.freebsd.org/mailman/listinfo/freebsdquestions To unsubscribe, send 
any mail to freebsdquestionsunsubscr...@freebsd.org Get Yourself a cool, 
short @in.com Email ID 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: Issues with OpenLDAP 2.4.15 and FreeBSD 8.0-CUrrent as well as with FreeBSD 7.2-PRE using DB 4.7

2009-03-31 Thread Bartosz Stec

O. Hartmann pisze:
I reported this earlier here and now I'm about to file a PR. Before 
that, I will ask whether there is a solution out here or someone can 
give a hint in case I ran into a hidden misconfiguration.


First I see on all FreeBSD flavours (7.2 and 8.0) a coredump of LDAP 
clients when doing ldapsearch, ldappasswd. The client performs well, 
but at the end it terminates with some SIG 11.


That's really funny when ldapadd just do what you want it to do, and 
gives you core dump instead of bye bye ;) I have the same issue with 
FreeBSD 7.2 (I'm not using OpenLDAP on CURRENT). From my observations 
this behaviour depends on options checked with 'make config'. SIG 11 
occurs with default settings, so I checked ONLY bdb, perl and SASL (just 
what I needed for shared address book). and now it is working like a 
charm. However it's not a SOLUTION for this problem, especially when you 
need other options from config.


--
Bartosz Stec


___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 hv h...@tuebingen.mpg.de:

 Am 30.03.2009 um 21:21 schrieb Juan Miscaro:

 Hi gang,

 I'm running a remote 6.2 system which recently got shut down
 unexpectedly (tower was physically nudged and apparently lost power).
 I am running a 2-disk striped array with the geom_stripe.ko module.

 So my fstab line is

 /dev/stripe/st0a    /data   ufs rw,acls 2   2

 Thing is, the /dev/stripe directory no longer exists.

 Make sure the the geom_stripe module is actually loaded. (with kldstat)
 If it's not already loaded, do a kldload geom_stripe (which creates the
 /dev/stripe directory, if the metadata exist on the disk (automatic mode)

It *was* in automatic mode since it's been running and rebooting for
the past 2 years without any commands being issued in scripts.

The module was loaded but I unloaded it and reloaded it.  Strangely,
the size of the module (as given by 'kldstat') changed.  The output
line went from

 21 0xc0b0c000 6c9c geom_stripe.ko

to

 41 0xc4f42000 6000 geom_stripe.ko

The /dev/stripe directory is still not present.

 and perform a normal fsck afterwards. (e.g fsck -y /dev/stripe/st0a)
 If the metadata /(manual mode) are not stored on the disk, you need to issue
 exactly the same commands to recreate it as you originally did.
 All this is nicely documented in the man page (man gstripe)
 By adding the following line
 geom_stripe_load=YES
 to /boot/loader.conf you make sure the stripe will be available after reboot
 (at least in automatic mode).

Yes, the line is there (in /boot/loader.conf).

I fear the boot sector of one of the drives has been corrupted.

--
jm
___
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: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale 
will.rutherd...@utoronto.ca wrote:
 Tabbing is the worst form of indentation.  It is *much* better to use 
 spaces consistently.

may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up one indentation level,
beginning from 1, over 4, up to 10. Where's the consistency, or is
it defined on a per-programmer basis?

And why is this much better?

When I would compare both indentation forms, I'd say that tabbing
is the better form because
 + you can set your individually preferred tab with using the
   settings of your editor, be it 1, 4 or 8,
 + you can change the indentation while you're coding, e. g. when
   the indentation level makes the code exceed the right margin
   of your editor's window,
 + per indentation level only 1 byte is needed (tab = ASCII 9), while
   spacing requires more bytes, one per space (space = ASCII 32),
 + while you can convert tabs into spaces, you cannot easily convert
   spaces back into tabs, and finally
 + even FreeBSD uses the tabbing style.

I'm aware that one can argue about where { is to be placed, but
I don't see any valid reason to use spaces for indentation instead
of tabs (which I would even call standard).

It's a honest question: What are your arguments for using tabs?
Hint: it is *much* better doesn't count. :-)



-- 
Polytropon
From 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


Re: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Juan Miscaro wrote:
 Hi gang,
 
 I'm running a remote 6.2 system which recently got shut down
 unexpectedly (tower was physically nudged and apparently lost power).
 I am running a 2-disk striped array with the geom_stripe.ko module.
 
 So my fstab line is
 
 /dev/stripe/st0a/data   ufs rw,acls 2   2
 
 Thing is, the /dev/stripe directory no longer exists.  The system was
 running for well over 2 years with several reboots in there.  I have a
 lot of data that I want to recover on these 2 disks.  Is there any way
 to regain access to the data?  I can' t seem to find anything unusual
 in the logs.

You need to see if the drives that have made the array still exist and
are accessible. See if they are recognized in dmesg - maybe a cable was
knocked out from one of them.



signature.asc
Description: OpenPGP digital signature


Re: Why?? (prog question)

2009-03-31 Thread William Gordon Rutherdale

Polytropon wrote:

I don't want to start a style debate, but forgive me the
following annotations:

1. Use the tab character for indentation. You can set its
   length with your favourite editor (e. g. mcedit: F9,
   Options, General; joe: ^TD). Don't waste with spaces.

2. The main() function should be declared as
int main(int argc, char *argv[])
   or
int main(int argc, char **argv)
   Note that it's returning (int). Use this functionality.

3. In case of errors (e. g. incorrect number of parameters)
   use fprintf() to stderr, or perror() with the builtin
   error handling (e. g. for file not found by fopen()).

4. Use the predefined return codes, don't hardcode them.
   FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
   maximum compatibility (such as with Linux). There are
   more exit codes for differentiation, but they're specific
   to FreeBSD, as far as I know.

5. This is highly debatable: Use a good style for { and }.

6. Use delimiters around operators, e. g. buf[strlen(buf) - 1]
   instead of buf[strlen(buf)-1]; increases readability.

Here is the program again, with some stylistic modifications
and the correct (read: recommended, usual) exit code handling:




/*
 * simple prog to join all | very nearly all lines of a text file
 * that make up one paragraph into one LONG line.  
 *

 * paragraphs are delimiated by a single \n break.
 */

#include stdio.h
#include string.h
#include stdlib.h

int main(int argc, char *argv[])
{
char buf[65536];


if(argc == 1) {
fprintf(stderr, Usage: %s  file  newfile\n, argv[0]);
exit(EXIT_FAILURE);
}

while (fgets(buf, sizeof buf, stdin)) {
if(*buf == '\n') {
fprintf(stdout, \n\n);
} else {
buf[strlen(buf) - 1] = ' ';
fputs(buf, stdout);
}
}

return EXIT_SUCCESS;
}





Note that compiling with -Wall (always a good option) doesn't
show any warning.



I read my advices again... makes me sound so old! :-)



  
Tabbing is the worst form of indentation.  It is *much* better to use 
spaces consistently.


-Will

___
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: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale 
will.rutherd...@utoronto.ca wrote:
 Tabbing is the worst form of indentation.  It is *much* better to use 
 spaces consistently.

may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up one indentation level,
beginning from 1, over 4, up to 10. Where's the consistency, or is
it defined on a per-programmer basis?

And why is this much better?

When I would compare both indentation forms, I'd say that tabbing
is the better form because
 + you can set your individually preferred tab with using the
   settings of your editor, be it 1, 4 or 8,
 + you can change the indentation while you're coding, e. g. when
   the indentation level makes the code exceed the right margin
   of your editor's window,
 + you need more keypressing to get through the indentation with
   the spaces, one keypress per space, while you only need one
   keypress per tab (which equals one indentation level),
 + per indentation level only 1 byte is needed (tab = ASCII 9), while
   spacing requires more bytes, one per space (space = ASCII 32),
 + while you can convert tabs into spaces, you cannot easily convert
   spaces back into tabs, and finally
 + even FreeBSD uses the tabbing style.

I'm aware that one can argue about where { is to be placed, but
I don't see any valid reason to use spaces for indentation instead
of tabs (which I would even call standard).

It's a honest question: What are your arguments for using tabs?
Hint: it is *much* better doesn't count. :-)



// EDIT: added one further argument pro tab
/*


-- 
Polytropon
From 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


Re: Why?? (prog question)

2009-03-31 Thread William Gordon Rutherdale
This isn't a BSD question.  It's just about elementary C.  As other 
people pointed out, you could have easily caught it anyway just by 
turning on warnings.


-Will

Gary Kline wrote:

people, i've been under the weather for days and will probably be for a few 
more.
new  and TEMPORARY meds dont like me, ugh.

can anybody clue me in why the followin joinline program fails to catch if argc 
== 1?


/*
 * simple prog to join all | very nearly all lines of a text file that 
 * make up one paragraph into one LONG line.  
 *

 * paragraphs are delimiated by a single \n break.
 */

#include stdio.h
#include string.h
#include stdlib.h

main(int argc, char argv[])
{
   char buf[65536];

   if (argc == 1)
   {
printf(Usage: %s  file  newfile\n, argv[0]);
exit (-1);
   }
   while (fgets(buf, sizeof buf, stdin) )
   {
 if (*buf == '\n')
 {
   fprintf(stdout, \n\n);
 }
 else
 {
   buf[strlen(buf)-1] = ' ';
   fputs(buf, stdout);
 }
   }
}


  


___
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: UTF-8 file + console

2009-03-31 Thread Thomas Dickey
On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
 On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
  Hi,
 
  I have php application in UTF-8 on server
  (in files are 4 languages: PL, SK, CZ and EN).
 
  Is there any chance to edit this files on console?
  Or should I edit files in Linux/Mac/Win editor with
  UTF support and upload then to server?
 
 You can edit them inside vim, but they will not be
 displayed correctly.

That might be a configuration issue rather than the program.
(EN in particular ;-)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgpvrihzKDCC6.pgp
Description: PGP signature


Re: Question about forcing fsck at boottime

2009-03-31 Thread Chris Rees
2009/3/31 manish jain invalid.poin...@gmail.com:

 BTW, a lot of people who posted replies thought I was not aware that a preen
 is always executed at startup. When I said I wanted to force an fsck, I
 meant 'fsck -fy'. As for background checks, they are - in my opinion - a
 real nightmare. Even though I am just a learner on FreeBSD still, I can
 assure anyone, putting background_fsck=NO into your rc.conf is one of the
 best things you can do.

 As for the reason why I want to force fsck is that it has now happened 3
 timed that, after a clean and proper shutdown - with no foreign filesystems
 mounted, FreeBSD has complained on system restart (twice on a 5.x
 distribution I had briefly used and now once on 7.1) that / was not properly
 unmounted. Having bgfsck enabled is like inviting a dragon to dinner when
 this happens.


Sorry, but I have to disagree. The filesystem that FreeBSD uses (UFS
to some, FFS to others) has a feature known as 'snapshots', something
alien to people in the Linux world. What this means, is that one can
take a 'snapshot' of a drive's state (somewhat like a versioning tag),
and mount, dump, OR fsck it. The point of a background fsck is that
the SNAPSHOT is fsck'd, and only if there is a problem (which there
usually isn't, due to soft-updates meaning that data are rarely lost
on power loss) does fsck require write access to the volume in
question.

This is also why you can dump a live filesystem in FreeBSD.

Just to reiterate something said a thousand times, there is NOTHING
WRONG with background fscks, and just because something doesn't work
well for GNU/Linux doesn't mean it doesn't work with FreeBSD. There
are many differences, after all.

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 Ivan Voras ivo...@freebsd.org:
 Juan Miscaro wrote:
 Hi gang,

 I'm running a remote 6.2 system which recently got shut down
 unexpectedly (tower was physically nudged and apparently lost power).
 I am running a 2-disk striped array with the geom_stripe.ko module.

 So my fstab line is

 /dev/stripe/st0a        /data           ufs     rw,acls         2       2

 Thing is, the /dev/stripe directory no longer exists.  The system was
 running for well over 2 years with several reboots in there.  I have a
 lot of data that I want to recover on these 2 disks.  Is there any way
 to regain access to the data?  I can' t seem to find anything unusual
 in the logs.

 You need to see if the drives that have made the array still exist and
 are accessible. See if they are recognized in dmesg - maybe a cable was
 knocked out from one of them.

This is the end of dmesg (the drives in question are ad1 and ad3):

acd0: CDROM LTN485S/JU03 at ata0-master PIO4
ad1: 305244MB WDC WD3200JB-00KFA0 08.05J08 at ata0-slave UDMA100
ad3: 305245MB WDC WD3200JB-00KFA0 08.05J08 at ata1-slave UDMA100
GEOM_STRIPE: Device st0 created (id=3091204740).
GEOM_STRIPE: Disk ad1 attached to st0.
ad4: 152626MB WDC WD1600JS-00MHB0 02.01C03 at ata2-master SATA150
WARNING: Expected rawoffset 0, found 63
da0 at umass-sim0 bus 0 target 0 lun 0
da0: ST350082 0AS  Fixed Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
Trying to mount root from ufs:/dev/ad4s1a
WARNING: R/W mount of /backups denied.  Filesystem is not clean - run fsck
WARNING: R/W mount of /backups denied.  Filesystem is not clean - run fsck
rl0: link state changed to UP
arp: 10.9.1.204 moved from 00:0f:ea:56:4c:11 to 00:0d:87:b4:00:3e on rl0
arp: 10.9.1.204 moved from 00:0d:87:b4:00:3e to 00:0f:ea:56:4c:11 on rl0
GEOM_STRIPE: Disk ad1 removed from st0.
GEOM_STRIPE: Device st0 destroyed.
GEOM_STRIPE: Device st0 created (id=3091204740).
GEOM_STRIPE: Disk ad1 attached to st0.



# bsdlabel ad1

# /dev/ad1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a: 1250280640   164.2BSD 2048 16384 28552
  c: 12502806560unused0 0 # raw
part, don't edit
partition a: partition extends past end of unit
partition c: partition extends past end of unit
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard
system utilities

# bsdlabel ad3

# /dev/ad3:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a: 625142432   164.2BSD 2048 16384 28552
  c: 6251424480unused0 0 # raw part,
don't edit

These drives should appear to be identical.

I have since run fsck on the other drive (ad4, an external USB drive).

--
jm
___
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: Question about forcing fsck at boottime

2009-03-31 Thread RW
On Tue, 31 Mar 2009 08:15:54 +0200
Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:

 On Tuesday 31 March 2009 08:05:11 manish jain wrote:
 
  I am migrating from Linux and am still learning the basics of
  FreeBSD. One thing that I would to carry over from my Linux days is
  to force an fsck on all filesystems at system startup. On Linux,
  this was simply a matter of editing /etc/rc.sysinit. Things seem a
  bit more complicated in the BSD world. Can somebody please point me
  in the right direction ?
 
 fsck -p is done by default (meaning, filesystems are not fully
 scanned if they are marked clean). If pruning fails, background_fsck
 is checked, which will work on UFS systems with soft updates, but is
 not recommended by many as it may leave some errors unchecked.


I don't think that's quite right,  fsck -p is only done if
background_fsck=NO, otherwise an fsck -pF is done instead. The
latter does an fsck -p on filesystems that aren't eligible for
background checking - usually root and any none UFS filesystems. 

In other words you need to set background_fsck=NO to get a preen on
all filesystems.

___
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: UTF-8 file + console

2009-03-31 Thread Paul B. Mahol
On 3/31/09, Maciej Milewski m...@dat.pl wrote:
 Tuesday 31 March 2009 12:15:33 Paul B. Mahol napisał(a):
 On 3/31/09, Thomas Dickey dic...@radix.net wrote:
  On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
  On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
   Hi,
  
   I have php application in UTF-8 on server
   (in files are 4 languages: PL, SK, CZ and EN).
  
   Is there any chance to edit this files on console?
   Or should I edit files in Linux/Mac/Win editor with
   UTF support and upload then to server?
 
  You can edit them inside vim, but they will not be
  displayed correctly.
 
  That might be a configuration issue rather than the program.
  (EN in particular ;-)

 Generally speaking FreeBSD console doesnt support UTF-8. So even if
 program (in this case vim) supports UTF-8 it will not work.
 What about editing with vim and setting manualy fileencoding=utf8?
 Next time you open this file vim should know that it is utf8 file or am I
 wrong?

That questions is for vim list. And utf-8 support in vim is very well
documented.

-- 
Paul
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Juan Miscaro wrote:

 This is the end of dmesg (the drives in question are ad1 and ad3):

 GEOM_STRIPE: Device st0 created (id=3091204740).
 GEOM_STRIPE: Disk ad1 attached to st0.
 GEOM_STRIPE: Disk ad1 removed from st0.
 GEOM_STRIPE: Device st0 destroyed.
 GEOM_STRIPE: Device st0 created (id=3091204740).
 GEOM_STRIPE: Disk ad1 attached to st0.

Firstly, as you can see ad3 is never added. This can mean several
things, of which the most probable is that its metadata has been
destroyed. The messages after the second message is probably due to you
opening the drives manually, bypassing gstripe, probably with the
following commands.

 # bsdlabel ad1
 
 # /dev/ad1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a: 1250280640   164.2BSD 2048 16384 28552
   c: 12502806560unused0 0 # raw
 part, don't edit
 partition a: partition extends past end of unit
 partition c: partition extends past end of unit
 bsdlabel: partition c doesn't cover the whole unit!
 bsdlabel: An incorrect partition c may cause problems for standard
 system utilities
 
 # bsdlabel ad3
 
 # /dev/ad3:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a: 625142432   164.2BSD 2048 16384 28552
   c: 6251424480unused0 0 # raw part,
 don't edit
 
 These drives should appear to be identical.

This is the wrong way to inspect your drives. If you did anything to the
drives individually (i.e. bypassing gstripe) it's very likely you
corrupted some data. I don't know if this is obvious to you so I'm
saying it just in case. Inspect your drives with diskinfo -v to get
information such as its size.

What does gstripe list say? What does sysctl -b kern.geom.confxml say?

If gstripe list doesn't mention ad3, you need to establish what
happened to metadata on ad3. Try extracting the last sector from ad3 by
hand (using dd) into a file and inspect it (send output of hd filename).



signature.asc
Description: OpenPGP digital signature


Re: Question about forcing fsck at boottime

2009-03-31 Thread RW
On Tue, 31 Mar 2009 16:00:18 +0530
manish jain invalid.poin...@gmail.com wrote:

 As for the reason why I want to force fsck is that it has now
 happened 3 timed that, after a clean and proper shutdown - with no
 foreign filesystems mounted, FreeBSD has complained on system restart
 (twice on a 5.x distribution I had briefly used and now once on 7.1)
 that / was not properly unmounted. Having bgfsck enabled is like
 inviting a dragon to dinner when this happens.

If you've done a normal install, soft-updates aren't enabled on /,
so it will get foreground checked by default. 

If I were you I'd reboot into single user mode and do a full fsck on it.
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Ivan Voras wrote:

 If gstripe list doesn't mention ad3, you need to establish what
 happened to metadata on ad3. Try extracting the last sector from ad3 by
 hand (using dd) into a file and inspect it (send output of hd filename).

I just noticed there could be an easier way to do it: use gstripe dump
ad3 - it will write out its metadata. Use the manual (dd) approach if
this doesn't work.



signature.asc
Description: OpenPGP digital signature


Re: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 Ivan Voras ivo...@freebsd.org:
 Ivan Voras wrote:

 If gstripe list doesn't mention ad3, you need to establish what
 happened to metadata on ad3. Try extracting the last sector from ad3 by
 hand (using dd) into a file and inspect it (send output of hd filename).

 I just noticed there could be an easier way to do it: use gstripe dump
 ad3 - it will write out its metadata. Use the manual (dd) approach if
 this doesn't work.



# gstripe dump ad3
Can't read metadata from ad3: Invalid argument.
Not fully done.

# gstripe dump ad1
Metadata on ad1:
 Magic string: GEOM::STRIPE
 Metadata version: 3
  Device name: st0
Device ID: 3091204740
  Disk number: 0
Total number of disks: 2
  Stripe size: 4096
   Hardcoded provider:
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 Ivan Voras ivo...@freebsd.org:
 Juan Miscaro wrote:

 This is the end of dmesg (the drives in question are ad1 and ad3):

 GEOM_STRIPE: Device st0 created (id=3091204740).
 GEOM_STRIPE: Disk ad1 attached to st0.
 GEOM_STRIPE: Disk ad1 removed from st0.
 GEOM_STRIPE: Device st0 destroyed.
 GEOM_STRIPE: Device st0 created (id=3091204740).
 GEOM_STRIPE: Disk ad1 attached to st0.

 Firstly, as you can see ad3 is never added. This can mean several
 things, of which the most probable is that its metadata has been
 destroyed. The messages after the second message is probably due to you
 opening the drives manually, bypassing gstripe, probably with the
 following commands.

 # bsdlabel ad1

 # /dev/ad1:
 8 partitions:
 #        size   offset    fstype   [fsize bsize bps/cpg]
   a: 1250280640       16    4.2BSD     2048 16384 28552
   c: 1250280656        0    unused        0     0         # raw
 part, don't edit
 partition a: partition extends past end of unit
 partition c: partition extends past end of unit
 bsdlabel: partition c doesn't cover the whole unit!
 bsdlabel: An incorrect partition c may cause problems for standard
 system utilities

 # bsdlabel ad3

 # /dev/ad3:
 8 partitions:
 #        size   offset    fstype   [fsize bsize bps/cpg]
   a: 625142432       16    4.2BSD     2048 16384 28552
   c: 625142448        0    unused        0     0         # raw part,
 don't edit

 These drives should appear to be identical.

 This is the wrong way to inspect your drives. If you did anything to the
 drives individually (i.e. bypassing gstripe) it's very likely you
 corrupted some data. I don't know if this is obvious to you so I'm
 saying it just in case. Inspect your drives with diskinfo -v to get
 information such as its size.

Good to know.  Thanks.

# diskinfo -v ad3
ad3
512 # sectorsize
320072933376# mediasize in bytes (298G)
625142448   # mediasize in sectors
620181  # Cylinders according to firmware.
16  # Heads according to firmware.
63  # Sectors according to firmware.


# diskinfo -v ad1
ad1
512 # sectorsize
320071851520# mediasize in bytes (298G)
625140335   # mediasize in sectors
620178  # Cylinders according to firmware.
16  # Heads according to firmware.
63  # Sectors according to firmware.

 What does gstripe list say? What does sysctl -b kern.geom.confxml say?

'gstripe list' does not return any output at all.

Output to the sysctl command is attached.

 If gstripe list doesn't mention ad3, you need to establish what
 happened to metadata on ad3. Try extracting the last sector from ad3 by
 hand (using dd) into a file and inspect it (send output of hd filename).

See other post.

--
jm
mesh
  class id=0xc4f47900
nameSTRIPE/name
geom id=0xc3448300
  class ref=0xc4f47900/
  namest0/name
  rank2/rank
  config
ID3091204740/ID
Stripesize4096/Stripesize
TypeAUTOMATIC/Type
StatusTotal=2, Online=1/Status
StateDOWN/State
  /config
consumer id=0xc3c3c680
  geom ref=0xc3448300/
  provider ref=0xc3031980/
  moder0w0e0/mode
  config
Number0/Number
  /config
/consumer
/geom
  /class
  class id=0xc09c4de0
nameFD/name
  /class
  class id=0xc093e960
nameACD/name
geom id=0xc3032300
  class ref=0xc093e960/
  nameacd0/name
  rank1/rank
provider id=0xc3032280
  geom ref=0xc3032300/
  moder0w0e0/mode
  nameacd0/name
  mediasize8796093020160/mediasize
  sectorsize2048/sectorsize
/provider
/geom
  /class
  class id=0xc09790a0
nameGPT/name
  /class
  class id=0xc0978fe0
nameDISK/name
geom id=0xc306a580
  class ref=0xc0978fe0/
  nameda0/name
  rank1/rank
  config
  /config
provider id=0xc306ae80
  geom ref=0xc306a580/
  moder1w1e2/mode
  nameda0/name
  mediasize500107862016/mediasize
  sectorsize512/sectorsize
  config
fwheads255/fwheads
fwsectors63/fwsectors
  /config
/provider
/geom
geom id=0xc2eac000
  class ref=0xc0978fe0/
  namead4/name
  rank1/rank
  config
  /config
provider id=0xc2e6fe00
  geom ref=0xc2eac000/
  moder7w7e8/mode
  namead4/name
  mediasize160040803840/mediasize
  sectorsize512/sectorsize
  config
fwheads16/fwheads
fwsectors63/fwsectors
  /config
/provider
/geom
geom id=0xc3031880
  class ref=0xc0978fe0/
  namead3/name
  rank1/rank
  config
  /config
provider id=0xc3031800
  geom ref=0xc3031880/
  moder0w0e0/mode
  namead3/name
  mediasize320072933376/mediasize

Re: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Juan Miscaro wrote:

 What does gstripe list say? What does sysctl -b kern.geom.confxml say?
 
 'gstripe list' does not return any output at all.
 
 Output to the sysctl command is attached.

gstripe list cannot output nothing, since the sysctl output you posted
says a partial GEOM_STRIPE instance is present on the system.

This is bad:

geom id=0xc3065300
  class ref=0xc0978f60/
  namead3c/name
  rank3/rank
consumer id=0xc30698c0
  geom ref=0xc3065300/
  provider ref=0xc2e6fd80/
  moder0w0e0/mode
/consumer
/geom
geom id=0xc3032a00
  class ref=0xc0978f60/
  namead3a/name
  rank3/rank
consumer id=0xc2fde5c0
  geom ref=0xc3032a00/
  provider ref=0xc2e6fc80/
  moder0w0e0/mode
/consumer
/geom
geom id=0xc3032d00
  class ref=0xc0978f60/
  namead3s1/name
  rank3/rank
consumer id=0xc2fdea00
  geom ref=0xc3032d00/
  provider ref=0xc2e6fa00/
  moder0w0e0/mode
/consumer
/geom

It looks like you created a both a fdisk partition table and a bsdlabel
partition table on the ad3 drive. If so, your data is probably already
corrupted.

ad1 is also strangely partitioned but since it's your first drive in a
stripe this can be acceptable (it will contain the first sectors of the
array, including its partition tables).

 # gstripe dump ad3
 Can't read metadata from ad3: Invalid argument.
 Not fully done.

This can happen if the metadata on ad3 is corrupted. You'll need to dump
the last sector and inspect it to verify.



signature.asc
Description: OpenPGP digital signature


Re: Crontab for different ime zones

2009-03-31 Thread Colin House


Mel Flynn wrote:
..
 
 Once a year, since you can use months and days. In fact, iirc DST changes are 
 known 5 years ahead (I'm sure Ill be corrected if this is not the case) so 
 one can even run a yearly cronjob to change the crontab ;)
 
..

You might want to mention that to the Australian state governments;
we've been getting a few months notice (might be a slight exaggeration,
definately nowhere near 5 years!) for the last few years 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: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 Ivan Voras ivo...@freebsd.org:
 Juan Miscaro wrote:

 What does gstripe list say? What does sysctl -b kern.geom.confxml say?

 'gstripe list' does not return any output at all.

 Output to the sysctl command is attached.

 gstripe list cannot output nothing, since the sysctl output you posted
 says a partial GEOM_STRIPE instance is present on the system.

There *really is* no output to the 'gstripe list' command.

 This is bad:

    geom id=0xc3065300
      class ref=0xc0978f60/
      namead3c/name
      rank3/rank
        consumer id=0xc30698c0
          geom ref=0xc3065300/
          provider ref=0xc2e6fd80/
          moder0w0e0/mode
        /consumer
    /geom
    geom id=0xc3032a00
      class ref=0xc0978f60/
      namead3a/name
      rank3/rank
        consumer id=0xc2fde5c0
          geom ref=0xc3032a00/
          provider ref=0xc2e6fc80/
          moder0w0e0/mode
        /consumer
    /geom
    geom id=0xc3032d00
      class ref=0xc0978f60/
      namead3s1/name
      rank3/rank
        consumer id=0xc2fdea00
          geom ref=0xc3032d00/
          provider ref=0xc2e6fa00/
          moder0w0e0/mode
        /consumer
    /geom

 It looks like you created a both a fdisk partition table and a bsdlabel
 partition table on the ad3 drive. If so, your data is probably already
 corrupted.

What is a generic configuration?  Or can you explain how you come to
that conclusion?

 ad1 is also strangely partitioned but since it's your first drive in a
 stripe this can be acceptable (it will contain the first sectors of the
 array, including its partition tables).

 # gstripe dump ad3
 Can't read metadata from ad3: Invalid argument.
 Not fully done.

 This can happen if the metadata on ad3 is corrupted. You'll need to dump
 the last sector and inspect it to verify.

I've never done that before.  Can you be explicit?

--
jm
___
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: Why?? (prog question)

2009-03-31 Thread Wojciech Puchar

Tabbing is the worst form of indentation.  It is *much* better to use
spaces consistently.




stupid discussion and off topic. everybody write code as he/she like, or 
as a team decided if it's not single person work.


only end result matters.
___
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: installing freebsd 7.1 ( error mounting /dev/acd0 input/outputerror)

2009-03-31 Thread Chris Rees
[lines broken in quote]

2009/3/31 ajeesh joseph ajeeshjos...@in.com:
  hello,I have tried the way how you suggested. But unfortunately iam getting 
 same error.today
 i tried to install by plugging HDD as primary master and cdrom and primary 
 slave.I tried
 to install.During install a new problem of /dev/ad0s1a on /mnt : input/output 
 error appears,,can
 you help me in solving this so that i can install freebsd.

So...

Your original configuration was hard drive as Primary Master, and CD
as Secondary Master. Are you using 80-conductor cables?

80 conductor: http://www.pcguide.com/ref/hdd/if/ide/z_000553idecable80.jpg
40 conductor: 
http://www.scientific-solutions.biz/products/938605/images/cable_ribbon.jpg

The 40 conductor ribbons sometimes throw up problems in strange times
and places, an effect I observed when installing FreeBSD on my Xbox.

Also, the 80-conductor cables often support CS jumper settings; try
setting both jumpers to cable select, and plug the 80-conductor cable
in with the labelled ends into the correct drives.

Chris
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
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


xview problem

2009-03-31 Thread Giuseppe Pagnoni
Dear alll

I am running FreeBSD 7.1-RELEASE-p4 on an i386 machine and I am unable
to use applications that depend on xview. For example, when I try to
run clock, I get:

Assertion failed: (ret != inval_id), function _XAllocID, file
xcb_io.c, line 378. Abort

and I get the same error for any other application using xview.

I have updated the installed software to the latest (as of today)
version of the ports tree, and I have also run the following command
listed in /usr/ports/UPDATING:

portupgrade -rf libxcb

but to no avail.

I have also googled the error message, but the only link that comes up
is in Japanese

Any suggestions?

thank you very much in advance

-- 
Giuseppe Pagnoni
Dip. Scienze Biomediche
Sezione Fisiologia
Univ. di Modena e Reggio Emilia
Via Campi 287
I-41100 Modena, Italy
Tel: +39-059-205-5742
Fax: +39-059-205-5363
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Juan Miscaro wrote:

 It looks like you created a both a fdisk partition table and a bsdlabel
 partition table on the ad3 drive. If so, your data is probably already
 corrupted.
 
 What is a generic configuration?  Or can you explain how you come to
 that conclusion?

RAID 0 means striping data across N drives (2 in your case), with a
fixed stripe size. From the information in kern.geom.confxml (which is
why gstripe list should work), your stripe size is 4 kB, which is good
for this purpose. This kind of setup is usually done with raw drives,
i.e. with GEOM_STRIPE: gstripe label st0 ad1 ad3. After this, your
array is called stripe/st0 - this is where you create the file system,
etc. Striping means that each drive contains only a part of the data.
E.g. if you write 8 kB to the start of your array, the first 4 kB will
be written to ad1, the next 4 kB to ad3. Both smaller and larger
requests are handled logically. This means that the first sector on ad1
contains the partition table of your array, if you partitioned it (and
it looks like you did). The first sector of ad3 contains whatever data
is at position 4096 in your array - probably nothing important because
your partitions start at 32 kB - 512.

If you wrote only the partition table to ad3 then it's not a big deal -
it's useless but it may not corrupt anything important. If you proceeded
to to something else on ad3, then there could be problems.

 ad1 is also strangely partitioned but since it's your first drive in a
 stripe this can be acceptable (it will contain the first sectors of the
 array, including its partition tables).

 # gstripe dump ad3
 Can't read metadata from ad3: Invalid argument.
 Not fully done.
 This can happen if the metadata on ad3 is corrupted. You'll need to dump
 the last sector and inspect it to verify.
 
 I've never done that before.  Can you be explicit?

Using information from your previous posts, you should do this:

# dd if=/dev/ad3 of=ad3last count=1 skip=625142447
# hd ad3last



signature.asc
Description: OpenPGP digital signature


Re: Question about forcing fsck at boottime

2009-03-31 Thread Chris Rees
On Tue, 31 Mar 2009 16:00:18 +0530
manish jain invalid.poin...@gmail.com wrote:
 Having bgfsck enabled is like
 inviting a dragon to dinner when this happens.

2009/3/31 RW rwmailli...@googlemail.com:
 If you've done a normal install, soft-updates aren't enabled on /,
 so it will get foreground checked by default.

 If I were you I'd reboot into single user mode and do a full fsck on it.


Seriously, why is everyone against background fsck? Can anyone give a
good reason? Please?

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Juan Miscaro
2009/3/31 Ivan Voras ivo...@freebsd.org:
 Juan Miscaro wrote:

 It looks like you created a both a fdisk partition table and a bsdlabel
 partition table on the ad3 drive. If so, your data is probably already
 corrupted.

 What is a generic configuration?  Or can you explain how you come to
 that conclusion?

 RAID 0 means striping data across N drives (2 in your case), with a
 fixed stripe size. From the information in kern.geom.confxml (which is
 why gstripe list should work), your stripe size is 4 kB, which is good
 for this purpose. This kind of setup is usually done with raw drives,
 i.e. with GEOM_STRIPE: gstripe label st0 ad1 ad3. After this, your
 array is called stripe/st0 - this is where you create the file system,
 etc. Striping means that each drive contains only a part of the data.
 E.g. if you write 8 kB to the start of your array, the first 4 kB will
 be written to ad1, the next 4 kB to ad3. Both smaller and larger
 requests are handled logically. This means that the first sector on ad1
 contains the partition table of your array, if you partitioned it (and
 it looks like you did). The first sector of ad3 contains whatever data
 is at position 4096 in your array - probably nothing important because
 your partitions start at 32 kB - 512.

 If you wrote only the partition table to ad3 then it's not a big deal -
 it's useless but it may not corrupt anything important. If you proceeded
 to to something else on ad3, then there could be problems.

 ad1 is also strangely partitioned but since it's your first drive in a
 stripe this can be acceptable (it will contain the first sectors of the
 array, including its partition tables).

 # gstripe dump ad3
 Can't read metadata from ad3: Invalid argument.
 Not fully done.
 This can happen if the metadata on ad3 is corrupted. You'll need to dump
 the last sector and inspect it to verify.

 I've never done that before.  Can you be explicit?

 Using information from your previous posts, you should do this:

 # dd if=/dev/ad3 of=ad3last count=1 skip=625142447
 # hd ad3last



Thanks for that great explanation.

The file ad3last.txt is attached.

--
jm
  24 47 41 46 52 10 41 08  00 00 00 00 00 00 00 00  |$GAFR.A.|
0010  00 00 00 00 00 00 00 00  00 00 6f e2 42 25 00 00  |..o�B%..|
0020  00 00 00 08 00 00 00 00  00 00 00 00 00 00 00 00  ||
0030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||
*
0100  26 30 36 2f 32 37 2f 32  30 30 36 2d 50 34 4d 38  |06/27/2006-P4M8|
0110  30 30 50 72 6f 2d 38 32  33 2d 36 41 37 4c 36 47  |00Pro-823-6A7L6G|
0120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ||
*
0200
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Erik Trulsson
On Tue, Mar 31, 2009 at 04:04:53PM +0100, Chris Rees wrote:
 On Tue, 31 Mar 2009 16:00:18 +0530
 manish jain invalid.poin...@gmail.com wrote:
  Having bgfsck enabled is like
  inviting a dragon to dinner when this happens.
 
 2009/3/31 RW rwmailli...@googlemail.com:
  If you've done a normal install, soft-updates aren't enabled on /,
  so it will get foreground checked by default.
 
  If I were you I'd reboot into single user mode and do a full fsck on it.
 
 
 Seriously, why is everyone against background fsck? Can anyone give a
 good reason? Please?

For background fsck to work as it is supposed to, it is necessary that
only certain errors can occur on the filesystem.  Other types of errors
cannot be corrected by a background fsck.

To make sure that only the allowable errors can occur it is necessary
for soft updates to be used and working as it is supposed to.

For soft updates to work as it is supposed to the disk subsystem must
provide certain guarantees on when and in which order blocks are written.

Normal PATA/SATA disks with write caching enabled (which is the default) do
not provide these guarantees.  Disabling write caching on will make them
adhere to the assumptions that soft updates make, but at the cost of a
severe performance penalty when writing to the disks.


In short therefore on a 'typical' PC you can fairly easily get errors on a
filesystem which background fsck cannot handle.



It is also the case that background fsck relies on snapshots to work,
At least in the past snapshots had stability problems.  Things are supposed
to be better these days, but many people have long memories for these kind
of problems.






-- 
Insert your favourite quote here.
Erik Trulsson
ertr1...@student.uu.se
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 14:24:11 RW wrote:
 On Tue, 31 Mar 2009 08:15:54 +0200

 Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
  On Tuesday 31 March 2009 08:05:11 manish jain wrote:
   I am migrating from Linux and am still learning the basics of
   FreeBSD. One thing that I would to carry over from my Linux days is
   to force an fsck on all filesystems at system startup. On Linux,
   this was simply a matter of editing /etc/rc.sysinit. Things seem a
   bit more complicated in the BSD world. Can somebody please point me
   in the right direction ?
 
  fsck -p is done by default (meaning, filesystems are not fully
  scanned if they are marked clean). If pruning fails, background_fsck
  is checked, which will work on UFS systems with soft updates, but is
  not recommended by many as it may leave some errors unchecked.

 I don't think that's quite right,  fsck -p is only done if
 background_fsck=NO, otherwise an fsck -pF is done instead. The
 latter does an fsck -p on filesystems that aren't eligible for
 background checking - usually root and any none UFS filesystems.

As far as I can tell, -F -p skips clean disks (-p) and defers to background 
when possible, though the manpage doesn't exclude your or my theory. ENOTIME 
to check the source.
-- 
Mel
___
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: Why?? (prog question)

2009-03-31 Thread Gary Kline
On Tue, Mar 31, 2009 at 11:21:22AM +0200, Polytropon wrote:
 I don't want to start a style debate, but forgive me the
 following annotations:
 
 1. Use the tab character for indentation. You can set its
length with your favourite editor (e. g. mcedit: F9,
Options, General; joe: ^TD). Don't waste with spaces.


Ja, been doing this since 1978.  Does anybody hit space-key 
8 times!?

 
 2. The main() function should be declared as
   int main(int argc, char *argv[])
or
   int main(int argc, char **argv)
Note that it's returning (int). Use this functionality.


I've come to prefer the *char argv[] ...  I didn't use the formal int
return because this was supposed throwaway code.  (Going on years now
tho, so ... my-bad.)

 
 3. In case of errors (e. g. incorrect number of parameters)
use fprintf() to stderr, or perror() with the builtin
error handling (e. g. for file not found by fopen()).
 
 4. Use the predefined return codes, don't hardcode them.
FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
maximum compatibility (such as with Linux). There are
more exit codes for differentiation, but they're specific
to FreeBSD, as far as I know.


This I did not know.  I have a prefab include file with a bunch 
of my own similar #defines.  Wow, great!

 
 5. This is highly debatable: Use a good style for { and }.
 

Well, you're using the KR { }; but for me, the Ingres
style [[ yes, it was invented by someone else ]] gets my vote.
I scan
{
  and
}

more easily.  6 of one, half-dozen of another... .

 6. Use delimiters around operators, e. g. buf[strlen(buf) - 1]
instead of buf[strlen(buf)-1]; increases readability.
 

Yup.  


 Here is the program again, with some stylistic modifications
 and the correct (read: recommended, usual) exit code handling:
 
 

I'll swipe this.  I use this code with openoffice and abiword
because I compose with vi;  but I almost always forget to run 
my text thru joinlines and have to quit the word processor, run
jlines foo bar; mv bar foo; then restart the word processor.
I figure that I've spend several centuries of my lifetime messing 
with jlines, so i'm overdue for doing it right

gary


 
 
 /*
  * simple prog to join all | very nearly all lines of a text file
  * that make up one paragraph into one LONG line.  
  *
  * paragraphs are delimiated by a single \n break.
  */
 
 #include stdio.h
 #include string.h
 #include stdlib.h
 
 int main(int argc, char *argv[])
 {
   char buf[65536];
 
 
   if(argc == 1) {
   fprintf(stderr, Usage: %s  file  newfile\n, argv[0]);
   exit(EXIT_FAILURE);
   }
 
   while (fgets(buf, sizeof buf, stdin)) {
   if(*buf == '\n') {
   fprintf(stdout, \n\n);
   } else {
   buf[strlen(buf) - 1] = ' ';
   fputs(buf, stdout);
   }
   }
 
   return EXIT_SUCCESS;
 }
 
 
 
 
 
 Note that compiling with -Wall (always a good option) doesn't
 show any warning.
 
 
 
 I read my advices again... makes me sound so old! :-)
 
 
 
 -- 
 Polytropon
 From Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 2.41a 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: UTF-8 file + console

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 12:48:19 Maciej Milewski wrote:
 Tuesday 31 March 2009 12:15:33 Paul B. Mahol napisał(a):
  On 3/31/09, Thomas Dickey dic...@radix.net wrote:
   On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
   On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
Hi,
   
I have php application in UTF-8 on server
(in files are 4 languages: PL, SK, CZ and EN).
   
Is there any chance to edit this files on console?
Or should I edit files in Linux/Mac/Win editor with
UTF support and upload then to server?
  
   You can edit them inside vim, but they will not be
   displayed correctly.
  
   That might be a configuration issue rather than the program.
   (EN in particular ;-)
 
  Generally speaking FreeBSD console doesnt support UTF-8. So even if
  program (in this case vim) supports UTF-8 it will not work.

 What about editing with vim and setting manualy fileencoding=utf8?
 Next time you open this file vim should know that it is utf8 file or am I
 wrong?

To be absolutely clear:
the FreeBSD console does not support UTF-8, so if you're sitting at the box it 
will not work. For one there is no font for unicode, for two, the tty code 
does at present not know how to translate the characters into screen output 
even if there was a font. Work is being done for this, though.

If you're ssh'd into the box using an xterm or variant on your desktop, 
anything is possible as rendering the characters is the client's 
responsibility.
-- 
Mel
___
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


SiI 3114 SATA150 controller the proper way to find if RAID is supported.

2009-03-31 Thread Dimiter Ivanov
Hello, i have a Silicon Image SATA controler, which is identified as:
SiI 3114 SATA150 controller

It has 4 ports, and supports RAID.
I configured the RAID trough the BIOS, but FreeBSD 7.1, does not see
the RAID arrays, only 4 separate disks.

I searched the mailing lists, and there are few messages saying that
the RAID setup of this controller is not supported.

Only those messages are 3-5 years old.
I want to know where can I find a definite information, if this
feature is supported 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: Why?? (prog question)

2009-03-31 Thread Oliver Fromme
Josh Carroll wrote:
  [...]
  Note also that your main should have an int return type and should
  return a value.

His main() function _did_ have an int return type (it
wasn't declared to be void), but of course it's better
style to write int explicitly.

By the way, FreeBSD's style(9) recommends to write the
function return type on a separate line and begin the
function name on column 1, like this:

int
main (int argc, char *argv[])
{
...
}

The clear advantage is that you can easily grep for the
definition of a particular function in a bunch of source
files:  grep '^main' *.c

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

Perl is worse than Python because people wanted it worse.
-- Larry Wall
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Oliver Fromme
Chris Rees utis...@googlemail.com wrote:
  2009/3/31 Wojciech Puchar woj...@wojtek.tensor.gdynia.pl:
   
   IMHO this background fsck isn't good idea at all
  
  Why?

Google background fsck damage.

I was bitten by it myself, and I also recommend to turn
background fsck off.  If your disks are large and you
can't afford the fsck time, consider using ZFS, which
has a lot of benefits besides not requiring fsck.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

With Perl you can manipulate text, interact with programs, talk over
networks, drive Web pages, perform arbitrary precision arithmetic,
and write programs that look like Snoopy swearing.
___
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: Issues with OpenLDAP 2.4.15 and FreeBSD 8.0-CUrrent as well as with FreeBSD 7.2-PRE using DB 4.7

2009-03-31 Thread Thierry Lacoste

 First I see on all FreeBSD flavours (7.2 and 8.0) a coredump of LDAP
 clients when doing ldapsearch, ldappasswd. The client performs  
well, but

 at the end it terminates with some SIG 11.
http://www.mail-archive.com/openldap-softw...@openldap.org/msg15161.html

Regards,
Thierry

___
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 7 and 2 monitors

2009-03-31 Thread M. Vale
Hi, I have 2 monitors (20 Asus) with a Radeon X1600/X1650 PRO configure
with xrand and everything works ok.

The resolution I'm using right now is 3360x1050.

Now I've a brand new Asus 24 (MK241H), and  I can use this monitor with the
other asus.

My configuration now is 1 monitor 24 Asus and another one 20, but xrand
cant use this to make one desktop :(

Do you have any solutions or recomendations in how to put this 2 monitors
working.

one monitor max resolution is 1920 x 1200 (24) and the other Asus 1680 x
1050 (20).

Best Regards

Mauro V.
___
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: Why?? (prog question)

2009-03-31 Thread michael



Wojciech Puchar wrote:

Tabbing is the worst form of indentation.  It is *much* better to use
spaces consistently.




stupid discussion and off topic. everybody write code as he/she like, 
or as a team decided if it's not single person work.


only end result matters.

you know real programmers code everything on one line.
sub 
f...@s[$x,$...@s[($y+=$s[$x])%...@s,$x];$s[$x++]+$s[$...@s}@k=pop=~/../g;f$y+=hex$k[...@k]for@s=0..255;$x=1;$y=0;$/=\1;print$_^chr$s[f$...@s]for



___
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: FreeBSD 7 and 2 monitors

2009-03-31 Thread Neal Hogan
On Tue, Mar 31, 2009 at 11:36 AM, M. Vale maurov...@gmail.com wrote:

 Hi, I have 2 monitors (20 Asus) with a Radeon X1600/X1650 PRO configure
 with xrand and everything works ok.

 The resolution I'm using right now is 3360x1050.

 Now I've a brand new Asus 24 (MK241H), and  I can use this monitor with the
 other asus.

 My configuration now is 1 monitor 24 Asus and another one 20, but xrand
 cant use this to make one desktop :(


can we see your xorg.conf?




 Do you have any solutions or recomendations in how to put this 2 monitors
 working.

 one monitor max resolution is 1920 x 1200 (24) and the other Asus 1680 x
 1050 (20).

 Best Regards

 Mauro V.
 ___
 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




-- 
www.nealhogan.net  www.lambdaserver.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: guile-1.8.6 build core dumps (autoconf issue ?)

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 19:02:56 manish jain wrote:
 Mel Flynn wrote:
  On Tuesday 31 March 2009 08:15:56 manish jain wrote:
  Hi,
 
  I portsnapped the lastest tarball a couple of days back. Doing a build
 
  in lang/guile (1.8.6) core dumps with the following message :
  Making all in libguile
  gmake[2]: Entering directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' cd ..  /bin/sh
  ./config.status libguile/Makefile depfiles
  config.status: creating libguile/Makefile
  config.status: executing depfiles commands
  gmake[2]: Leaving directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' gmake[2]: Entering
  directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile' Generating
  libpath.h...
  sed  ./version.h.in  version.h.tmp \
  -e s:@-GUILE_MAJOR_VERSION-@:1: \
  -e s:@-GUILE_MINOR_VERSION-@:8: \
  -e s:@-GUILE_MICRO_VERSION-@:6:
  mv version.h.tmp version.h
  if [ no = yes ]; then \
cc -DHAVE_CONFIG_H  -I.. -I.. -I.. -c -o gen-scmconfig.o
  gen-scmconfig.c; \ else \
cc -DHAVE_CONFIG_H   -I.. -I.. -I.. -I/usr/local/include  -O2
  -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror -c -o
  gen-scmconfig.o gen-scmconfig.c; \ fi
  if [ no = yes ]; then \
cc -o gen-scmconfig gen-scmconfig.o; \
else \
/bin/sh ../libtool --tag=CC   --mode=link cc  -O2
  -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror 
  -L/usr/local/lib -o
  gen-scmconfig gen-scmconfig.o  -llthread -lgmp -lcrypt -lm -lltdl ; \
  fi libtool: link: cc -O2 -fno-strict-aliasing -pipe -Wall
  -Wmissing-prototypes -Werror -o gen-scmconfig gen-scmconfig.o
  -L/usr/local/lib -llthread /usr/local/lib/libgmp.so -lcrypt -lm
 
  vs mine:
  libtool: link: /usr/local/libexec/ccache/world-cc -O2
  -fno-strict-aliasing - pipe -Wall -Wmissing-prototypes -Werror -o
  gen-scmconfig gen-scmconfig.o  - L/usr/local/lib /usr/local/lib/libgmp.so
  -lcrypt -lm /usr/local/lib/libltdl.so -Wl,-rpath -Wl,/usr/local/lib
  -Wl,-rpath -Wl,/usr/local/lib
 
  Where does -llthread come from?

 Hi Mel,

 I can't really answer the question. I just ran 'make install clean'. I
 am attaching the log file, just in case you are able to spot something.

I think config.log is more helpful, as it would show LDFLAGS and detected 
threading library.
-- 
Mel
___
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: guile-1.8.6 build core dumps (autoconf issue ?)

2009-03-31 Thread Mel Flynn
On Tuesday 31 March 2009 19:30:59 manish jain wrote:
 Mel Flynn wrote:
  On Tuesday 31 March 2009 19:02:56 manish jain wrote:
  Mel Flynn wrote:
  On Tuesday 31 March 2009 08:15:56 manish jain wrote:
  Hi,
 
  I portsnapped the lastest tarball a couple of days back. Doing a build
 
  in lang/guile (1.8.6) core dumps with the following message :
  Making all in libguile
  gmake[2]: Entering directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' cd ..  /bin/sh
  ./config.status libguile/Makefile depfiles
  config.status: creating libguile/Makefile
  config.status: executing depfiles commands
  gmake[2]: Leaving directory
  `/usr/ports/lang/guile/work/guile-1.8.6/libguile' gmake[2]: Entering
  directory `/usr/ports/lang/guile/work/guile-1.8.6/libguile'
  Generating libpath.h...
  sed  ./version.h.in  version.h.tmp \
-e s:@-GUILE_MAJOR_VERSION-@:1: \
-e s:@-GUILE_MINOR_VERSION-@:8: \
-e s:@-GUILE_MICRO_VERSION-@:6:
  mv version.h.tmp version.h
  if [ no = yes ]; then \
  cc -DHAVE_CONFIG_H  -I.. -I.. -I.. -c -o gen-scmconfig.o
  gen-scmconfig.c; \ else \
  cc -DHAVE_CONFIG_H   -I.. -I.. -I.. 
  -I/usr/local/include  -O2
  -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror -c -o
  gen-scmconfig.o gen-scmconfig.c; \ fi
  if [ no = yes ]; then \
  cc -o gen-scmconfig gen-scmconfig.o; \
  else \
  /bin/sh ../libtool --tag=CC   --mode=link cc  -O2
  -fno-strict-aliasing -pipe -Wall -Wmissing-prototypes -Werror
  -L/usr/local/lib -o
  gen-scmconfig gen-scmconfig.o  -llthread -lgmp -lcrypt -lm -lltdl ; \
  fi libtool: link: cc -O2 -fno-strict-aliasing -pipe -Wall
  -Wmissing-prototypes -Werror -o gen-scmconfig gen-scmconfig.o
  -L/usr/local/lib -llthread /usr/local/lib/libgmp.so -lcrypt -lm
 
  vs mine:
  libtool: link: /usr/local/libexec/ccache/world-cc -O2
  -fno-strict-aliasing - pipe -Wall -Wmissing-prototypes -Werror -o
  gen-scmconfig gen-scmconfig.o  - L/usr/local/lib
  /usr/local/lib/libgmp.so -lcrypt -lm /usr/local/lib/libltdl.so
  -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib
 
  Where does -llthread come from?
 
  Hi Mel,
 
  I can't really answer the question. I just ran 'make install clean'. I
  am attaching the log file, just in case you are able to spot something.
 
  I think config.log is more helpful, as it would show LDFLAGS and detected
  threading library.

 Hi Mel,

 There sure is plenty in config.log to interest you. Attached is the log
 in zip format.

No mention of -llthread there. It links so I'm assuming you have 
devel/linuxthreads installed. Could you show:
make -C /usr/ports/lang/guild -V CONFIGURE_ENV -V CONFIGURE_ARGS

It must come from somewhere...Your environment and /etc/make.conf are free 
from LDFLAGS or LIBS according to config.log.

 Could you please clear up one question : do the freebsd-question forum
 rules allow attachments ? I am actually using 'Reply to sender' rather
 than 'Reply to all' because of this doubt.

On -questions attachments are stripped to the best of my knowledge.
-- 
Mel
___
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: UTF-8 file + console

2009-03-31 Thread Thomas Dickey
On Tue, Mar 31, 2009 at 12:15:33PM +0200, Paul B. Mahol wrote:
 On 3/31/09, Thomas Dickey dic...@radix.net wrote:
  On Tue, Mar 31, 2009 at 11:36:32AM +0200, Paul B. Mahol wrote:
  On 3/31/09, Arek Czereszewski a...@wup-katowice.pl wrote:
   I have php application in UTF-8 on server
   (in files are 4 languages: PL, SK, CZ and EN).
...
  That might be a configuration issue rather than the program.
  (EN in particular ;-)
 
 Generally speaking FreeBSD console doesnt support UTF-8. So even if
 program (in this case vim) supports UTF-8 it will not work.

There's two parts: does the editor knows how to manipulate UTF-8,
and does the terminal display UTF-8.  If the editor knows that the
terminal doesn't display UTF-8, it can choose a representation that
works for the terminal (even if it happens to be FreeBSD's console).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgpQfDBDBE3Pg.pgp
Description: PGP signature


Re: Why?? (prog question)

2009-03-31 Thread Bruce Cran
On Tue, 31 Mar 2009 11:21:22 +0200
Polytropon free...@edvax.de wrote:

 4. Use the predefined return codes, don't hardcode them.
FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
maximum compatibility (such as with Linux). There are
more exit codes for differentiation, but they're specific
to FreeBSD, as far as I know.

Linux seems to have adopted sysexits.h too, which provides error codes
such as EX_USAGE and EX_CANTCREAT. However, in FreeBSD at least the most
common programming style is to use 1 for error and 0 for success - e.g.
from style(9):

errx(1, number overflowed);

-- 
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: analyzing httpd-error.log

2009-03-31 Thread Roger Olofsson



Charles Howse skrev:


On Mar 28, 2009, at 11:51 PM, Olivier Nicole wrote:


Hi,


Webalizer is doing what it's supposed to with httpd-access.log, but
when I give it the error log to process is coughs, spits and spills
out errors with no data processed.  My research hasn't turned up a
good solution for webalizer and -error.log.


The format of error log is pretty much different from the format of
transfer log. No wonder webalizer is not liking it. You may have to
write your own format for th error log.


Well, can anyone suggest a port that will parse the error.log and output 
it to a web page that's easy to read?


Also, in httpd.conf what level of detail should I set in the error.log 
to get the most information.  It's currently set to 'warn', which I 
understand to be 'warn' and everything more critical than that.  I don't 
care about the size of the log, or the amount of garbage per line.

___
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 Charles,

I don't know if this will help you but try looking at Lire (logreport.org).

For just collecting and web-based viewing phplogcon from 
www.phplogcon.org can be used.


/R
___
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: Question about forcing fsck at boottime

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 18:57:21 +0200 (CEST), Oliver Fromme 
o...@lurza.secnetix.de wrote:
 Google background fsck damage.
 
 I was bitten by it myself, and I also recommend to turn
 background fsck off.  If your disks are large and you
 can't afford the fsck time, consider using ZFS, which
 has a lot of benefits besides not requiring fsck.

You can always ask yourself: What is more important, the
boot-up time or my data? In any case, I'd recommend to
emphasize the importance of the data, so even with larger
UFS disks, it's okay to wait a bit, but then be sure that
nothing is damaged.

Furthermore, I agree with the recommendation of ZFS. If your
hardware is good enough (which shouldn't be a problem today),
ZFS handles possible data damages much better and faster.



-- 
Polytropon
From 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


too many video drivers

2009-03-31 Thread Tsu-Fan Cheng
Hi,
   I am rebuilding ports and realize that i have too many input/video
drivers for x-win installed. i know i need nv driver since my graphic
card is from nvidia, and i want to deinstall all others. but i am not
sure if its safe to do so, e.g. i am confused by xf86-video-chips
since i don't know what kind of chip that stands for. can someone
tell me which are basics and which are safe to remove? thanks!!

TFC
___
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: SiI 3114 SATA150 controller the proper way to find if RAID is supported.

2009-03-31 Thread Vincent Hoffman
On 31/3/09 16:58, Dimiter Ivanov wrote:
 Hello, i have a Silicon Image SATA controler, which is identified as:
 SiI 3114 SATA150 controller

 It has 4 ports, and supports RAID.
 I configured the RAID trough the BIOS, but FreeBSD 7.1, does not see
 the RAID arrays, only 4 separate disks.

 I searched the mailing lists, and there are few messages saying that
 the RAID setup of this controller is not supported.

 Only those messages are 3-5 years old.
 I want to know where can I find a definite information, if this
 feature is supported now?
   
The 3114 is a fakeraid controller (FreeBSD call it ataraid, linux
calls it dmraid,) all the processing is still done by the CPU so no gain
over using software RAID.  I've never used it but man 4 ataraid for
driver details.


Vince


 ___
 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: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 19:20:17 +0100, Bruce Cran br...@cran.org.uk wrote:
 Linux seems to have adopted sysexits.h too, which provides error codes
 such as EX_USAGE and EX_CANTCREAT.

Good to know this, thanks. I'm not a big Linux user and a much
smaller Linux programmer (read: I don't program for Linux), so
I wasn't aware that they use it, too.



 However, in FreeBSD at least the most
 common programming style is to use 1 for error and 0 for success - e.g.
 from style(9):
 
 errx(1, number overflowed);

This matches the definition of the two EXIT_* variables in
the standard library header file:

% grep EXIT /usr/include/stdlib.h 
#define EXIT_FAILURE1
#define EXIT_SUCCESS0

It's no problem to use 0 and 1, but personally, I think the
verbose reason is better to read. :-)



And thanks for the pointer to man 9 style, I see that I've
practiced a quite good style over the years without even
knowing it. :-)

-- 
Polytropon
From 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


Re: Why?? (prog question)

2009-03-31 Thread Polytropon
On Tue, 31 Mar 2009 08:54:17 -0700, Gary Kline kl...@thought.org wrote:
  1. Use the tab character for indentation. You can set its
 length with your favourite editor (e. g. mcedit: F9,
 Options, General; joe: ^TD). Don't waste with spaces.
 
   Ja, been doing this since 1978.  Does anybody hit space-key 
   8 times!?

I've seen corporate guideline for indentation = 10 spaces.
Used ^TD8 and then finally replace tab - '  '. :-)



  2. The main() function should be declared as
  int main(int argc, char *argv[])
 or
  int main(int argc, char **argv)
 Note that it's returning (int). Use this functionality.
 
   I've come to prefer the *char argv[] ...  I didn't use the formal int
   return because this was supposed throwaway code.  (Going on years now
   tho, so ... my-bad.)

The standard assumption of the return code is (int), so if
it's not declared, it's (int) anyway.



  4. Use the predefined return codes, don't hardcode them.
 FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
 maximum compatibility (such as with Linux). There are
 more exit codes for differentiation, but they're specific
 to FreeBSD, as far as I know.
 
   This I did not know.  I have a prefab include file with a bunch 
   of my own similar #defines.  Wow, great!

FreeBSD defines additional exit codes to specify the reason for
exiting more precisely in /usr/include/sysexits.h - for your
example, exit(EX_USAGE); would be a good exit code.

I don't know how far this is adopted in Linux, but I think you
can only use the C99 two standard return codes.

From man 3 exit:
 The C Standard (ISO/IEC 9899:1999 (``ISO C99'')) defines the values 0,
 EXIT_SUCCESS, and EXIT_FAILURE as possible values of status. 



  5. This is highly debatable: Use a good style for { and }.
  
 
   Well, you're using the KR { }; but for me, the Ingres
   style [[ yes, it was invented by someone else ]] gets my vote.
   I scan
   {
 and
   }
 
   more easily.  6 of one, half-dozen of another... .

In fact, I'm sticking to the concept that only the highest level
of code groupers deserve a new line {: these are functions in
C and class methods in C++. Everything else has the { appended
(after a space) to the construct that causes the {. So if you find
a }, you only need to look up. It's obvious that a } is caused
by a {, but you want to know the construct that made it appear,
for example if(), while(), a struct definition or something similar.
With this concept at hand, looking up will make you find this
construct in question at the first glance.

You could see this in the example.

But as we'll all agree, this is a thing of individual preference.


  Here is the program again, with some stylistic modifications
  and the correct (read: recommended, usual) exit code handling:
 
   I'll swipe this.  I use this code with openoffice and abiword
   because I compose with vi;  but I almost always forget to run 
   my text thru joinlines and have to quit the word processor, run
   jlines foo bar; mv bar foo; then restart the word processor.
   I figure that I've spend several centuries of my lifetime messing 
   with jlines, so i'm overdue for doing it right

I think OpenOffice has the function Input - from file (at least
the german version has: Alt-E D = Einfügen Datei). This makes it
easier to incorporate text from an external file.


-- 
Polytropon
From 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


Re: too many video drivers

2009-03-31 Thread John Nielsen
On Tuesday 31 March 2009 03:08:14 pm Tsu-Fan Cheng wrote:
I am rebuilding ports and realize that i have too many input/video
 drivers for x-win installed. i know i need nv driver since my graphic
 card is from nvidia, and i want to deinstall all others. but i am not
 sure if its safe to do so, e.g. i am confused by xf86-video-chips
 since i don't know what kind of chip that stands for. can someone
 tell me which are basics and which are safe to remove? thanks!!

Obviously you should keep mouse, keyboard and whatever driver(s) you 
actually plan to use (nv in this case). It's also a good idea to keep 
vesa as a fallback option. I habitually also keep the dummy driver though 
I'm not sure what it's used for. Everything else is fair game and should 
be safe to remove. Chips is (or was) a video card vendor so if you 
don't have such a card it's safe to remove as well.

JN

___
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: Recovering a GEOM RAID0 array

2009-03-31 Thread Ivan Voras
Juan Miscaro wrote:


 # dd if=/dev/ad3 of=ad3last count=1 skip=625142447
 # hd ad3last


 
 Thanks for that great explanation.
 
 The file ad3last.txt is attached.

...
  24 47 41 46 52 10 41 08  00 00 00 00 00 00 00 00
|$GAFR.A.|
0010  00 00 00 00 00 00 00 00  00 00 6f e2 42 25 00 00
|..o¿B%..|
...

If this is the last sector of ad3, it certainly doesn't contain
GEOM_STRIPE metadata, for whatever reasons.

If this is really the right drive, you might try creating a temporary
stripe array (with gstripe create instead of gstripe label of these
two drives) and try running dumpfs on the array (or specifically
partitions with UFS file systems on the array). If it finds the file
system(s), run fsck on them. If it also passes, then delete this array
and create it again with gstripe label to make it permanent. If dumpfs
and/or fsck fail, you have at this point no way to reclaim your data.



signature.asc
Description: OpenPGP digital signature


Re: Why?? (prog question)

2009-03-31 Thread Giorgos Keramidas
On Tue, 31 Mar 2009 13:59:16 +0200, Polytropon free...@edvax.de wrote:
 When I would compare both indentation forms, I'd say that tabbing
 is the better form because

  + you can set your individually preferred tab with using the
settings of your editor, be it 1, 4 or 8,

I like using TAB for indentation too, but when I see people setting TAB
to a different size than 8 it makes me want to swear.  There is a TAB
size and an 'indentation level' size.  These should be kept separate,
and any modern editor will do it just fine!

It is a bit amusing that nobody has answered the original question so
far 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


Re: too many video drivers

2009-03-31 Thread Adam Vandemore

Tsu-Fan Cheng wrote:

Hi,
   I am rebuilding ports and realize that i have too many input/video
drivers for x-win installed. i know i need nv driver since my graphic
card is from nvidia, and i want to deinstall all others. but i am not
sure if its safe to do so, e.g. i am confused by xf86-video-chips
since i don't know what kind of chip that stands for. can someone
tell me which are basics and which are safe to remove? thanks!!

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

  
Depending on what versions of things you use the nvidia-driver port and 
/usr/ports/x11-drivers/xf86-video-nouveau may be replacements for the nv 
driver.  Honestly I'm not really sure what the xf86-video-chips
port does, but I don't think it's related to nvidia and is perhaps for 
older video chipsets.


Something like pkg_cutleaves but you should be very careful using it.


--
Adam Vandemore
Systems Administrator
IMED Mobility
(605) 498-1610

___
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: Why?? (prog question)

2009-03-31 Thread Gary Kline
On Tue, Mar 31, 2009 at 07:50:22AM -0400, William Gordon Rutherdale wrote:
 This isn't a BSD question.  It's just about elementary C.  As other 
 people pointed out, you could have easily caught it anyway just by 
 turning on warnings.
 
 -Will
 

yep, you're right.  i did have gcc aliased to gcc -Wall; but 
somehow it got lost.  It's back.

gary

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
http://jottings.thought.org   http://transfinite.thought.org
The 2.41a 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: analyzing httpd-error.log

2009-03-31 Thread Oliver Fromme
The problem with Apache's error.log is that there is no
standard format.  Error messages generated by Apache
itself are somewhat standardized, but messages from
third-party modules are not.  All kind of things will
end up in the error.log, including stuff written to
stdout by CGI programs, such as perl error messages,
exception traces from Python programs (usually multiple
lines each), and so on.

There is no simple way to reliably parse and analyze all
of that completely automatically.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

If you think C++ is not overly complicated, just what is a protected
abstract virtual base pure virtual private destructor, and when was the
last time you needed one?
-- Tom Cargil, C++ Journal
___
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: Question about forcing fsck at boottime

2009-03-31 Thread RW
On Tue, 31 Mar 2009 17:36:32 +0200
Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:

 On Tuesday 31 March 2009 14:24:11 RW wrote:
  On Tue, 31 Mar 2009 08:15:54 +0200
 
  Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net wrote:
somebody please point me in the right direction ?
  
   fsck -p is done by default (meaning, filesystems are not fully
   scanned if they are marked clean). If pruning fails,
   background_fsck is checked, which will work on UFS systems with
   soft updates, but is not recommended by many as it may leave some
   errors unchecked.
 
  I don't think that's quite right,  fsck -p is only done if
  background_fsck=NO, otherwise an fsck -pF is done instead. The
  latter does an fsck -p on filesystems that aren't eligible for
  background checking - usually root and any none UFS filesystems.
 
 As far as I can tell, -F -p skips clean disks (-p) and defers to
 background when possible, though the manpage doesn't exclude your or
 my theory. ENOTIME to check the source.

I wouldn't dispute that clean filesytems are skipped, it's just that you
seemed to be implying that every filesystem gets a foreground fsck -p. 
___
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: Why?? (prog question)

2009-03-31 Thread Gary Kline
On Tue, Mar 31, 2009 at 09:01:42PM +0200, Polytropon wrote:
 On Tue, 31 Mar 2009 08:54:17 -0700, Gary Kline kl...@thought.org wrote:
   1. Use the tab character for indentation. You can set its
  length with your favourite editor (e. g. mcedit: F9,
  Options, General; joe: ^TD). Don't waste with spaces.
  
  Ja, been doing this since 1978.  Does anybody hit space-key 
  8 times!?
 
 I've seen corporate guideline for indentation = 10 spaces.
 Used ^TD8 and then finally replace tab - '  '. :-)
 
(sounds like corp. mentality... )

 
 
   2. The main() function should be declared as
 int main(int argc, char *argv[])
  or
 int main(int argc, char **argv)
  Note that it's returning (int). Use this functionality.
  
  I've come to prefer the *char argv[] ...  I didn't use the formal int
  return because this was supposed throwaway code.  (Going on years now
  tho, so ... my-bad.)
 
 The standard assumption of the return code is (int), so if
 it's not declared, it's (int) anyway.
 

sure; and the code i've been writing as prefab'd C is 
as clean and explicit as i can make it.   difft with 
throwaway stuff.  [ may need to rethink that!]

 
 
   4. Use the predefined return codes, don't hardcode them.
  FreeBSD has EXiT_SUCCESS and EXIT_FAILURE, they're for
  maximum compatibility (such as with Linux). There are
  more exit codes for differentiation, but they're specific
  to FreeBSD, as far as I know.
  
  This I did not know.  I have a prefab include file with a bunch 
  of my own similar #defines.  Wow, great!
 
 FreeBSD defines additional exit codes to specify the reason for
 exiting more precisely in /usr/include/sysexits.h - for your
 example, exit(EX_USAGE); would be a good exit code.
 
 I don't know how far this is adopted in Linux, but I think you
 can only use the C99 two standard return codes.
 
 From man 3 exit:
  The C Standard (ISO/IEC 9899:1999 (``ISO C99'')) defines the values 0,
  EXIT_SUCCESS, and EXIT_FAILURE as possible values of status. 
 
 
 
   5. This is highly debatable: Use a good style for { and }.
   
  
  Well, you're using the KR { }; but for me, the Ingres
  style [[ yes, it was invented by someone else ]] gets my vote.
  I scan
  {
and
  }
  
  more easily.  6 of one, half-dozen of another... .
 
 In fact, I'm sticking to the concept that only the highest level
 of code groupers deserve a new line {: these are functions in
 C and class methods in C++. Everything else has the { appended
 (after a space) to the construct that causes the {. So if you find
 a }, you only need to look up. It's obvious that a } is caused
 by a {, but you want to know the construct that made it appear,
 for example if(), while(), a struct definition or something similar.
 With this concept at hand, looking up will make you find this
 construct in question at the first glance.
 

it really is what you're used to.  somehow, several weeks ago, a
function just would not behave, and after close to an hour of
using vi's showmatch, i discovered that i was missing one 
closing brace.  *mumble*


 You could see this in the example.
 
 But as we'll all agree, this is a thing of individual preference.
 
 
   Here is the program again, with some stylistic modifications
   and the correct (read: recommended, usual) exit code handling:
  
  I'll swipe this.  I use this code with openoffice and abiword
  because I compose with vi;  but I almost always forget to run 
  my text thru joinlines and have to quit the word processor, run
  jlines foo bar; mv bar foo; then restart the word processor.
  I figure that I've spend several centuries of my lifetime messing 
  with jlines, so i'm overdue for doing it right
 
 I think OpenOffice has the function Input - from file (at least
 the german version has: Alt-E D = Einfügen Datei). This makes it
 easier to incorporate text from an external file.
 
thanks for the datapoint; i'll check.  i type virtually all text
in vi just because my fingers know it.  (i've been in openoffice
and found myself hitting the escape key or / to search ... 
and other vi-isms. :)

gary

 
 -- 
 Polytropon
 From 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 2.41a release of Jottings: http://jottings.thought.org/index.php

___
freebsd-questions@freebsd.org mailing list

going from cvs to svn

2009-03-31 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I've finally decided that it's way past time that I switched from using cvs for
my home archive (currently /home/ncvs) to using subversion.  I'm trying to hunt
down a web page that might give a set of rules to help moving things.  I've
spent about the last 90 minutes on Google, can't find what I'm after.

I'm NOT asking for answers here, just the URL of what to read, but I'm going to
give a couple of questions, just to you see what I'm after.  I'm not after
answers here, I want to read it myself if it's at all possible.

Stuff like, can I use my present cvsup-fetched /home/ncvs with svn?  I didn't
see any way to check out an svn-specific archive in all the stuff I read, like
the FreeBSD handbook.  Can I use my present set of checkouts, or must I delete
them and do new checkouts with svn?  Are the URLs for cvsup listed in the
handbook still correct (they haven't changed there in years now).

That's it, I'd really like to see if the answers are available to be read in an
FAQ somewhere, but if they're not listed, well then I guess I would appreciate
the answers.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknSeyUACgkQz62J6PPcoOnrQgCeM/R7CPcd/nW7Jen6cHCIiGSA
QJYAn1t6KI6ig3dYNJ7jhivUjxUSHJ54
=SHPN
-END PGP SIGNATURE-
___
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: too many video drivers

2009-03-31 Thread rasz

John Nielsen wrote:

On Tuesday 31 March 2009 03:08:14 pm Tsu-Fan Cheng wrote:
  

   I am rebuilding ports and realize that i have too many input/video
drivers for x-win installed. i know i need nv driver since my graphic
card is from nvidia, and i want to deinstall all others. but i am not
sure if its safe to do so, e.g. i am confused by xf86-video-chips
since i don't know what kind of chip that stands for. can someone
tell me which are basics and which are safe to remove? thanks!!



Obviously you should keep mouse, keyboard and whatever driver(s) you 
actually plan to use (nv in this case). It's also a good idea to keep 
vesa as a fallback option. I habitually also keep the dummy driver though 
I'm not sure what it's used for. Everything else is fair game and should 
be safe to remove. Chips is (or was) a video card vendor so if you 
don't have such a card it's safe to remove as well.


JN

___
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

  
also, once you removed/kept what you want, don't forget to reinstall 
xorg-drivers port (meta-port).
i think you get complains about missing dependencies otherwise. (rebuild 
xorg-drivers with just the drivers you want)

___
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: going from cvs to svnq

2009-03-31 Thread Andrew Wright


On Tue, 31 Mar 2009, Chuck Robey wrote:


I've finally decided that it's way past time that I switched from using cvs for
my home archive (currently /home/ncvs) to using subversion.  I'm trying to hunt
down a web page that might give a set of rules to help moving things.  I've


It appears that you may be labouring under the assumption that
svn is a potential _client_ replacement that will read a CVS repo.

It doesn't do this.

You can convert a repository using the tools available at:
http://cvs2svn.tigris.org/
but afterwards you are using svn exclusively -- there is no ability
to mix and match.  After the conversion, both client and server
tools will change.

The primary advantage of using svn is that the _server_ uses a
different protocol to track objects.  Directory management, for
instance, is a track-able change, as opposed to the CVS strategy
of directory management through side effect.



Stuff like, can I use my present cvsup-fetched /home/ncvs with svn?  I didn't


No - if you have fetched a directory using cvsup, then it is a CVS
workspace, and will remain that way.  If the server managing a repo
is using CVS, you will use a CVS client to access it

If you are managing a repo you wish to convert to svn, then the
link above will help you do it.  At the time of such a conversion,
all currently-checked-out CVS workspaces will be orphaned.

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


ftp with .... ?

2009-03-31 Thread Vasadi I. Claudiu Florin


Hello guys,

Here's the deal:
I have a samba server on a FreeBSD 7.1-STABLE running with mod-acl (or  
whatever it's called). The folder it is connected to (let's call it  
share) has acl enabled. Thus all data written with samba (from my xp  
box) automagicly inharits permision of parent folder (root:wheel). Perfect  
till now.


This is were the catch catches up. I also want ftp access to that folder  
(a master ftp account that only I will know) but also want it with acl  
features; I mean all files written by/through ftp will (or must) have  
inherited parent directory permisions, leaving samba full permisions over  
files/folder in that directory (as stated by acl).


Here's the curent setup
the share folder (actually /mnt)
# file: /mnt/
# owner: root
# group: wheel
user::rwx
user:smbadmin:rwx
user:ftpadmin:rwx
group::---
mask::rwx
other::---

As you can see, the owner is root:wheel. The samba master acount is  
smbadmin with rwx privileges.
Now, I wish to employ another username, also with rwx privileges, for a  
master ftp account (say ftpadmin), but all files writen by this user  
*will* eventually end up on disk as root:wheel, not ftpadmin:group.


What I've done so far.
Read a bit about chmod +s and by chmod g+s managed to ensure that  
whoever writes files to that folder, end up belonging to wheel group.  
Didn't manage on the other hand to employ the same thing for the user.  
Files are owned by ftpadmin


Of course I could add these accounts into one big group, but then, were  
would all the fun be ? :)
And also, I would have a terrible time when say another ftp user would be  
required to have some sort or acces but diferent from that group I  
previously mentioned (say r--).


Now, from what I tinkered about I need some sort of control agent  
between the actual ftp and the disk (something similar to mod-acl of samba  
maybe?) or force the files that are to be written to disk to change theyre  
usr:group by some chmod-similar manner.



Please point me in the right direction. A link, an ideea ... something. Am  
capable of doing it myself, no need for please do this for me..nono.


So ?
___
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


Mythtv-0.21 build error

2009-03-31 Thread Mark Busby

uname -a FreeBSD muz.sbcglobal.net 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  
1 14:37:25 UTC 2009 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC 
 i386

portsnap is up to date.

Building myth-0.21 throws this error,

creating usr/local
creating usr/local/lib
creating usr/local/lib/python2.5
creating usr/local/lib/python2.5/site-packages
creating usr/local/lib/python2.5/site-packages/MythTV
copying build/lib/MythTV/MythLog.py - 
usr/local/lib/python2.5/site-packages/MythTV
copying build/lib/MythTV/MythDB.py - 
usr/local/lib/python2.5/site-packages/MythTV
copying build/lib/MythTV/MythVideo.py - 
usr/local/lib/python2.5/site-packages/MythTV
copying build/lib/MythTV/MythTV.py - 
usr/local/lib/python2.5/site-packages/MythTV
copying build/lib/MythTV/__init__.py - 
usr/local/lib/python2.5/site-packages/MythTV
byte-compiling usr/local/lib/python2.5/site-packages/MythTV/MythLog.py to 
MythLog.pyc
byte-compiling usr/local/lib/python2.5/site-packages/MythTV/MythDB.py to 
MythDB.pyc
byte-compiling usr/local/lib/python2.5/site-packages/MythTV/MythVideo.py to 
MythVideo.pyc
byte-compiling usr/local/lib/python2.5/site-packages/MythTV/MythTV.py to 
MythTV.pyc
byte-compiling usr/local/lib/python2.5/site-packages/MythTV/__init__.py to 
__init__.pyc
running install_egg_info
Writing usr/local/lib/python2.5/site-packages/MythTV-0.21-py2.5.egg-info
gmake[2]: Leaving directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/bindings/python'
gmake[1]: Leaving directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/bindings'
( [ -d config ]  cd config ; gmake -f Makefile install; ) || true
gmake[1]: Entering directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/config'
gmake[1]: `install' is up to date.
gmake[1]: Leaving directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/config'
cp: 
/usr/ports/multimedia/mythtv/work/mythtv-0.21/programs/mythtv-setup/mythtv-setup:
 No such file or directory
*** Error code 1

Stop in /usr/ports/multimedia/mythtv.
*** Error code 1

Stop in /usr/ports/multimedia/mythtv.

muz# cd /usr/ports/multimedia/mythtv/work/mythtv-0.21/programs/mythtv-setup
muz# ls
Makefilebackendsettings.o   main.cpp
backendsettings.cpp checksetup.cpp  main.o
backendsettings.cpp.origchecksetup.hmythtv-setup.pro
backendsettings.h   checksetup.osetup.xml
muz#

Thanks for all your work on this port.
___
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: Mythtv-0.21 build error

2009-03-31 Thread Mark Busby




--- On Tue, 3/31/09, Vasadi I. Claudiu Florin claudiu.vas...@gmail.com wrote:

 From: Vasadi I. Claudiu Florin claudiu.vas...@gmail.com
 Subject: Re: Mythtv-0.21 build error
 To: redt...@sbcglobal.net
 Date: Tuesday, March 31, 2009, 4:18 PM
 On Wed, 01 Apr 2009 00:16:26 +0300, Mark Busby
 redt...@sbcglobal.net wrote:
 
  mythtv-setup
 
 
 find / -type f -name mythtv-setup -print
 
 does it find any files ?

None are found.
___
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: Mythtv-0.21 build error

2009-03-31 Thread Vasadi I. Claudiu Florin

This is what I would do if I were you:

0.1) do a cvsup (or whatever) so the ports are up to date and:
1) try a make deinstall;make clean;make distclean;make build (and if the  
file is present do a make install)

if that doesn't work
2) (workaround) download from the web a source code, compile it and:
  2.a) copy the file in the work dir of the ports and do make install  
(this requires a make build be made)

or
  2.b) install it from that package

!!! REMEMBER !!!
if step 1 fails write a mail to the maintainer of the port with the error  
specifiyng the output of the uname -a, the output of ls /var/db/pkg and  
the error you encountered, and also what you did to solve the problem  
(usually the workaround).





dunno why I seem to missed another way of solving this. Suddenly forgot  
it... happens once in a whille. Will e-mail it to you if/when I remember it

___
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


Xeon Quad with 9 GB RAM - only 4 GB detected

2009-03-31 Thread Matej Šerc
Hi all,

I am just trying to install FreeBSD 7.1 amd64 distro on the HP ML 150 G5
server and when booting, BIOS detects 9 GB of RAM, but when starting to
install the system it is displayed that only 4 GBs are detected. Also the
default swap partition size is 4 GB ... What would be the needed steps to
enable FreeBSD using the entire memory in the machine?

Thank you in advance for your time,
Matej
___
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: Mythtv-0.21 build error

2009-03-31 Thread Mark Busby

After doing make clean, and restarting the build of mythtv-0.21 port.

This is the error on make install

l-dtor -D__STDC_CONSTANT_MACROS -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -DPREFIX=\/usr/local\ -DLIBDIR=\/usr/local/lib\ 
-DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG 
-I/usr/local/share/qt/mkspecs/freebsd-g++ -I. 
-I../../../../../../../local/include -I../../../../../../../local/include 
-I../libmyth -I../.. -I.. -I../../../../../../../local/include 
-I/usr/local/include -o moc_myththemedmenu.o moc_myththemedmenu.cpp
/usr/local/bin/moc mythdialogbox.h -o moc_mythdialogbox.cpp
g++ -c -pipe -march=pentiumpro -fomit-frame-pointer -O3 -g -Wall -Wno-switch 
-Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor 
-D__STDC_CONSTANT_MACROS -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -DPREFIX=\/usr/local\ -DLIBDIR=\/usr/local/lib\ 
-DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG 
-I/usr/local/share/qt/mkspecs/freebsd-g++ -I. 
-I../../../../../../../local/include -I../../../../../../../local/include 
-I../libmyth -I../.. -I.. -I../../../../../../../local/include 
-I/usr/local/include -o moc_mythdialogbox.o moc_mythdialogbox.cpp
rm -f libmythui-0.21.so.0.21.0 libmythui-0.21.so libmythui-0.21.so.0 
libmythui-0.21.so.0.21
g++ -Wl,-rpath,/usr/local/lib  -Wl,-rpath,/usr/local/lib -pthread -shared 
-Wl,-soname,libmythui-0.21.so.0 -o libmythui-0.21.so.0.21.0 mythmainwindow.o 
mythpainter.o mythimage.o myththemebase.o mythpainter_qt.o xmlparsebase.o 
mythscreenstack.o mythscreentype.o mythgesture.o mythuitype.o mythuiimage.o 
mythuitext.o mythuistatetype.o mythlistbutton.o mythfontproperties.o 
mythuibutton.o myththemedmenu.o mythdialogbox.o mythuiclock.o 
moc_mythmainwindow.o moc_mythuitype.o moc_mythuibutton.o moc_mythlistbutton.o 
moc_myththemedmenu.o moc_mythdialogbox.o  -L/usr/local/lib -L/usr/local/lib 
-lqt-mt -lXext -lX11 -lm
ln -s libmythui-0.21.so.0.21.0 libmythui-0.21.so
ln -s libmythui-0.21.so.0.21.0 libmythui-0.21.so.0
ln -s libmythui-0.21.so.0.21.0 libmythui-0.21.so.0.21
gmake[2]: Leaving directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/libs/libmythui'
cd libmyth  qmake libmyth.pro -spec /usr/local/share/qt/mkspecs/freebsd-g++ 
-o Makefile
cd libmyth  gmake -f Makefile
gmake[2]: Entering directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/libs/libmyth'
g++ -c -pipe -march=pentiumpro -fomit-frame-pointer -O3 -g -Wall -Wno-switch 
-Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor 
-D__STDC_CONSTANT_MACROS -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -DPREFIX=\/usr/local\ -DLIBDIR=\/usr/local/lib\ 
-DUSING_OSS -DUSING_X11 -DUSING_XRANDR -DQT_NO_DEBUG -DQT_THREAD_SUPPORT 
-DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. 
-I../../../../../../../local/include -I../../../../../../../local/include 
-I../libmythsamplerate -I../libmythsoundtouch -I../libmythfreesurround 
-I../libavcodec -I../libavutil -I../.. -I.. -I. 
-I../../../../../../../local/include -I/usr/local/include -o audiooutput.o 
audiooutput.cpp
g++ -c -pipe -march=pentiumpro -fomit-frame-pointer -O3 -g -Wall -Wno-switch 
-Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor 
-D__STDC_CONSTANT_MACROS -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -DPREFIX=\/usr/local\ -DLIBDIR=\/usr/local/lib\ 
-DUSING_OSS -DUSING_X11 -DUSING_XRANDR -DQT_NO_DEBUG -DQT_THREAD_SUPPORT 
-DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. 
-I../../../../../../../local/include -I../../../../../../../local/include 
-I../libmythsamplerate -I../libmythsoundtouch -I../libmythfreesurround 
-I../libavcodec -I../libavutil -I../.. -I.. -I. 
-I../../../../../../../local/include -I/usr/local/include -o audiooutputbase.o 
audiooutputbase.cpp
In file included from audiooutputdigitalencoder.h:5,
 from audiooutputbase.cpp:19:
../../../../../../../local/include/libavcodec/avcodec.h:2353: warning: 
'ImgReSampleContext' is deprecated (declared at 
../../../../../../../local/include/libavcodec/avcodec.h:2347)
../../../../../../../local/include/libavcodec/avcodec.h:2363: warning: 
'ImgReSampleContext' is deprecated (declared at 
../../../../../../../local/include/libavcodec/avcodec.h:2347)
audiooutputbase.cpp: In member function 'virtual void 
AudioOutputBase::Reconfigure(int, int, int, bool, void*)':
audiooutputbase.cpp:360: error: 'codec_id_string' was not declared in this scope
gmake[2]: *** [audiooutputbase.o] Error 1
gmake[2]: Leaving directory 
`/usr/ports/multimedia/mythtv/work/mythtv-0.21/libs/libmyth'
gmake[1]: *** [sub-libmyth] Error 2
gmake[1]: Leaving directory `/usr/ports/multimedia/mythtv/work/mythtv-0.21/libs'
gmake: *** [sub-libs] Error 2
*** Error code 1

Stop in /usr/ports/multimedia/mythtv.
*** Error code 1

Stop in /usr/ports/multimedia/mythtv.
 
___
freebsd-questions@freebsd.org mailing list

Re: too many video drivers

2009-03-31 Thread mdh

--- On Tue, 3/31/09, Adam Vandemore amvandem...@gmail.com wrote:
 From: Adam Vandemore amvandem...@gmail.com
 Subject: Re: too many video drivers
 To: FreeBSD freebsd-questions@freebsd.org
 Date: Tuesday, March 31, 2009, 3:39 PM
 Tsu-Fan Cheng wrote:
  Hi,
 I am rebuilding ports and realize that i have too
 many input/video
  drivers for x-win installed. i know i need nv driver
 since my graphic
  card is from nvidia, and i want to deinstall all
 others. but i am not
  sure if its safe to do so, e.g. i am confused by
 xf86-video-chips
  since i don't know what kind of chip
 that stands for. can someone
  tell me which are basics and which are safe to remove?
 thanks!!
  
  TFC

 Depending on what versions of things you use the
 nvidia-driver port and
 /usr/ports/x11-drivers/xf86-video-nouveau may be
 replacements for the nv driver.  Honestly I'm not really
 sure what the xf86-video-chips
 port does, but I don't think it's related to nvidia
 and is perhaps for older video chipsets.

x11/nvidia-driver is the driver released by nvidia.  It doesn't work on 
architectures other than i386 and has some other limitations (breaks certain 
components of KDE4, for one other thing - see the 'black windows bug'.)  It 
does support 3d acceleration using the nvidia GPU, though.  

The x11-drivers/xf86-video-nv port is the open source Xorg driver for nvidia 
chipsets.  It doesn't support 3d acceleration using the GPU.  

Neither is a perfect solution, and the disparity has been an issue for years 
now...

- mdh



  
___
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: Why?? (prog question)

2009-03-31 Thread William Gordon Rutherdale

Polytropon wrote:

On Tue, 31 Mar 2009 07:48:00 -0400, William Gordon Rutherdale 
will.rutherd...@utoronto.ca wrote:
  
Tabbing is the worst form of indentation.  It is *much* better to use 
spaces consistently.



may I ask what exactly you mean by consistently? I've seen
various opinions about how many spaces make up one indentation level,
beginning from 1, over 4, up to 10. Where's the consistency, or is
it defined on a per-programmer basis?

  

Are you serious?  You set the standard on a given project.  You decide
whether you are using spaces or tabs.  If spaces, you decide how many
spaces per indent level.  You ask the programmers to submit code in that
format.  It doesn't jump around randomly from one line to the next.

You are trying to make it sound like a big problem, but it isn't.


And why is this much better?
  

Just my view based on years of experience.  Don't take it too seriously.


When I would compare both indentation forms, I'd say that tabbing
is the better form because
 + you can set your individually preferred tab with using the
   settings of your editor, be it 1, 4 or 8,
  

Why is this flexibility important?  The more important thing is to have
consistently indented code.  There is no great benefit in letting
different programmers see the code indented to different levels.  They
just want to be able to read it.


 + you can change the indentation while you're coding, e. g. when
   the indentation level makes the code exceed the right margin
   of your editor's window,
So what?  How many times have you actually done this in the past year? 
Be honest.



 + you need more keypressing to get through the indentation with
   the spaces, one keypress per space, while you only need one
   keypress per tab (which equals one indentation level),
  

Not true.  You set up your editor settings to automatically do this for
you.  Most editors have this capability.  On my editor (vim) it only
takes at most one keypress to indent.  You still might use the tab key,
or even have the editor automatically format for you based on syntax.
Editors have done this for decades.  Your objection is specious.


 + per indentation level only 1 byte is needed (tab = ASCII 9), while
   spacing requires more bytes, one per space (space = ASCII 32),
  

Are you telling me that in an age when most cheap user workstations have
hundreds of gigabytes of disk space, you need this kind of savings?
This is a *very* weak point.


 + while you can convert tabs into spaces, you cannot easily convert
   spaces back into tabs, and finally
  

Not true.  It is extremely easy to convert both directions.  The unix
'expand' command converts one direction, and 'unexpand' goes the reverse
direction.  These unix utilities have been around as long as 'cat' and 'ls'.

Moreover the whole point is moot anyway.  There are lots of high quality
code formatters available.  One called 'Artistic Style' is well known
and very capable.  On a lot of projects these days, people get sick of
these kinds of arguments and just run all the code they receive through
a code formatter like astyle.  It lets you set all kinds of options such
as brace placement, spacing between parameters, indentation method, and
so on.  If asking people to change their editor settings doesn't work,
this thing fixes it up.


 + even FreeBSD uses the tabbing style.

  

And therefore if I submit code for FreeBSD then I will use that format.
However I wouldn't recommend it for other projects where that decision
has not been established.


I'm aware that one can argue about where { is to be placed, but
I don't see any valid reason to use spaces for indentation instead
of tabs (which I would even call standard).

It's a honest question: What are your arguments for using tabs?
Hint: it is *much* better doesn't count. :-)

  

There are lots of cases where it's hard to make code line up the way you
want it with tabs.  Often code that looks good with one tab length
setting (say 8) doesn't look so good with another (say 4).  It gets
especially bad when there are a few space characters thrown in, which
people often do.

-Will


___
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: too many video drivers

2009-03-31 Thread Tim Judd
On Tue, Mar 31, 2009 at 4:53 PM, mdh mdh_li...@yahoo.com wrote:


 --- On Tue, 3/31/09, Adam Vandemore amvandem...@gmail.com wrote:
  From: Adam Vandemore amvandem...@gmail.com
  Subject: Re: too many video drivers
  To: FreeBSD freebsd-questions@freebsd.org
  Date: Tuesday, March 31, 2009, 3:39 PM
  Tsu-Fan Cheng wrote:
   Hi,
  I am rebuilding ports and realize that i have too
  many input/video
   drivers for x-win installed. i know i need nv driver
  since my graphic
   card is from nvidia, and i want to deinstall all
  others. but i am not
   sure if its safe to do so, e.g. i am confused by
  xf86-video-chips
   since i don't know what kind of chip
  that stands for. can someone
   tell me which are basics and which are safe to remove?
  thanks!!
  
   TFC
 
  Depending on what versions of things you use the
  nvidia-driver port and
  /usr/ports/x11-drivers/xf86-video-nouveau may be
  replacements for the nv driver.  Honestly I'm not really
  sure what the xf86-video-chips
  port does, but I don't think it's related to nvidia
  and is perhaps for older video chipsets.

 x11/nvidia-driver is the driver released by nvidia.  It doesn't work on
 architectures other than i386 and has some other limitations (breaks certain
 components of KDE4, for one other thing - see the 'black windows bug'.)  It
 does support 3d acceleration using the nvidia GPU, though.


I've got an nVidia at work (nvidia0: GeForce 7300 GS) with the above port
installed, with kde4.  No problems.  Been running for a couple weeks.

When was this bug announced?





 The x11-drivers/xf86-video-nv port is the open source Xorg driver for
 nvidia chipsets.  It doesn't support 3d acceleration using the GPU.

 Neither is a perfect solution, and the disparity has been an issue for
 years now...

 - mdh




 ___
 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: FreeBSD 7 and 2 monitors

2009-03-31 Thread User Wblock

On Tue, 31 Mar 2009, M. Vale wrote:


Hi, I have 2 monitors (20 Asus) with a Radeon X1600/X1650 PRO configure
with xrand and everything works ok.

The resolution I'm using right now is 3360x1050.

Now I've a brand new Asus 24 (MK241H), and  I can use this monitor with the
other asus.

My configuration now is 1 monitor 24 Asus and another one 20, but xrand
cant use this to make one desktop :(


Please post specifics.


Do you have any solutions or recomendations in how to put this 2 monitors
working.


Use xorg.conf instead of xrandr?


one monitor max resolution is 1920 x 1200 (24) and the other Asus 1680 x
1050 (20).


I have a 1920x1200 and 1024x768 dual monitors with an X1650 right here. 
Here's the xorg.conf:


Section ServerLayout
Identifier   X.org Configured
Screen   0  Screen0 0 0
Option   Blank Time 0
Option   Standby Time 0
Option   Suspend Time 0
Option   Off Time 0
EndSection

Section Files
ModulePath   /usr/local/lib/xorg/modules
FontPath /usr/local/lib/X11/fonts/misc/
FontPath /usr/local/lib/X11/fonts/TTF/
FontPath /usr/local/lib/X11/fonts/OTF
FontPath /usr/local/lib/X11/fonts/Type1/
FontPath /usr/local/lib/X11/fonts/100dpi/
FontPath /usr/local/lib/X11/fonts/75dpi/
FontPath /usr/local/lib/X11/fonts/bitstream-vera/
EndSection

Section DRI
Group 0
Mode  0660
EndSection

Section Monitor
Identifier   Monitor0
VendorName   HWP
ModelName2615
Option   PreferredMode 1920x1200
Option   Position 1024 0
Option   DPMS
EndSection

Section Monitor
Identifier   Monitor1
VendorName   PHL
ModelNamePhilips 150B3
Option   PreferredMode 1024x768
Option   Position 0 0
EndSection

Section Device
### Available Driver options are:-
### Values: i: integer, f: float, bool: True/False,
### string: String, freq: f Hz/kHz/MHz
### [arg]: arg optional
#Option NoAccel # [bool]
#Option SWcursor# [bool]
#Option Dac6Bit # [bool]
#Option Dac8Bit # [bool]
#Option BusType # [str]
#Option CPPIOMode   # [bool]
#Option CPusecTimeout   # i
#Option AGPMode # i
#Option AGPFastWrite# [bool]
#Option AGPSize # i
#Option GARTSize# i
#Option RingSize# i
#Option BufferSize  # i
#Option EnableDepthMoves# [bool]
#Option EnablePageFlip  # [bool]
#Option NoBackBuffer# [bool]
#Option DMAForXv# [bool]
#Option FBTexPercent# i
#Option DepthBits   # i
#Option PCIAPERSize # i
#Option AccelDFS# [bool]
#Option DDCMode # [bool]
#Option IgnoreEDID  # [bool]
#Option DisplayPriority # [str]
#Option PanelSize   # [str]
#Option ForceMinDotClock# freq
#Option ColorTiling # [bool]
#Option VideoKey# i
#Option RageTheatreCrystal  # i
#Option RageTheatreTunerPort# i
#Option RageTheatreCompositePort# i
#Option RageTheatreSVideoPort   # i
#Option TunerType   # i
#Option RageTheatreMicrocPath   # str
#Option RageTheatreMicrocType   # str
#Option ScalerWidth # i
#Option RenderAccel # [bool]
#Option SubPixelOrder   # [str]
#Option ShowCache   # [bool]
#Option DynamicClocks   # [bool]
#Option VGAAccess   # [bool]
#Option ReverseDDC  # [bool]
#Option LVDSProbePLL# [bool]
#Option AccelMethod # str
#Option DRI # [bool]
#Option ConnectorTable  # str
#Option DefaultConnectorTable   # [bool]
#Option DefaultTMDSPLL  # [bool]
#Option TVDACLoadDetect # [bool]
#Option ForceTVOut  # [bool]
#Option TVStandard  # str
#Option IgnoreLidStatus # [bool]
#Option DefaultTVDACAdj # [bool]
#Option Int10   # [bool]
Identifier  Card0
Driver  radeon
VendorName  ATI Technologies Inc
BoardName   Radeon X1650 Pro

Re: ftp with .... ?

2009-03-31 Thread Joshua Gimer
Are you sure that the suid bit will not provide the functionality that
you require? I would make sure that the proper user owns the directory
and then set its suid bit (chmod u+s /mnt/)

If I am missing something please let me know.

On Tue, Mar 31, 2009 at 3:13 PM, Vasadi I. Claudiu Florin
claudiu.vas...@gmail.com wrote:

 Hello guys,

 Here's the deal:
 I have a samba server on a FreeBSD 7.1-STABLE running with mod-acl (or
 whatever it's called). The folder it is connected to (let's call it share)
 has acl enabled. Thus all data written with samba (from my xp box)
 automagicly inharits permision of parent folder (root:wheel). Perfect till
 now.

 This is were the catch catches up. I also want ftp access to that folder (a
 master ftp account that only I will know) but also want it with acl
 features; I mean all files written by/through ftp will (or must) have
 inherited parent directory permisions, leaving samba full permisions over
 files/folder in that directory (as stated by acl).

 Here's the curent setup
 the share folder (actually /mnt)
 # file: /mnt/
 # owner: root
 # group: wheel
 user::rwx
 user:smbadmin:rwx
 user:ftpadmin:rwx
 group::---
 mask::rwx
 other::---

 As you can see, the owner is root:wheel. The samba master acount is
 smbadmin with rwx privileges.
 Now, I wish to employ another username, also with rwx privileges, for a
 master ftp account (say ftpadmin), but all files writen by this user
 *will* eventually end up on disk as root:wheel, not ftpadmin:group.

 What I've done so far.
 Read a bit about chmod +s and by chmod g+s managed to ensure that whoever
 writes files to that folder, end up belonging to wheel group. Didn't manage
 on the other hand to employ the same thing for the user. Files are owned by
 ftpadmin

 Of course I could add these accounts into one big group, but then, were
 would all the fun be ? :)
 And also, I would have a terrible time when say another ftp user would be
 required to have some sort or acces but diferent from that group I
 previously mentioned (say r--).

 Now, from what I tinkered about I need some sort of control agent between
 the actual ftp and the disk (something similar to mod-acl of samba maybe?)
 or force the files that are to be written to disk to change theyre usr:group
 by some chmod-similar manner.


 Please point me in the right direction. A link, an ideea ... something. Am
 capable of doing it myself, no need for please do this for me..nono.

 So ?
 ___
 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




-- 
Thx
Joshua Gimer
___
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: going from cvs to svnq

2009-03-31 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew Wright wrote:
 
 On Tue, 31 Mar 2009, Chuck Robey wrote:
 
 I've finally decided that it's way past time that I switched from
 using cvs for
 my home archive (currently /home/ncvs) to using subversion.  I'm
 trying to hunt
 down a web page that might give a set of rules to help moving things. 
 I've
 
 It appears that you may be labouring under the assumption that
 svn is a potential _client_ replacement that will read a CVS repo.

I wasn't laboring under a misapprehension, I asked if they were compatible, I
wasn't trying to say they were.  Thanks, though, for the URL, I wasn't aware of
cvs2svn.

 
 It doesn't do this.
 
 You can convert a repository using the tools available at:
 http://cvs2svn.tigris.org/
 but afterwards you are using svn exclusively -- there is no ability
 to mix and match.  After the conversion, both client and server
 tools will change.
 
 The primary advantage of using svn is that the _server_ uses a
 different protocol to track objects.

I think that's unclear, you can't mean that just having the protocol be
different, that's not that much of a win.  Having svn track extra things, like
directories, that I'd think was a win.

  Directory management, for
 instance, is a track-able change, as opposed to the CVS strategy
 of directory management through side effect.

I'd have said, for cvs, more like directory non-management.  Was nice to simply
fix things, if you didn't have worry about others helping you out, but keeping
history could be a lot more of a problem.  Not impossible, but difficult.  I
used to be a company's release engineer, under cvs, but never svn.  I just don't
know svn a fraction as well as I know cvs.

What I don't know is, I use cvsup all the time, but when I switch to svn, what
does the cvsup job of tracking an archive (not tracking the sources, I mean
the archive)?  Does svn do it all itself?  If so, I can find out how, I just
want to know if that's how its done.  If not, what's the general tool used to
track the freebsd archive, so I can investigate it?

 
 
 Stuff like, can I use my present cvsup-fetched /home/ncvs with svn?  I
 didn't
 
 No - if you have fetched a directory using cvsup, then it is a CVS
 workspace, and will remain that way.  If the server managing a repo
 is using CVS, you will use a CVS client to access it
 
 If you are managing a repo you wish to convert to svn, then the
 link above will help you do it.  At the time of such a conversion,
 all currently-checked-out CVS workspaces will be orphaned.
 
 A.
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknSzvkACgkQz62J6PPcoOnQ/ACeJlycE/LnWxCkiedMdvlgTPso
2zUAn1OyAnrq/QjgkqCnvXwYrLyL54SY
=7H4O
-END PGP SIGNATURE-
___
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: mod_php5 and apache22

2009-03-31 Thread Ian Smith
On Mon, 30 Mar 2009, Mel Flynn wrote:
  On Wednesday 25 March 2009 05:36:26 Ian Smith wrote:
   On Tue, 24 Mar 2009 16:46:16 +0100 Ruben de Groot mai...@bzerk.org wrote:
 On Tue, Mar 24, 2009 at 03:20:26PM +0100, Mel Flynn typed:
  On Tuesday 24 March 2009 15:13:33 Christoph Kukulies wrote:
   I moved a site from some FreeBSD 5.2 or something (with apache2 and
   mod_php5 at that time,
   about 3 years old) to 7.1 (Beta though) and apache22.
  
   Now I don't find something that looks like mod_php5 in
   /usr/ports/www.
  
   Has that changed somehow?
 
  lang/php5 with APACHE_MODULE ticked in options dialog.

 The apache module compile is off by default since somewhere in 2006 and
 I keep forgetting that occasionally :(
 So people using pkg_add -r php5 will not get mod_php5.
  
   That's right, you haven't been able able to install mod_php5 from a
   package for at least that long.  I've never understood the rationale.
  
  APACHE_MODULE pulls in apache as dep, while CGI and CLI do not. There is not 
  much difference in performance with the CGI version and mod_fcgid, the major 
  difference with the module is the ease of site/directory specific 
  configuration of php through php_value and php_flag directives.
  
  A slave port is easily created with one Makefile, as below.
  
  # New ports collection makefile for:php5-module
  # Date created: Jan 11 2009
  # Whom: Mel Flynn mel+po...@rachie.is-a-
  geek.net
  #
  # $Coar: ports/local/php5-module/Makefile,v 1.2 2009/03/30 20:37:22 mel Exp $
  # NOTE: we cannot use PKGNAMESUFFIX as that triggers extension build in
  #   MASTERDIR/Makefile
  PORTNAME=php5-module
  MASTERDIR=   ${.CURDIR}/../../lang/php5
  CATEGORIES=  local lang
  PKGORIGIN=   local/php5-module
  PKGNAMEPREFIX=   module-
  
  # Set some options, though the config dialog is still set. This build is
  # primarily for jails, where some php5 command line scripting is desired.
  # Jails can't use SUHOSIN
  WITHOUT_SUHOSIN=yes
  WITHOUT_CGI=yes
  WITHOUT_FASTCGI=yes
  WITHOUT_PATHINFO=yes
  WITH_APACHE=yes
  APACHE_PORT?=www/apache22
  
  .include ${MASTERDIR}/Makefile

Mel, only two questions:

1)  Does it need binding to apache22 specifically?

2)  Can you please submit it? :)

cheers, Ian
___
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: mod_php5 and apache22

2009-03-31 Thread Glen Barber
On Tue, Mar 31, 2009 at 11:41 PM, Ian Smith smi...@nimnet.asn.au wrote:
 2)  Can you please submit it? :)


Sadly (for me) I have been working on a replacement for
misc/instant-server called misc/instant-webserver that I was going to
submit.  It would build apache22 and php5 with the apache module, but
I've been too tied up with ${REAL_JOB} and ${SCHOOL} to work on
getting the BATCH option to work (to prevent prompting of www/apache22
options).

Mel, is that Makefile already part of a current port in the tree?  I
couldn't find it.  If it is, I'll stop what I'm working on, as it'll
create two ports that do the same thing.

-- 
Glen Barber
___
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: UTF-8 file + console

2009-03-31 Thread Arek Czereszewski
Thank you all for replays.
On this moment i think about one from three solutions:
- on workstation editor with utf and scp/sftp support
- on workstation editor with utf and ftp support + ftp
on server
- nfs/samba share.

Patching productive system for utf (I read something about
experimental patches for UTF) it is not good solution.

Regards
Arek
-- 
Arek Czereszewski
arek (at) wup-katowice (dot) pl
UNIX allows me to work smarter, not harder.
___
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