From: Robert Rothenberg Date: 01:33 on 29 Dec 2007 Subject: whereami is lost Turns out there's a couple of *nix packages for detecting what network you are in and configuring your system appropriately. One of them is "whereami". A few brief bits of hate to hurl it after spending a few hours trying to get it to work (unsuccessfully): - It has its very own scripting language, well, a few commands and if statements. Still, I'd rather they just provided some shell commands and let me write a detection script in a preferred less-hateful language. This is some general hate that can be lobbed at many programs. Why assume sysadmins can't handle reading a manual on some API and hack together some scripts in perl|python|ruby|tcl|whatever and instead give a manual for a crippled subset of a shell script. - There's a bug in the wireless detection command makes it difficult to be in both wireless and wired networks at the same time (this seems verified by the kinds of examples people post in forums on how to use it: if wired detection fails, try wireless). - It seems to be run at several stages in /etc/init.d, in network interfaces pre-up stage, and in dhcp3-exit stage--- this is due to it's confused purpose: detecting which network you are in so as to configure your network, and detecting which network you are in so as to configure other things (which already require the network to be configured); there should be two kinds of configuration scripts for this. - If I boot up or resume without a wired conneciton, it still leaves the wired device up even though it has no connection--- since it's the default, my network hiccups unless I put a kluge in that tells it to put down the wired interface if it's unplugged; without whereami, this isn't a problem. - I have to manually export location information into environment variables if I want other programs to use this information later - Not really a hate: The ability to run /home/$USER/.whereami as each $USER would be nice, but probably opens up some potential security holes; it's just as easy to add a "sudo -u user sh /home/user/.whereami" command anyhow. And for some related hate to throw at some other pieces of software (I'm thinking of Thunderbird at the moment): - The lack of a command-line interface to customise user preferences in some programs means that I have to write my own scripts to muddle with user-preferences and configuration (not a good thing if resuming from sleep with the said programs already running). Grrr. I want the lost hours of my life back. Rob
From: Robert Rothenberg Date: 15:37 on 31 Dec 2007 Subject: Re: whereami is lost Well, after re-reading man pages, I'm sort of wrong about a couple of things, but all the more reason to hate "whereami": On 29/12/07 01:33 I wrote: > - It has its very own scripting language, well, a few commands and if > statements. Still, I'd rather they just provided some shell commands and let > me write a detection script in a preferred less-hateful language. > > This is some general hate that can be lobbed at many programs. Why assume > sysadmins can't handle reading a manual on some API and hack together some > scripts in perl|python|ruby|tcl|whatever and instead give a manual for a > crippled subset of a shell script. > > - There's a bug in the wireless detection command makes it difficult to be > in both wireless and wired networks at the same time (this seems verified by > the kinds of examples people post in forums on how to use it: if wired > detection fails, try wireless). Well, no. The language consists of tests which, if successful, set a flag, and if-statements, which execute the tests inside the if-statements if the flag was set. Oh, when a test is successful, it skips all the tests afterwards, unless you precede the test with the "always" keyword. I suspect this is related to the fact that if-statements cannot be nested. Grrr.
Generated at 12:28 on 17 Feb 2008 by mariachi