If you have the fortune to need to follow some silly “Login” button for some wifi, regularly, the following little script may help you avoid this idiotic (and useless) task.
This example uses the WIFIonICE, the free wifi on german ICE trains, simply as I have it twice a day, and got annoyed by the pointless Login button. A friend pointed me at just wget-ting the login page, so I made Network-Manager do this for me. Should work for anything similar that doesn’t need some elaborate webform filled out.
This script needs to be put into /etc/NetworkManager/dispatcher.d and made executable, owned by the root user. It will run on every connection change, thats why the ACTION is checked. The case may be a bit much here, but it could be easily extended to do a lot more.
Yay, no more silly “Open this webpage and press login” crap.
And as just announced on d-d-a, I’m trying to break all the tools dealing with the (Debian) archive. Or something like it. But its about time to get rid of MD5Sum checksums, and SHA1 can go with it directly.
As it is only in experimental for now, we can test and see what still breaks. I hope it won’t be too much, so we can get it over all the archive (minus the stable stuff, of course).
For some reason, what I like most in this change is the following python code that ended up in our InRelease file generation tool:
Though I’m sure this can be done in much more readable ways, it’s doing what we need, but heck, took me a while to get it.
But probably the change to get rid of gzip will be much more challenging / hard to get through. Lets see, in the few minutes after my mail, I already got some notices about possible breakage here.
Fortunately those indices and the release file stuff are nicely seperated settings, so if it turns out we only take the checksums drop for now into the other suites, thats doable.
While writing this, the last bits of squeeze that haven’t been on archive.debian.org yet are moved over there, that is security and the lts suite. As soon as that script done, some tiny archive magic will happen and over the next few dinstall runs, the rest of squeeze that still was there will no longer be on our regular mirror network anymore.
If you still use it, now is the time to upgrade.
Update: Forgot to mention, but yes, squeeze-backports(-sloppy) is also archived on archive.debian.org.
It took nearly a year, but today a new ftpsync version got released. Most of the work for this release was done by weasel, with one new feature submitted by waldi, my work was mostly style fixes and a bit of documentation. And of course the release now.
If you run a mirror, you will find the new version at the usual place, that is the project/ftpsync/ subdirectory. You may also want to subscribe to the debian mirrors mailinglist, as the mirror team will post more information about changes in ftpsync there.
This time it gained getopts style options - while retaining the “old” non-getopts style. It now can open more than one multisession to the same set of hosts, so you can connect multiple times to “host1 host2” at the same time. No matter if you open them using the “ms” subcommand or the pre-defined sessions from the .tmux.d directory.
I also took a bit and wrote some zsh completion for it. I’m pretty sure this can be done better and am happy for patches, but it does work for me, so for now I’m happy.
Another major release of Debian where I had the pleasure to do the ftpmaster work for the release. Like the last times, Mark joined to help with the work. But 2 FTPMasters aren’t enough for one Wheezy, or so, so Ansgar had his first run aside from point releases.
With the whole load of work the release team did in the past to prepare this, combined with all the changes in dak we had since Squeeze, it turned out to be rather easy for us.
Again, a few moments and not a detailed log (times in CEST):
[10:45] Let’s prepare. Cronjobs go off on ftp-master and security, shared tmux session setup, including a live pipe into a file so other team members can follow using “less +F -R”, a titanpad page opened to share in writing the commands to process later.
[11:18] One last package update done manually. The latest and greatest of installation-guide, 20130503, really wants to join the rest in wheezy.
[12:00] While I did a database backup and started preparing the set of commands for later, Mark and Ansgar prepared our code to deal with the changes we are about to make.
[12:33] I start executing the commands (shell and sql), so somewhen after here we have Squeeze as oldstable (with all its extra suites also renamed), Wheezy as stable (taking its own suites with it, as well as gaining the -updates).
And Jessie starts its life.
[12:45] Heissa, wouldn’t be fun if we wouldn’t have some bugs, so we just created a load of directories not needed or wanted. Not getting Jessies either. Ohwell.
[13:00] Jessie gets a copy of Wheezy to start with. Made the mistake to try that with our usual tool, control-suite. Err. Wrong. This is doing a set of checks on each package inserted. Would take ages. While one SQL to bypass the checks was a minute or so.
[13:xx] Got annoyed by our concept of consistency. Its great. Every tool takes suite names/codenames in a different way. Seperated with spaces, with commas, with codenames, with suitenames, we mix it in all possible combinations.
[14:00] Ansgar finished updating our security master host to cope with the changes for the release.
[14:39] Squeeze Release files got regenerated and signed again.
[14:54] Wheezy Release files got generated and signed.
[15:05] The cd build machine has a synced mirror tree, so they can start building our CD/DVD images
[16:25] A manual dinstall finished. And while it had some small problems (including nearly overwriting something inside the wheezy dists/ tree), it went pretty smoothly.
[21:00] After having kept the archive turned off for the whole day, we have 90 uploads with ~3Gb of uploads waiting. As it is now unlikely that we need larger archive changes, we turn (most of) our cronjobs back on, to get them processed.
Right now (that is, 21:08 CEST) I am mostly waiting for the CD build to finish. Current schedule seems to have that in some two and a half hours, after which we can push the mirrors and our press people announce it. Except if Murphy wants to show up, but lets hope that not.
Thanks go out to everyone involved in preparing this release, be it in the past by fixing bugs, uploading packages, doing whatever was needed, as well as doing the work today.
There is now a new variable, TMSESSHOST. If that is set to false, the hostname of the current machine won’t be prepended to the generated session name. true is the default, as that was the behaviour in the past.
It now can attach to any session, not just the ones it created itself, thus nearly entirely removing my need of ever calling tmux directly.
And cosmetically - window names for sessions defined in the .tmux.d directory are no longer plain “Multisession”, but the session name as defined in the file.
Just a small update for those that use my little tmux helper: You may want to fetch the latest version from my git repository. At least if you have to deal with a tmux version prior to 1.4 (like, on squeeze), though I really recommend to use a later one. 1.6 from backports or 1.7 (but thats not backported). Fix is small, just a better handling of the non-existing -V option to get the version information.
As most people that are using “that funny grey on black thing with the blinking white box” AKA a commandline, I do have a heavily configured shell. zsh in my case. Some while ago my old configuration for it started to annoy me and so I set out to redo it. With the basic requirement to be flexible and able to adjust to various zsh versions (back as far as Lenny).
I’ve set out and looked how others do it and took the (I hope) best bits and put them together in a way I like it. Maybe others want to pick from me, so here I describe a little, maybe someone is interested…
First - the config is completly inside .zsh. The only thing directly in my $HOME is a symlink from $HOME/.zshenv to $HOME/.zsh/zshenv.home. All in one place, nicer this way. The zshenv just sets ZDOTDIR, so zsh then uses the .zsh itself.
Next I am using “modules”. Well, actually everything is splitted out in small(er) files, so its way easier to maintain. And to overwrite stuff wherever I need to. So my .zshrc just loads those “module” files - and then goes and checks if it finds the same file inside a series of subdirectories. Those subdirectories are based on the hostname, the kernel name, the username, the domain name and the name of the distribution of the system. And a number of combinations of those.
That system allows me, for example, to have a set of aliases defined only on Debian systems (like those to do with apt-get & co). Or define some extra variables if I login to the host franck, domain debian.org. Or whatever more. I’m also on the way of doing something similar for all my dotfiles.
While I was working at that I finally got fed up with the fact that my prompt, which is based on Phil!’s wasn’t doing what I wanted it on various of the hosts I access. Thankfully someone pointed me at a change to the grml zsh config: Frank Terbeck rewrote their prompt to make use of the zstyle system.
Now that got me going, I like the idea of having the whole prompt easily configurable and changeable. My prompt always has shown slight differences depending on where the shell runs, which meant I had to carefully craft PS1 for every such change, and when one changes something one had to check all the places to adjust them too.
No longer. I took Franks work and extended it for me. I wanted to still have a design matching my old prompt (minus colors, I changed color themes anyways), but with full flexibility the zstyle system can offer here.
Now I am at a point where
One zstyle call can change the information or order in my prompt.
The prompt automagically leaves out information when the terminal width gets under a limit,
I can have whatever extra information items in the prompt, even if the prompt never defined a default for it. Including running neccessary functions to update those extra items.
the prompt switches between color and black/white mode with one zstyle change,
the prompt draws lines differently, depending on the capabilities of the terminal.
As an example, on the ftp-master host my prompt, while otherwise being the same as everywhere else, contains one extra item - displaying the current status of the archive (dinstall).
If you want to try it, the setup file is available, but note that I don’t give any warranty. :) “Works for me”.
I load it in my Prompts module, while having the prompt setup file in my function path. The 4 commented lines, my testcase, are a nice example of a custom token, though a real life one, the setup for the ftp-master prompt with the one extra item can be found over here.
Comments? Bugfixes? Enhancements?
Update: Got asked for an example how to use my prompt to “fake” another. So here is what you need to do to use my prompt setup to imitate the prompt clint, as delivered with zsh:
And if you now tell me “Uh, thats so much more than just saying /prompt clint/”, then you are right. But then: This way is flexible. As I wrote above, my prompt on the ftpmaster host is different. Actually, my prompt on all machines inside the domain “debian.org” differs, by having
in the Prompts definition for domain:debian.org. And thats enough to show me im on a .debian.org machine by a yellow hostname, instead of my default red.
On the ftpmaster host I have the additional few lines:
And woo, thats simple. I think.
(There ought to be a way to just easily add the item at a defined place in the items zstyle, but meh, too lazy to look).