The original photo even has a Wellington City Council copyright on it. Wroth indeed.
Archive for March, 2009
Ever since the new flag engine came in it’s been possible to specify your generic flags in UseFlags.conf, using the same syntax you’d use in the GenericFlags.conf file. I’ve decided it’s not really worth having two separate closely-related files to do that, so GenericFlags.conf has been merged into UseFlags.conf in the default settings for trunk Scripts. It will make them more discoverable too, which is handy.
New users will get that automatically; existing users will need to run `UpdateSettings Scripts` and merge the files, then delete GenericFlags.conf once it’s not in use. If you’ve modified your generic flags, just concatenate it with UseFlags.conf; otherwise, the auto-merge ought to work.
Two new commands (or new syntaxes, really) come in to make it all easier too: foo:+ bar baz will prepend bar and baz to the generic foo, which may be especially handy in ~/.config/Scripts/UseFlags.conf. The other is foo:- bar baz, which will remove bar and baz from foo (wherever they’re listed).
All of this is in trunk Scripts now; if you’re not tracking trunk, you’ll get to see it in the next release.
Something I had on my mind for a while and now got around to while I was setting up a new system – a way of serving a file over HTTP without having to set up a proper server, with some nicer traits than a straight `netcat -lc -p 8080 < file` does. This is the one-shot web server: run osws file.tar.bz2 and it immediately starts a server on port 8080 (by default, can be changed) that will redirect a request for / to /file.tar.bz2 (so it saves with the right name from wget, or shows up nicely elsewhere) and will serve out the content of the file for any other request, then terminate.
That means wget http://10.1.1.5:8080 will save file.tar.bz2 on the remote client. Accessing from a web browser or other tools will work as well. osws can also serve on port 80, either when run as root or by using its fwd_osws tool, which is intended to be installed setuid and forwards the port locally to the real server. More details are in the README file; osws depends on netcat and the usual array of standard utilities, and a C compiler with root access for fwd_osws.
make && make install will install to ~/.local by default; specify PREFIX to change that. make install-setuid will build and install osws-fwd: that needs to be run as root to make it setuid. That part is optional, the only missing feature will be the use of ports below 1024.