What happened to my Perl installation???
I did an upgrade of my ports and I got some errors regarding Perl modules. The system asked my to remove BSDPAN which I did. Later I discovered I had other problems updating certain ports because of missing Perl parts. This is part of the problem: $ perldoc BSDPAN Can't locate File/Spec.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 . /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/5.8.8/BSDPAN/..) at /usr/local/lib/perl5/5.8.8/File/Spec/Functions.pm line 3. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/File/Spec/Functions.pm line 3. Compilation failed in require at /usr/local/lib/perl5/5.8.8/Pod/Perldoc.pm line 10. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/Pod/Perldoc.pm line 10. Compilation failed in require at /usr/local/bin/perldoc line 9. BEGIN failed--compilation aborted at /usr/local/bin/perldoc line 9. How do I fix up my Perl installation? Thank you very much. Peter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What happened to my Perl installation???
From: Garrett Cooper [EMAIL PROTECTED] To: freebsd-questions@freebsd.org Subject: Re: What happened to my Perl installation??? Date: Mon, 26 Mar 2007 21:28:28 + Peter Matulis wrote: I did an upgrade of my ports and I got some errors regarding Perl modules. The system asked my to remove BSDPAN which I did. Later I discovered I had other problems updating certain ports because of missing Perl parts. This is part of the problem: $ perldoc BSDPAN Can't locate File/Spec.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.8/mach /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/mach /usr/local/lib/perl5/5.8.8 . /usr/local/lib/perl5/5.8.8/BSDPAN /usr/local/lib/perl5/5.8.8/BSDPAN/..) at /usr/local/lib/perl5/5.8.8/File/Spec/Functions.pm line 3. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/File/Spec/Functions.pm line 3. Compilation failed in require at /usr/local/lib/perl5/5.8.8/Pod/Perldoc.pm line 10. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/Pod/Perldoc.pm line 10. Compilation failed in require at /usr/local/bin/perldoc line 9. BEGIN failed--compilation aborted at /usr/local/bin/perldoc line 9. How do I fix up my Perl installation? Thank you very much. Peter Eep. That's not good. Have you tried reinstalling perl? I'm curious because according to CPAN it appears that File::Spec is a part of the base Perl system: http://search.cpan.org/~kwilliams/PathTools-3.24/lib/File/Spec.pm. Ok, I'm trying to reinstall now: cd /usr/ports/lang/perl5.8 make reinstall Peter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
cannot launch vsftpd at system startup
Hi gang, I have read quite a few articles on how to start vsftpd at system bootup but nothing seems to work on my new and updated 6.2 STABLE machine. I have copied /usr/ports/ftp/vsftpd/files/vsftpd.sh.in to /usr/local/etc/rc.d/vsftpd.sh and it is executable. In /etc/rc.conf I am placing: vsftpd_enable=YES and in vsftpd.conf: listen=YES background=YES I can't see the error when my machine boots but when I attempt to run the rc.d script manually I get: .: Can't open %%RC_SUBR%%: No such file or directory I can start the daemon at the command line: /usr/local/libexec/vsftpd I installed the port sysutils/rc_subr thinking it may help but it does not. I also reinstalled vsftpd with the make option RC_NG but it doesn't seem to do anything (isn't it supposed to install the rc.d script?). Any comments? Peter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cannot launch vsftpd at system startup
Le Samedi 27 Janvier 2007 16:36, Derek Ragona a écrit : add set -x to the startup script and debug where that error message is coming from. -Derek At 02:55 PM 1/27/2007, Peter Matulis wrote: Hi gang, I have read quite a few articles on how to start vsftpd at system bootup but nothing seems to work on my new and updated 6.2 STABLE machine. I have copied /usr/ports/ftp/vsftpd/files/vsftpd.sh.in to /usr/local/etc/rc.d/vsftpd.sh and it is executable. In /etc/rc.conf I am placing: vsftpd_enable=YES and in vsftpd.conf: listen=YES background=YES I can't see the error when my machine boots but when I attempt to run the rc.d script manually I get: .: Can't open %%RC_SUBR%%: No such file or directory I can start the daemon at the command line: /usr/local/libexec/vsftpd I installed the port sysutils/rc_subr thinking it may help but it does not. I also reinstalled vsftpd with the make option RC_NG but it doesn't seem to do anything (isn't it supposed to install the rc.d script?). The shell tries to parse this line: . %%RC_SUBR%% I have no idea what it is trying to source. Here is the entire script: #!/bin/sh # # $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh.in,v 1.7 2006/02/20 20:47:01 dougb Exp $ # # PROVIDE: vsftpd # REQUIRE: DAEMON # Add the following line to /etc/rc.conf to enable `vsftpd': # # vsftpd_enable=YES # vsftpd_flags=/some/path/conf.file # Not required # . %%RC_SUBR%% name=vsftpd rcvar=`set_rcvar` load_rc_config $name : ${vsftpd_enable:=NO} : ${vsftpd_flags:=} command=%%PREFIX%%/libexec/$name required_files=%%PREFIX%%/etc/$name.conf start_precmd=vsftpd_check vsftpd_check() { if grep -q ^ftp[ ] /etc/inetd.conf ${required_files} then err 1 ftp is already activated in /etc/inetd.conf fi if ! egrep -q -i -E ^listen.*=.*YES$ ${required_files} then err 1 vsftpd script need listen=YES on config file fi if ! egrep -q -i -E ^background.*=.*YES$ ${required_files} then err 1 vsftpd script need background=YES on config file fi } run_rc_command $1 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: cannot launch vsftpd at system startup
Le Samedi 27 Janvier 2007 18:34, Derek Ragona a écrit : change the line: . %%RC_SUBR%% to: . /etc/rc.subr -Derek At 05:05 PM 1/27/2007, Peter Matulis wrote: Le Samedi 27 Janvier 2007 16:36, Derek Ragona a écrit : add set -x to the startup script and debug where that error message is coming from. -Derek At 02:55 PM 1/27/2007, Peter Matulis wrote: Hi gang, I have read quite a few articles on how to start vsftpd at system bootup but nothing seems to work on my new and updated 6.2 STABLE machine. I have copied /usr/ports/ftp/vsftpd/files/vsftpd.sh.in to /usr/local/etc/rc.d/vsftpd.sh and it is executable. In /etc/rc.conf I am placing: vsftpd_enable=YES and in vsftpd.conf: listen=YES background=YES I can't see the error when my machine boots but when I attempt to run the rc.d script manually I get: .: Can't open %%RC_SUBR%%: No such file or directory I can start the daemon at the command line: /usr/local/libexec/vsftpd I installed the port sysutils/rc_subr thinking it may help but it does not. I also reinstalled vsftpd with the make option RC_NG but it doesn't seem to do anything (isn't it supposed to install the rc.d script?). The shell tries to parse this line: . %%RC_SUBR%% I have no idea what it is trying to source. Here is the entire script: #!/bin/sh # # $FreeBSD: ports/ftp/vsftpd/files/vsftpd.sh.in,v 1.7 2006/02/20 20:47:01 dougb Exp $ # # PROVIDE: vsftpd # REQUIRE: DAEMON # Add the following line to /etc/rc.conf to enable `vsftpd': # # vsftpd_enable=YES # vsftpd_flags=/some/path/conf.file # Not required # . %%RC_SUBR%% name=vsftpd rcvar=`set_rcvar` load_rc_config $name : ${vsftpd_enable:=NO} : ${vsftpd_flags:=} command=%%PREFIX%%/libexec/$name required_files=%%PREFIX%%/etc/$name.conf start_precmd=vsftpd_check vsftpd_check() { if grep -q ^ftp[ ] /etc/inetd.conf ${required_files} then err 1 ftp is already activated in /etc/inetd.conf fi if ! egrep -q -i -E ^listen.*=.*YES$ ${required_files} then err 1 vsftpd script need listen=YES on config file fi if ! egrep -q -i -E ^background.*=.*YES$ ${required_files} then err 1 vsftpd script need background=YES on config file fi } run_rc_command $1 It seems the funny %% variables cannot be understood. I had to hard code the paths: #. %%RC_SUBR%% . /etc/rc.subr name=vsftpd rcvar=`set_rcvar` load_rc_config $name : ${vsftpd_enable:=NO} : ${vsftpd_flags:=} #command=%%PREFIX%%/libexec/$name command=/usr/local/libexec/$name #required_files=%%PREFIX%%/etc/$name.conf required_files=/usr/local/etc/$name.conf Then it worked. I'm ok with this but it leaves me wondering why I have to do this. Thanks for your time. Peter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
trouble using raidtest on gstripe array
On 6.2 STABLE GENERIC, I have set up RAID0 using gstripe on two SATA drives and installed benchmarks/raidtest for testing. The array is known as /dev/stripe/data. These were my steps: # export mediasize=`diskinfo /dev/stripe/data | awk '{print $3}'` # export sectorsize=`diskinfo /dev/stripe/data | awk '{print $2}'` # raidtest genfile -s $mediasize -S $sectorsize -n 5 # ls -rw-r--r-- 1 root super 781K Jan 27 08:42 raidtest.data # raidtest test -d /dev/stripe/data -n 10 raidtest.data raidtest: Cannot open 'raidtest.data' device: Operation not permitted # ktrace raidtest test -d /dev/stripe/data -n 10 raidtest.data # kdump 1222 raidtest CALL open(0xbfbfed3f,0,0x8049e6c) 1222 raidtest NAMI raidtest.data 1222 raidtest RET open 3 1222 raidtest CALL fstat(0x3,0xbfbfeb30) 1222 raidtest RET fstat 0 1222 raidtest CALL open(0xbfbfed28,0x10002,0x8049e6c) 1222 raidtest NAMI /dev/stripe/data 1222 raidtest RET open -1 errno 1 Operation not permitted 1222 raidtest CALL write(0x2,0xbfbde3d0,0xa) 1222 raidtest GIO fd 2 wrote 10 bytes raidtest: 1222 raidtest RET write 10/0xa 1222 raidtest CALL write(0x2,0xbfbde3f0,0x22) 1222 raidtest GIO fd 2 wrote 34 bytes Cannot open 'raidtest.data' device 1222 raidtest RET write 34/0x22 1222 raidtest CALL write(0x2,0x2813ed98,0x2) 1222 raidtest GIO fd 2 wrote 2 bytes : 1222 raidtest RET write 2 1222 raidtest CALL write(0x2,0xbfbde3d0,0x18) 1222 raidtest GIO fd 2 wrote 24 bytes Operation not permitted 1222 raidtest RET write 24/0x18 1222 raidtest CALL exit(0x1) --- Looks like the gstripe label (/dev/stripe/data) is not available somehow. Is there any known workaround? --- Port info: This utility can be used to test performance of storage devices. First, one need to generate file with I/O operations: # set mediasize=`diskinfo /dev/device | awk '{print $3}'` # set sectorsize=`diskinfo /dev/device | awk '{print $2}'` # raidtest genfile -s $mediasize -S $sectorsize -n 5 It will generate test which contains 5 I/O requests with random size and random offset. Size is a multiple of sectorsize, but less than or equal to 128kB (maxium size of I/O request). I/O request type (READ or WRITE) is random as well. All test data are stored in 'raidtest.data' file in current working directory. To run test, one should type: # raidtest test -d /dev/device -n 10 This command will read test data from 'raidtest.data' file, run 10 processes which will be used to send requests to the given device in parallel. When test is finished you will see statistics: Bytes per second: x Requests per second: y If you compare performance of two storage devices, use the same data file! usage: raidtest genfile [-frw] -s mediasize [-S sectorsize] -n nrequests [file] raidtest test [-Rrw] -d device [-n processes] [file] where: -d device path to tested device -f if raidtest.data file or specified file already exists, remove it and create new one -n nrequestsnumber of requests to generate -n processesnumber of processes to run -r generate/run only READ requests -R generate random data for write requests -s size of destination device -S sector size of destination device -w generate/run only WRITE requests filepath to the data file instead of default 'raidtest.data' ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: thwarting repeated login attempts
Le Vendredi 26 Janvier 2007 15:50, Kevin Kinsey a écrit : David Banning wrote: I have discovered a vulnerability, that is new to me. Denyhosts does not seem to notice FTP login attempts, so the cracker can attempt to login via FTP, 1000's of times until he finds a login/password combination. Pardon the stupid question, but I'm assuming it's necessary that you run ftpd? We block ftpd at the firewall to any machines outside the LAN. Anyone who needs FTP access uses a client that's capable of using sftp instead, and logs in with their SSH credentials. Hmm - interesting - I just -may- be able to disable using ftpd. But I still pose the same question - what do ftp servers do on this? Maybe -not- have ssh login? -or- maybe not have ssh login using the same login/password? I'm also interested; my version of the question is probably more like, is anyone in their right mind running ftpd over the WAN for anything but an anonymous user? [1] You can run OpenBSD's pf in combination with authpf. This mechanism will alter firewall rules based on successful SSH logins. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
looking for advice on NAS
I am currently setting up a FreeBSD box that is currently running some ugly kind of Linux (Mandrakelinux?). It currently has 350 GB of data residing in Samba shares so I am thinking about exporting storage to a NAS device. So I am looking for advice or comments on this move. I am attracted by a small form factor device but I also know about software that zombifies a normal PC into a NAS device (FreeBSD-based OpenNAS). Another issue is an eventual backup to another portable device. Does NAS allow for this? Any comments welcome. Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How did the /etc/resolv.conf appear?
--- [EMAIL PROTECTED] wrote: The automatically installed /etc/resolv.conf contains the next: nameserver 82.207.67.2 nameserver 213.179.244.18 Today I discovered that this servers is not servers of FreeBSD.org or InterNIC, but of my ISP. I wonder how the system found these IP addresses? Are these entries created during installation? They were probably put there by your internet access mechanism (PPP / PPPOE). Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
disklabel and usb device
I am having trouble viewing my USB compact flash reader with my FBSD 5.5 system. I have done so in the past. For some reason I can no longer do so. This is what I'm getting: # disklabel /dev/da0s1 disklabel: /dev/da0s1: no valid label found # fdisk /dev/da0s1 *** Working on device /dev/da0s1 *** parameters extracted from in-core disklabel are: cylinders=249 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=249 heads=64 sectors/track=32 (2048 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 108 (0x6c),(unknown) start 1684955424, size 1701998624 (831054 Meg), flag a beg: cyl 368/ head 82/ sector 37; end: cyl 357/ head 97/ sector 35 The data for partition 2 is: sysid 110 (0x6e),(unknown) start 1998616933, size 544105832 (265676 Meg), flag 73 beg: cyl 97/ head 115/ sector 32; end: cyl 107/ head 121/ sector 32 The data for partition 3 is: sysid 121 (0x79),(QNX4.x 3rd part) start 538988361, size 538976288 (263172 Meg), flag 72 beg: cyl 356/ head 101/ sector 33; end: cyl 0/ head 13/ sector 10 The data for partition 4 is: sysid 83 (0x53),(DM6 Aux3) start 1394614304, size 21337 (10 Meg), flag 53 beg: cyl 333/ head 89/ sector 19; end: cyl 339/ head 68/ sector 15 From logs: kernel: umass0: SanDisk ImageMate 8 in 1, rev 2.00/91.44, addr 2 The card contains an OpenBSD filesystem. Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: New Logo
--- stan [EMAIL PROTECTED] wrote: YUK! Yeah, it has a something's missing feel to it. I suppose it was time to distance ourselves from the demon thing though. It not having a face is a step in that direction. The horns remain to appease hardcore people I guess. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: updating in single-user mode
--- Eric F Crist [EMAIL PROTECTED] wrote: On Oct 24, 2005, at 11:45 PM, Dimitar Vasilev wrote: I don't reccommend doing installworld or kernel in multiuser, but I have never had any problems doing it on a lightly loaded machine. With that said what could bite you is your new kernel not booting or something broken in userland. You will then need console access (serial or local) to fix it. I would set up your machine with serial console access and use a laptop or another machine when you reboot. Beech -- I have done it when there is NO activity on the machine. Read UPDATING first. Reset your securelevel to -1, stop all services except SSH and go. It's possible to break your machine though. Then you have to rebuild it again and it's 50/50 to succeed. As advised twice, use serial cables/KVM switches if possible. -- ÐимиÑÑÑ ÐаÑилев Dimitar Vassilev GnuPG key ID: 0x4B8DB525 Keyserver: pgp.mit.edu Key fingerprint: D88A 3B92 DED5 917E 341E D62F 8C51 5FC4 4B8D B525 If this isn't a production machine, try it. I have been doing system updates since 3.4 and not once have I booted into single user mode to compile my kernel or userland. I've even done it as recently as two weeks ago. I don't have a huge userbase, so my system is pretty quiet. I also just finished compiling world and compiling installing my kernel in multi-user. What's the big deal? I did, though, go into single to test (boot) the kernel and install world. Does anyone have a clear understanding of why things can go wrong otherwise? __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
portupgrade -ar (why?)
What is the use of specifying the 'r' switch when using the 'a' switch? # portupgrade -ar This says to upgrade all ports plus the ones that depend on all those ports. Am I missing something? Wouldn't the ones that depend be upgraded anyway? I understand the reasoning behind using the 'R' switch with 'a' since there may be new ports that are not installed that are required by upgradeable ports. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: portupgrade -ar (why?)
--- Petersen [EMAIL PROTECTED] wrote: But still, a port requires upgrading or it does not. Using 'r', portupgrade ultimately checks whether some port should be upgraded. Are you saying that the 'r' switch involves a different decision making process than 'a'? The -a switch will upgrade a port only if its version number has increased (as you know). The -r switch will upgrade a port if one of its dependancies has been upgraded, regardless of whether its version number has changed or not. e.g. Appbar-1.0 depends on libfoo-1.0. Libfoo gets a portbump to 1.1. portupgrade -r libfoo will install libfoo-1.1, plus also force a recompile and reinstallation of appbar-1.0, irrespective of the fact that appbar's version remains the same. Thus, any ABI changes that happened in libfoo that could potentially break appbar that was compiled/linked against the previous version are limited. In an ideal world, this wouldn't be a problem. ABIs and APIs should remain constant, until a library revision bump (i.e., if libfoo.1's ABI changed and broke apps, it shoulda been bumped to libfoo.2). Most times you can get away with not recompiling a port's dependants because developers, but if you don't then it can shoot you in the foot (read the recent list archives regarding openssl-0.9.8 to see an example of this). Thank you very much (BTW, there is something missing in your last sentence). One last thing. Is this the case with the 'R' switch as well? __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: portupgrade -ar (why?)
--- Petersen [EMAIL PROTECTED] wrote: Uninstalled dependancies of an installed port are irrelevant in any portupgrade case, as the port will automatically pull them in as part of its compilation. What if a port now has a new dependency? But back to 'r', My system shows this: --- $ pkg_info -xR openldap Information for openldap-client-2.2.29: Required by: bluefish-1.0.4 dirmngr-0.9.2 gnome-menus-2.10.2_1 gnomevfs2-2.10.1_1 gnupg-devel-1.9.19 gtksourceview-1.2.1 libbonoboui-2.10.1 libgnomeui-2.10.1_1 rox-2.3 samba-libsmbclient-3.0.20_2 --- Just to be clear on this, if I do... # portupgrade -r openldap-client ...all those listed ports will be recompiled whether they need to be or not? That seems mighty inefficient. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: portupgrade -ar (why?)
--- Andrew P. [EMAIL PROTECTED] wrote: Honestly guys, what is this thread about? Hum, understanding something? You're not gonna make portupgrade work any faster or smoother if you weed out a couple of switches from the command-line. See above. I don't mean to bother anyone if you're having fun, but it just seems that portupgrade's manpage covers it all. Ha, I knew a manpage guy would come around sooner or later. Don't you think I read it already? I have questions it does not cover. If you're not sure - just try it. If something's strange - see if it's a bug, and if you're sure it is - send-pr. I can use all the switches if I want. The entire alphabet soup. But that won't help me understand what is happening. I am not satisfied with not seeing something strange. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: help with shell script
--- Peter Matulis [EMAIL PROTECTED] wrote: --- Philip Hallstrom [EMAIL PROTECTED] wrote: 1. This gives me the amount of space (kB) taken up by the 10 largest ports: $ pkg_info -as | grep ^[0-9] | sort -gr | head -10 | cut -c 1-6 2. Using one figure from above list I produce the details of the corresponding port: $ pkg_info -as | grep -B3 240695 Output: -- Information for linux_base-8-8.0_6: Package Size: 240695 (1K-blocks) -- I would like the output of the script to be the above but for all ten ports (~40 lines; insert a blank line between each?). I know I need some sort of iteration but I am rusty on scripting. Can anyone help? This should get you close... if you want only the top 10 just add more pipes to the end with sort and head... #!/bin/sh newline='\ ' pkg_info -as | \ tr '\n' ' ' | \ sed -e 's/Package Size://g' \ -e s/(1K-blocks)/$newline/g |\ sed -e 's/^ *Information for //' What I need is the size as the first item (not the second) on each line. Then I can use sort. Allrighty, I employed some awk to get a good enough output: #!/bin/sh newline='\ ' pkg_info -as | \ tr '\n' ' ' | \ sed -e 's/Package Size://g' \ -e s/(1K-blocks)/$newline/g | \ tr ':' ' ' | \ awk '{print$4, ,$3}' | \ sort -gr | \ head -30 Thanks. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: newbie ports question
I'd start with installing portupgrade, and trying to portupgrade -arR. I'm sure there's another solution, though. What is the use of specifying the 'r' switch when using the 'a' switch? # portupgrade -ar Since all installed ports are targeted wouldn't installed ports that depend on another installed port be upgraded anyway (if necessary)? I understand the reasoning behind using the 'R' switch with 'a' since there may be new ports that are not installed that are required by installed ports. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
help with shell script
Hi. I am writing up a doc for the fbsd community that covers usage of ports. I have two commands that allow me to assertain the amount of disk space being utilized by currently installed ports. I would like to make a shell script (bourne or bash) out of them but I am not sure how. 1. This gives me the amount of space (kB) taken up by the 10 largest ports: $ pkg_info -as | grep ^[0-9] | sort -gr | head -10 | cut -c 1-6 Example output: -- 240695 59274 55526 54271 47418 42644 35364 31091 29181 28745 -- 2. Using one figure from above list I produce the details of the corresponding port: $ pkg_info -as | grep -B3 240695 Output: -- Information for linux_base-8-8.0_6: Package Size: 240695 (1K-blocks) -- I would like the output of the script to be the above but for all ten ports (~40 lines; insert a blank line between each?). I know I need some sort of iteration but I am rusty on scripting. Can anyone help? __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: help with shell script
--- Philip Hallstrom [EMAIL PROTECTED] wrote: 1. This gives me the amount of space (kB) taken up by the 10 largest ports: $ pkg_info -as | grep ^[0-9] | sort -gr | head -10 | cut -c 1-6 2. Using one figure from above list I produce the details of the corresponding port: $ pkg_info -as | grep -B3 240695 Output: -- Information for linux_base-8-8.0_6: Package Size: 240695 (1K-blocks) -- I would like the output of the script to be the above but for all ten ports (~40 lines; insert a blank line between each?). I know I need some sort of iteration but I am rusty on scripting. Can anyone help? This should get you close... if you want only the top 10 just add more pipes to the end with sort and head... #!/bin/sh newline='\ ' pkg_info -as | \ tr '\n' ' ' | \ sed -e 's/Package Size://g' \ -e s/(1K-blocks)/$newline/g |\ sed -e 's/^ *Information for //' What I need is the size as the first item (not the second) on each line. Then I can use sort. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
ports and compile options
I recently upgraded my ports and now my editor (bluefish) has lost its syntax highlighting. Errors from within the editor mention pcre not being compiled with UTF8 support. How do I specify such compile options when installing by port? I am using 5.4 stable. Pet __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ports and compile options
--- Lowell Gilbert [EMAIL PROTECTED] wrote: Peter Matulis [EMAIL PROTECTED] writes: I recently upgraded my ports and now my editor (bluefish) has lost its syntax highlighting. Errors from within the editor mention pcre not being compiled with UTF8 support. How do I specify such compile options when installing by port? I am using 5.4 stable. devel/pcre-utf8 instead of devel/pcre might do it. That worked. I installed the utf8 version and all is well. I do not understand how I had syntax highlighting with the standard version prior to upgrading though. A side question is whether I should remove the standard version since I now have both installed. __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Sendmail not listening correctly
--- Mike Loiterman [EMAIL PROTECTED] wrote: I tried doing a: #cd /etc/mail make stop killall -9 sendmail Use the ps command to ensure sendmail is not running. Use kill pid The config file I'm using is made from $hostname.cf. That's where I make all my changes. Altering cf files directly is frowned upon. I can't help you there. I don't know why but somehow there is something else listening on 25 but I can't figure out what: # sockstat | grep sendmail # cd /etc/mail make start Starting: sendmail sendmail-clientmqueue. # sockstat | grep sendmail smmspsendmail 727 3 dgram - /var/run/log root sendmail 724 3 dgram - /var/run/logpriv root sendmail 724 4 tcp4 *:25 *:* root sendmail 724 5 tcp6 *:25 *:* I have never used these commands. This should be enough: $ netstat -naf inet Make sure there is no sendmail listening (port 25 or 587). # tail -f /var/log/maillog snip Looks like you either have a botched cf file or there is some other daemon interference. Is this a new install? What have you done/installed/configured relating to mail software? Rebuilt the system? Compiled kernel? -- Peter __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Sendmail not listening correctly
--- Mike Loiterman [EMAIL PROTECTED] wrote: snip 4. Listed everything after starting sendmail tcp4 0 0 *.25 *.*CLOSED Clearly the thing is deaf. 5. Checked /var/log/maillog to find the same errors: snip This is starting to get frustrating... I know how you feel. The beauty is that there is a very logical reason. Do you have any port forwarding happening? You still have not told me the history of your machine. What have you recently done? Is it a clean install, etc. What I would do at this point is to stop using these make commands and start sendmail manually. I have no idea what these make commmands are doing. -- Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Sendmail not listening correctly
--- Mike Loiterman [EMAIL PROTECTED] wrote: tcp4 0 0 127.0.0.1.62121127.0.0.1.25 SYN_SENT What is this? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: two questions in one
--- steve lasiter [EMAIL PROTECTED] wrote: snip My web server is up and running well and I can test all by going to 192.168.0.2 from any internal workstation, but if I try to go to www.mywebsite.com from any internal workstation, which maps to the 66.190.xxx.xxx IP directed to web server port 80 as it should, my attempt will time out. How are you redirecting your requests? It is probably due to the fact that a TCP handshake is not being allowed to complete because the server is responding to the client but the client is is expecting a response from the firewall. This is common in your arrangement. Sniff traffic with tcpdump on the various hosts and provide us with more details. If I run next door to my buddies and hit it from his PC I get there just fine. I can't understand this since I'm using the www.mywebsite.com name instead of an IP address. It seems the gateway should not be affecting me, right? How do I get around this or solve it? I don't want to have to go next door everytime I need to make sure my site is accessible from the web. Sign up for a free shell account on an internet-based server. One other quick issue. When FTPing from within my LAN it is horribly slow. It was fast after initial install but something happened without my intervention. I've tried two different servers, proftpd currently and pureftp previously. If I ftp outside my LAN it's lightning fast. Any ideas are appreciated. With the ifconfig utility, check the configuration of the involved network adapters. In particular, look for duplex and half-duplex. -- Peter __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Sendmail not listening correctly
--- Mike Loiterman [EMAIL PROTECTED] wrote: I'm trying to setup my mail server, but sendmail is only listening on the local interface: # netstat -an | grep 25 tcp4 0 0 127.0.0.1.25 *.*LISTEN $ grep sendmail_submit_enable /etc/defaults/rc.conf __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: Sendmail not listening correctly
--- Mike Loiterman [EMAIL PROTECTED] wrote: This looks to me like the correct combination (to be put in /etc/rc.conf): sendmail_enable=YES sendmail_submit_enable=NO I get the following errors in my messages.log NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting First, keep in mind that these parameters only define how sendmail starts when the system is rebooted. Second, stop any sendmail processes. Third, start sendmail with the correct cf (config) file. It should be /etc/mail/freebsd.cf. It is created from /etc/mail/freebsd.mc. The former is for sendmail only (do not peek) and the latter is for you to read. When submit_only is ON, freebsd.submit.cf (generated from freebsd.submit.mc) is used. You should investigate the mc files and learn how to generate cf files from them. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: traffic accounting.
--- Derrick MacPherson [EMAIL PROTECTED] wrote: Are you searching for something that looks good or something more factual? Probably more pretty than extremely accurate. I've actually mirrored a port on the switch that's to our internet connection, and have ntop monitoring that. Seems to be working fine, I guess I would like a bit more of a warm fuzzy feeling that what i'm doing is right. Another question to consider is whether you are interested in bandwidth (bytes/sec) or in actual bytes transferred. There are fewer tools that provide persistent archivable stats for the latter and I have yet to find one that displays the latter in graphical form without it becoming a science project. bytes transfered is better, but both appreciated. And ya, it seems like there's a few solutions, none perfect. I am pushing for the replacement of our Pix's, my preference is PF on *BSD, but again, they want something that looks pretty. I agree that bytes transferred is very nice to have (seems pretty basic). As mentioned by another, there is a small utility called ipfm that does the trick. There are a couple of scripts on the net that process the output into something more useful (bytes for a specified month). For the prettiness factor, pf integrates painlessly with pfstat and symon/syweb. Here is something from pfstat. It shows, well, pf statistics (bytes/sec for the last 12 hours): http://papamike.ca/misc/pass_block_12.png -- Peter __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: traffic accounting.
--- [EMAIL PROTECTED]Erik Nørgaard wrote: Derrick MacPherson wrote: I am going to pop a machine (bridged interfaces) in tween our LAN and our firewall (pix) and am wanting to know what people would recommend for IP accounting, it would be great to have a web based output to show what traffic, from/to what hosts so the boss is happy to look at it. Are you searching for something that looks good or something more factual? Another question to consider is whether you are interested in bandwidth (bytes/sec) or in actual bytes transferred. There are fewer tools that provide persistent archivable stats for the latter and I have yet to find one that displays the latter in graphical form without it becoming a science project. -- Peter __ Find your next car at http://autos.yahoo.ca ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: tcpdump problem
You do not have all the details with ethereal. That's because you are *telling* tcpdump not to sniff them. You are instructing it to take just the headers with the '-s' switch (zero payload: -s0). Try 1500 instead of 0 and you will get what you desire. -- Peter --- bannour souha [EMAIL PROTECTED] wrote: Hello, I am working on PPPoE. I use FreeBSD 5.3. I want to capture packets from the interfaces eth and ppp. I used for that this command tcpdump -e -i rl0 -n -s0 -w /home/dump_eth when I analyse the packets with ethereal, I have all details, but when I read the content of the file dump_eth with the command tcpdump -r dump_zth, I haven't the whole packet, that's mean, I obtain all the information but I don't obtain the data. Have you some idea? I want to have the content of the packets in hexa to use it in my work. Can you help me please? many thanks, Souha ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
printer causing computer to reboot
Hi, I am running FreeBSD 5.4. I have upgraded my ports and recompiled the system and kernel. I have a USB laser printer (Lexmark E310) that is recognized automatically when attached. At first I was pleased since it appeared to work out of the box after setting up a rudimentary printcap file. Although after some extended usage (more than one print request) the thing causes my computer to shut down. My system seems to lock up and then a second later it goes down. The printer does appear to require a lot of power as my office lights blink when the thing is on. Nevertheless, my computer is connected to an APC/UPS which should guarrantee correct reliable power. Occasionally when a print request is sent I receive a message in my /var/log/messages file (see first message in list below). kernel: usbd_setup_pipe: failed to start endpoint, IOERROR last message repeated 2 times kernel: ulpt0: at uhub0 port 4 (addr 2) disconnected kernel: ulpt0: detached kernel: uhub0: port 4, set config at addr 2 failed kernel: uhub0: device problem (IOERROR), disabling port 4 lpd[820]: /dev/ulpt0: No such file or directory kernel: ulpt0: Lexmark International, Inc. Lexmark Optra E310, rev 1.00/1.00, addr 2, iclass 7/1 kernel: ulpt0: using bi-directional mode kernel: usbd_setup_pipe: failed to start endpoint, IOERROR lpd[974]: lp: job could not be printed (cfA046sonata) kernel: ulpt0: at uhub0 port 4 (addr 2) disconnected * kernel: ulpt0: detached(turned off my printer here and then turned it back on a few seconds later) kernel: ulpt0: Lexmark International, Inc. Lexmark Optra E310, rev 1.00/1.00, addr 2, iclass 7/1 kernel: ulpt0: using bi-directional mode kernel: ulpt0: at uhub0 port 4 (addr 2) disconnected * kernel: ulpt0: detached(turned off my printer here and then turned it back on a few seconds later) kernel: ulpt0: Lexmark International, Inc. Lexmark Optra E310, rev 1.00/1.00, addr 2, iclass 7/1 kernel: ulpt0: using bi-directional mode kernel: usbd_setup_pipe: failed to start endpoint, IOERROR Then the system rebooted. Another issue is when I send a print request either a) nothing happens (maybe a log message is generated) or b) paper comes out with this at top left corner: s: 1 I can get more info (especially a more accurate sequence of events:logs) if anyone thinks they can help. Peter __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]