freebsd network problem and restarts
Hi ! Lately after install of new hardware, I upgraded to FreeBSD 7.0 AMD64. Problem is that every few days (5 or so) computer network connection is lost, if I restart computer everything is OK again What I need is script that will determine if connection is valid and if not restarting the machine. I plan to run this script by cron every hour... I am very lousy with writing scripts of anykind, so I would need little help from you... Script must do following things: 1. Check if connection is alive by pinging one site, www.google.com should be good example 2a) If connection is ok, script is finished 2b) There is no response following stuff must happen: a.) Wait for 10 minutes (or some specified time) and try step 1 again if fails following thing are done b.) Write line into log that connection is failed c.) Inject mail message to local sendmail instance (so that mail is sent after restart) d.) Reboot computer If someone knows about script that does this things, I would be very thankful if he/she could help me. If not I would be thankful for any help in creating such script. Thank you in advance. Andy ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
I had a Linux shared library problem on NetBSD that I think it might be helpful to mention. thunderbird (and firefox) set LD_LIBRARY_PATH to pick up their own modules. When acroread is invoked to display a pdf attachment, LD_LIBRARY_PATH is still set, and this causes acroread to read a BSD library. My workaround is to use a script for acroread that cleans the environment. I think this is a thunderbird bug; the environment of invoked programs should match the environment as of thunderbird's invocation. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
Quoting Yuri <[EMAIL PROTECTED]> (Fri, 30 Nov 2007 16:49:03 -0800): This is better suited in emulation@ > I am trying to run Linux version of Skype and am getting the following error: > /usr/home/yuri/skype/current/skype: error while loading shared libraries: > /usr/lib/librt.so.1: ELF file OS ABI > > File /usr/lib/librt.so.1 is FreeBSD library and > /usr/compat/linux/lib/librt.so.1 is Linux library with the same name > installed by linux_base-fc-4_10. > > My LD_LIBRARY_PATH is set to /usr/compat/linux/lib:/usr/compat/linux/usr/lib. The recommendation is to _not_ set the LD_LIBRARY_PATH. > Why FreeBSD version is being picked up even though it's not > in LD_LIBRARY_PATH? Have a look at the search order of libs in linux. Correlate this with the fact that when in linux an access is done to e.g. /lib/libX.so.y which means that the linuxulator first looks if /compat/linux/lib/libX.so.y is there, and if it isn't it looks if /lib/libX.so.y is available. AFAIR a work around is to add a link in /compat/linux/usr/lib/librt.so.1 -> /lib/librt.so.1 I want to do something like this in the FC4 port, but hadn't time to do it and test it so far. Bye, Alexander. -- The TV show you've been looking forward to all week will be preempted. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
On Sat, 01 Dec 2007 11:11:39 -0500 Greg Troxel <[EMAIL PROTECTED]> wrote: > I had a Linux shared library problem on NetBSD that I think it might be > helpful to mention. And I have pretty much the exact same bug in OSX. > thunderbird (and firefox) set LD_LIBRARY_PATH to pick up their own > modules. When acroread is invoked to display a pdf attachment, > LD_LIBRARY_PATH is still set, and this causes acroread to read a BSD > library. My workaround is to use a script for acroread that cleans the > environment. s/thunderbird/claws-mail/ s/acroread/dillo/ In my case, the problme isn't emulation-related; it's that claws-mail uses a different version of some library than the system has. Dillo uses it anyway, then fails to find the features that were there when it was built, and exits. > I think this is a thunderbird bug; the environment of invoked programs > should match the environment as of thunderbird's invocation. In general, yes. But in these cases, smarter library resolution (or maybe it's to smart) could also solve the problem. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Looking for syscalls documentation pointers.
Sdävtaker <[EMAIL PROTECTED]> writes: > I was reading the syscalls.master and it only says the number and name > of the syscall, and only few are documented at man. Look harder. Almost all FreeBSD system calls have a man page. > Any idea who could have that kind of documentation? > As example, what determines the permitions of a just created file? The second argument to creat(2) or the third argument to open(2). DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
On Sat, 1 Dec 2007, Alexander Leidinger wrote: Have a look at the search order of libs in linux. Correlate this with the fact that when in linux an access is done to e.g. /lib/libX.so.y which means that the linuxulator first looks if /compat/linux/lib/libX.so.y is there, and if it isn't it looks if /lib/libX.so.y is available. AFAIR a work around is to add a link in /compat/linux/usr/lib/librt.so.1 -> /lib/librt.so.1 I want to do something like this in the FC4 port, but hadn't time to do it and test it so far. It sounds like the real problem is that there are some cases where we don't want the Linuxulator to merge the underlying and Linux views of the file system -- we don't want the union of /compat/linux/lib and /lib, we just want /compat/linux/lib? Robert N M Watson Computer Laboratory University of Cambridge ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, Dec 01, 2007 at 11:01:46PM +, Robert Watson wrote: > > On Sat, 1 Dec 2007, Alexander Leidinger wrote: > > >Have a look at the search order of libs in linux. Correlate this with > >the fact that when in linux an access is done to e.g. /lib/libX.so.y > >which means that the linuxulator first looks if > >/compat/linux/lib/libX.so.y is there, and if it isn't it looks if > >/lib/libX.so.y is available. > > > >AFAIR a work around is to add a link in > >/compat/linux/usr/lib/librt.so.1 -> /lib/librt.so.1 > > > >I want to do something like this in the FC4 port, but hadn't time to > >do it and test it so far. > > It sounds like the real problem is that there are some cases where we > don't want the Linuxulator to merge the underlying and Linux views of > the file system -- we don't want the union of /compat/linux/lib and > /lib, we just want /compat/linux/lib? The problem mainly arises when a library appears earlier in the search path in the underlying view of the file system than in the Linux view. (e.g. there is no /compat/linux/path1/lib/libX.so.y but there is a /path2/libX.so.y and path2 appears before path1 in the ld search path). X-related libraries are a good example; since we moved to a ${LOCALBASE}-based X hierarchy, all X-based dynamically-linked linux binaries pick up the native X libraries (i.e. from /usr/local/lib), unless advised otherwise (e.g. via LD_LIBRARY_PATH=/compat/linux/usr/X11R6/lib:$LD_LIBRARY_PATH). Symbolic links do work. Another solution is to rearrange dynamic libraries under /compat/linux so that they match the FreeBSD hierarchy (and teach ld-linux to use the same search path as the native loader). And yet another solution is to teach the linuxolator to first do an exhaustive search for libraries under /compat/linux and only then fall back to native ones (this seems similar to the above LD_LIBRARY_PATH incantation). Just my $0.02. \n\n -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4 (FreeBSD) Comment: Nikos Ntarmos <[EMAIL PROTECTED]> iD8DBQFHUgqim6J1ac+VFgoRAunbAJ4/zMkaKVO4Nuu5ddyjww1WIzdtQACeOq7C i4a+uIyjPXAHfghAhfOgs9M= =qKI+ -END PGP SIGNATURE- ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Linux executable picks up FreeBSD library over linux one and breaks
On Sun, 2 Dec 2007, Nikos Ntarmos wrote: > libraries under /compat/linux so that they match the FreeBSD > hierarchy (and teach ld-linux to use the same search path as the > native loader). And yet another solution is to teach the linuxolator > to first do an exhaustive search for libraries under /compat/linux > and only then fall back to native ones (this seems similar to the > above LD_LIBRARY_PATH incantation). The problem is that the dynamic linker is only opening files based on the search path & cache - it doesn't know it isn't on a real linux box. I think the only way to 'fix' it would be to kludge the linuxulator to treat ld.so specially but that would be pretty gross :( It IS a pain tho! :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C signature.asc Description: This is a digitally signed message part.