Re: how to view environment variables
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Whitehouse wrote: RW wrote: On Sun, 15 Jun 2008 00:27:10 +0100 Chris Whitehouse [EMAIL PROTECTED] wrote: Hello, sysutils/fusefs-ntfs/files/README.FreeBSD refers to various environment variables, eg UBLIO_BLOCKSIZE and others. How do I find out what they are set to? set and printenv don't find them. I'm using standard csh and FreeBSD 7.0-STABLE, fuse.ko is loaded and ntfs-3g works except it seems very slow. If you didn't set them, they probably aren't set. You'll need to consult the fusefs-ntfs documentation (or source) to find the default value. I think this explains part of my confusion. If the variables are not set ntfs-3g assumes some defaults (in README.FreeBSD) but doesn't set them as environment variables. I thought ntfs-3g would actually set them. I still don't know how to view them when I have explicitly set them, as per previous reply to Robert Huff. eco# env UBLIO_BLOCKSIZE=65536 ntfs-3g /dev/ad0s1 /ad0s1 eco# setenv |grep UBLIO eco# I just picked up on this ... environmental variables are part of the private environment of programs. Those variables are given to any child programs. If the programs are shells, shells specialize in creating child programs, so all those environmental variables get given to the children. A filesystem doesn't create children, it just organizes the storage and presentation of disk data, so when you set a environmental variable to a filesystem, it may react to that variable if it is programmed that way, but it doesn't send it anywhere. If you want to see the variable in your shell, then you must tell the shell to set it in it's environment. For a sh-like shell, you would do something like: export UBLIO_BLOCKSIZE=65536 For a csh-like shell, use: setenv UBLIO_BLOCKSIZE 65536 (Notice that a csh-like shell DOESN'T use the =). Your filesystem prog is being told of your variable above, but your attempt to see it is misguided. There was a way to see the information, using the e option to ps, but it was always a security problem, so it seems like that was removed from FreeBSD (it's probably controlled by a sysctl). I think it still works in most linuxes. Reading the variables is very easy to do with the env program, where if you give it no args, it repeats all the variables. Try it. It works for all shells, unlike your setenv, because it's an actual program (/usr/bin/env). setenv is, for a csh-like shell, a shell built-in, not a real program. The way it goes to programs is via 3 variables given to every program. They are, in the order they're presented: 1- argc, which means the number of parameters given to the program by the shell 2- argv, a list of string pointers, to program parameters 3- envp, a list of string pointers, to name=value pairs, for all environmental variables given to each program. Those names are only the commonly used names, they may be changed completely at will, because the system only gives the info in the order I gave, and doesn't associate the info with any names. Your program needs to associate some names to the parameters so that you can manipulate them, and using these names is a good idea so as not to confuse other programmers, just don't get the idea that those names have any real magic meaning on their own. I could write a program using manny, moe, and jack as the names of the 3 items given to a program, and (beyond making things confusing) that program would work just fine. Writing a small program that annouces the arguments count, and prints all of the parameters, and all of the env. variables, makes a fine beginners first program. Chris ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIVUh7z62J6PPcoOkRAp5+AKCAuGFkXoiWMzthzPqpQfR3lGPamQCdH9KI UJwnNE1c7ox5JrSwHoEzJWo= =4Oue -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: shellscript conditional to check for external disk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so i'd like to check whether the drive is attached, if necessary mount it, copy over the backup and unmount it again, so that the local staff can swap the external disks when they're not used. Is there a canonical way to achieve what i want? I played with the idea of simply checking for /dev/da0s1d's existance, but that won't disappear on disconnect, so that would leave the is a possibility that although da0 is in /dev, it might not be connected. Any ideas or RTFM-pointers? I'm not certain this will do what you want with enough security, but if you put the commands in to mount the dist into /etc/fstab, then later on your ask simply mount diskname, mount will follow those rules to mount the disk, if it's indeed in existence. Putting that into a script is pretty simple. There are a huge number of backup commands ... I rather like tar, which can be made to automatically compress the output, or to ask for a single file out of the whole archive, on restoral. Either way, not hard to automate. Does this fit what you wanted? There's a good man page on fstab, and y9ou shouold read the pages on mount and tar. Helge ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXX3az62J6PPcoOkRArsiAJ0f/b3bQbChB9t48EUu5HhznTaetwCfc5OJ VGflPb3nUXht709CGpaUPUQ= =/zdL -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD as VOIP PBX
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sergio lenzi wrote: Em Sex, 2008-06-20 às 21:45 +0200, Wojciech Puchar escreveu: when i connected 56 cisco phones to my laptop (used 4*16 port switches ;), and having all of them working (called from first to second, from third to fourth etc..) there was below 4% CPU load but it's 1200Mhz Pentium-3M. Yes... the cisco uses SIP, that is far more efficient... i forget to say - SIP allows direct calls (data goes directly between phones), SCCP doesn't (at least asterisk module). in tests i intentionally disabled this to make asterisk server loaded we use sip the same way you do with sccp because we need tranfer calls (,Tt) in the dial command E1 boards, the best we tested are from the chinese openvox... without echo cancelation it seels for about U$750,00 for one port E1, US$1800 for 2 ports, US$2800 for 4 ports... My god, for the hardware involved, that's unbelieveably expansive. in my country (brazil) you may think it is too expensive, but as you think that ONE port for a siemens pabx is about US$4000 (yes, 4K dollars) For the Siemens pabx, you're paying for the switching capability, and the literal ton of software to do all of the call handling. Maybe I got you wrong, in what I read above, I haven't seen those Openvox cards, but if they are only voice interface (a T1 or E1 single channel) plus signally, wow, that's a lot. If the interface an entire group, either T1 or E1, that's better, but it sure includes a healthy kick for a profit factor. I know, I've built them in the past, there's just not THAT much to them. Maybe I'm missing something. Actually, in the present case, the cost of doing switching has dropped in a major way, so the cost, which used to be justifiable at $4k/channel, well, it's certainly not that way any more. Let's see, from memory, I think that the old Northern Telecom DMS250 ran about 2.5 million plus the cost of channel banks, I think. I was always doing engineering, not sales, but your cost figures, they sure do seem high to me. As far as handling the software, the old tandem switches used to use mini-computers to run maybe 4,000 channels in one switch. I forget the name of the most famous tandem switch, but I do know they used a single mini. Today's computers are far more capable, and so could very easily power a whole switch. Course, doing that kind of software, well, it's the most difficult stuff to do that has ever been accomplished. The folks that did it never got enough credit. you may imagine that for the price of only one board for a siemens you can mount the pbx, the cpu, the FreeBSD. you mount a 100 phones pbx for less than half the price of a siemens equipment including the 50 ATAs linksys pap2. The poor the country, the more you pay that is the rule. Philips, nortel, alcatel are even more expensive.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXpYvz62J6PPcoOkRAsZoAKCDFT6zyX43pSZkSDC1xv3xsYsMXACfZQvq TsB0dr9vQN6+03TVyGl9mA0= =oUqG -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Which file can I find the error message that shows on the screen when I build my kernel?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Hi: I have make some changes to the kernel files and rebuild the kernel, but when I rebuild the kernel, it show some errors and stop rebuild. The question I want ask is that: Is there any file that store all these error message, If there is, where can I find it? Because there are too many errors occur, I can't see all the errors on the screen, if there is a file that store these error messages, then I can find all the errors and fixed them. Thanks! Best Wishes Not zutomatically. When I run builds, I save rthe output. I normally do this in tcsh, so the command here is make | tee makeout where the complete ooutput goes into the makeout file. The there doesn't take it's normal meaning of throwing the task into the background, instead, what it does is to capture both the regular output plus the stderr output. If you don't use it, you'll get the listing UNTIL the error, and it won't register the error, so don't forget it, nor change it's placement. This can also be done in sh shell, but I'm not used to using the sh syntax for that (both piping and tossing the stdout with stderr), so if you need that, I will let someone else tell you how to do that. Be wary of the fact that, that makeout file's gonna be LARGE. Several megs in size. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXpdUz62J6PPcoOkRAhfLAJ0Zis2ahvh+Gto8u2eJt/vSkJwZugCfUgrK tEfIlZMl6A2YSTJJqPKOhQA= =GHLz -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Which file can I find the error message that shows on the screen when I build my kernel?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gonzalo Nemmi wrote: On Sunday 22 June 2008 15:17:56 Chuck Robey wrote: make | tee makeout where the complete ooutput goes into the makeout file. The there doesn't take it's normal meaning of throwing the task into the background, instead, what it does is to capture both the regular output plus the stderr output. If you don't use it, you'll get the listing UNTIL the error, and it won't register the error, so don't forget it, nor change it's placement. I wasn't aware of the use of ! I thought that getting a new interactive shell would force tee to record errors too, as it was supposed to record the whole thing, not leaving anything out (the errors in this case =P) Thanks a lot for the tip Chuck ! There's an app somewhere in ports that will catch some programmable amount of a file (like maybe 1K bytes) and keep this amount as the file keeps writing in and out. That way you can easily catch the most important part only, and toss the rest. It'd be a nice project for anyone new to C, not too difficult. Alterntiavely, you could set it to toss all lines until it notices the work error (in upper, lower, or mixed case), whereupon, it switches to saving all. Would be a nice app, but it's there in ports already somewhere. For along time, used only tcsh, under the mistaken belief that you couldn't redirect stderr for piping, under a sh-like shell, but about 6 months ago, I found out how to do that. If you would rather use a sh-like shell (maybe you'd be one of the bash-aficionados?) tell me, I will hunt up that trick. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIXrOLz62J6PPcoOkRAp2wAJ9XH39bz5QFD5tYOE3pIfjkVV+9EACfZhCe D6YvWJHo363S0oFPEP4x9hc= =AHRa -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: vim Keybindings
Drew Tomlinson wrote: I'm experiencing an annoying problem with vim on FBSD 8 that I don't have on FBSD 7. Whenever I start vim, if I press the down arrow as the first key, it deletes the first line of my file and enters insert mode. All the other keys work fine and even the down arrow works fine after the first press. I've searched for help but haven't turned up anything relevant. Any ideas on what I can check? Hmm. Don't know if your machine is exactly set up as mine, so 1st, does hitting the escape key as the first key fix things? And, on a shell, hit control-V (the common shell escape key for control keys), then the down arrow, what does it print? Not sure I would be able to help, but there is often a timing issue on special function key decoding (like all of the arrow keys, or the function keys, etc) and this may tell what your down key is set for in Vim. Beyond that, Vim's environment is extremely programmable, so one would really have to look carefully through all of your environment files, beginning with vim's ~/.vimrc. If you are using any of vim's huge store of extensions, your .vimrc probably has statements to include subdirectories (perhaps of your homedir). Those files are also candidates for trouble sources. Are you having this problem on ttys, or under X11? Tried both? It's most likely *something* dealing with Vim, because it's unreported on FreeBSD (I know, I love vim and been using it on FreeBSD-current for years). Vim's IRC channel (vim) is extremely good about helping on problems, like bad keymapping, they are just as good as we here on this mailing list are, but they obviously concentrate on vim. Anyways, if you answer these questions on the list or channel, folks are far more likely to be able to help you here (or on the vim channel). ___ 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: Eclipse Java 1.5
Alex Huth wrote: Hi! I want to change my laptop system from Debian to FreeBSD. After installing 8.0 RC2 in a virtual machine i have tried to install eclipse and changed the Java version in the makefile to 1.5, but it still want to install the 1.6 jdk. I need the 1.5 version for several reasons, for example VPN account. This surprises me a bit, as I'd understood that the differences between 1.5 and 1.6 were strictly limited to bugfixes, and changed the interface not at all. Reason that this might make some difference to you is that, at least for me (using FreeBSD-current) the jdk16 port and eclipse, from ports, are absolutely rock stable. Do you really have some reports saying that jdk16 doesn't work in your situation? How can i solve the problem? Is java 1.5 also available if i install it on AMD64? On debian this is a Problem. Thx Alex Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic. — unknow ___ 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
X11's tcp port
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've got to be doing something wierd, for this not to work ... I wanted to kick off a app on a 2nd machine of mine, and have it display on my main FreeBSD machine, but it won't work. I know all the security things, I know I had xhost and DISPLAY correct, so I went to check netstat for the ip port 6000 being open, but netstat shows me no such port. I usually, to defeat the nolisten options usually set on, edit my startx file to remove any such line. You just search for nolisten tcp or some subset of that (tcp might get set separately) but as I expected, I'd edited that line out ages ago, when I last wanted to display a foreign app onto my FreeBSD X11 screen. However, no matter how I tried to start my X, I can't seem to provoke netstat to show my ip port 6000. I tried running my ordinay startxfce4, I tried kde3, I even tried twm, I just can't get IP port 6000. You know that without that port, you can't run remote X applications. This used to work. Any idea why it's stopped working for me? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAksNhR8ACgkQz62J6PPcoOnTVgCdHjXhyvJLuKEGFklhn/m/Z4/O gJgAoIcjTqkXQynZlrWeJ1Jkae/jH9hw =Wgtn -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: X11's tcp port: FIXED
Chuck Robey wrote: I've got to be doing something wierd, for this not to work ... I wanted to kick off a app on a 2nd machine of mine, and have it display on my main FreeBSD machine, but it won't work. I know all the security things, I know I had xhost and DISPLAY correct, so I went to check netstat for the ip port 6000 being open, but netstat shows me no such port. I usually, to defeat the nolisten options usually set on, edit my startx file to remove any such line. You just search for nolisten tcp or some subset of that (tcp might get set separately) but as I expected, I'd edited that line out ages ago, when I last wanted to display a foreign app onto my FreeBSD X11 screen. However, no matter how I tried to start my X, I can't seem to provoke netstat to show my ip port 6000. I tried running my ordinay startxfce4, I tried kde3, I even tried twm, I just can't get IP port 6000. You know that without that port, you can't run remote X applications. This used to work. Any idea why it's stopped working for me? Can't really say why, but it just began to work, entirely mysteriously. I would rather know about these things, but I'll take working over non-working, I guess. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: portupgrade failure
Glen Barber wrote: Hi, On Wed, Dec 16, 2009 at 11:19 PM, Warren Block wbl...@wonkity.com wrote: On Wed, 16 Dec 2009, Kevin wrote: [...] The only other symptoms I can identify right now are related to the following entries in my crontab: 0 2 * * 6 /usr/local/sbin/portsclean -DD 0 2 * * 5 /usr/local/sbin/portsclean -C The e-mailed results simply say env: ruby: No such file or directory. However, these commands seem to run fine from an interactive shell (while logged in). Paths. When there's a problem with cron it's (almost) always paths. portsclean is a ruby script that starts with this line: Interestingly, my homemade port rebuild script is recently broken with similar symptoms, sans the dependencies on ruby. It's a very simple, low-level for i in `cat list` type script which recently has begun to fail repeatedly on gettext and autoconf dependencies on multiple machines, when I specifically have them set to be upon the first ports to build. More probably unrelated, but I thought I'd throw this out there just in case. Regards, I don't know if it's of any help, but I had a *somewhat* similar experience, I don't know if this will help, but I'll give it to you for what it's worth: I found in my environment, I had REINPLACE_CMD defined (seemed to be a good value), so (in my shell, tcsh) I removed the REINPLACE_CMD setting with unsetenv, and the problem disappeared. Use either env or printenv to scan your environment for anything to do with sed (as REINPLACE_CMD does) and try removing it. Oh, BTW, I can't seem to get the -l logfile option to portupgrade to work, any help on that would also be appreciated. I didn't use -L 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: BSD logo (a moderate opinion)
Dale Scott wrote: Personally, I enjoy our mascot Beastie, as well as the Beastie-influenced official logo. I also smile when I see Casper, Wendy andHotStuff. However, I also accept there are individuals who understand these symbols differently than me, and that I may be alienating them to my detriment. It seems consumer products need to be mindful of cultural differences, is FreeBSD different? A larger community and increased OS market share wouldn't be all that bad, would it? I hope that those of you who believe in FreeBSD but with a personal conflict with the mascot or logo, band together and propose a complementary alternate symbol. I don't mean flooding the mail list (it's obvious we can do that on our own), I'm talking about difficult time-consuming organization, lobbying, and support gathering. For me, I hope Beastie endures forever - he our first and legacy mascot - but I also wouldn't object to one or two more officially sanctioned mascots and logos either. Dale Scott God, I rewrote this 4 times, because I need to be careful and correct here. First, there is no honest reason why people of differing opinions can't get along. If others have problems with me having my own beliefs, I won't force them to live my way, but they must respect my own choices too. The major point here, though, is a historical one: appeasement does not work, and even the attempt leads to problems. The point is, no sane person really believes that Beastie equates to devil worship, and I don't like the idea of letting crazies dictate my life. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Need bsd make for AIX
On 09/16/10 20:34, Ivan Voras wrote: On 09/16/10 08:58, srividy...@tcs.com wrote: Hi Is there any BSD make versions available for AIX platform? We require the make utility of BSD to compile few source programs. Is there any make utility compatible with AIX? Could you please give us the URL where we can get the same? FreeBSD's make is an integral part of the FreeBSD file system. It is not created to be compatible across systems, but it is also not created to prevent this kind of porting. Wow. I disagree. It's been modified over the years to depend heavily on a set of libraries that are available nowhere else but FreeBSD. This was done (from what I can see) in the name of elegance ... because the actual functions ARE available elsewhere, but a bunch of modifications need to be added, no possible way is it going to compile anywhere else. I ported it a few years ago to Linux, so I know it can be moved, but it's not a trivial job. Too bad, because it's a fine tool, and all those mods added no functionality that I can see. ___ 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