I thoroughly detest udev: large, ugly, inflexible, disgusting,
recently started to insist on DEVTMPFS and /usr being on / (or having
an initramdisk, neither of which I accept) and so on.
For the few situations where there are dynamic changes on my boxes (e.g.
usb sticks, radio killswitch and so on) I've made do with hotplug until now, but that set of shell scripts has simply grown
too annoying to maintain. But recently I found out about mdev, a small
component of busybox, and I took
to it instantly.
Mdev was designed to be a micro-udev for all kinds of embedded systems where
busybox is playing the vital role of providing most (if not all) classic
unix tools.
To me mdev is the embodiment of the unix mindset: do one thing, and do it well.
And that's what it does: if given the -s switch, it trawls
/sys for things that look like devices and creates them in
/dev. When run without args as hotplug helper, it creates the
device the kernel tells it about, or loads firmware if that's asked for,
or removes a device if the kernel says it is going away.
These operations are adjustable via a straightforward, simple configuration
file which also lets you tell it to run commands of your choice (and load
modules), and that's all there is to it. mdev consists of about 650
lines of C, and it works very well.
What it is/was lacking, is support for kernel uevents with action=change,
which some subsystems use (e.g. the rfkill subsystem signals changes to
any radio kill switches that way). So I wrote
this tiny patch to add that capability (I
hope upstream includes it in the next version of busybox), and mdev now
runs *-tagged commands on add, remove and change.
The other lacking thing is documentation - in the debian packages, that is.
mdev is decently explained in docs/mdev.txt
and examples/mdev*.conf in the source tarball, but the
debian maintainer chose not to ship any of that. I'd recommend getting and
reading those documents first if you ponder playing with mdev.
So, to help others along a bit, here is my own setup as an example:
I do have a few extra bits and pieces (e.g. startup scripts, small
rfkill and bluetooth agents), but they're somewhat idiosyncratic and
likely not very useful to others (but just ask if you do want them).
[ Mon 07.05.2012 20:23 |
/interests/debian |
comment ]
- Socialism:
- You have 2 cows. You give one to your neighbour.
- Communism:
- You have 2 cows. The state takes both and gives you some milk.
- Fascism:
- You have 2 cows. The state takes both and sells you some milk.
- Nazism:
- You have 2 cows. The state takes both and shoots you.
- Bureaucratism:
- You have 2 cows. The state takes both, shoots one,
milks the other and then throws the milk away.
- Traditional Capitalism:
- You have 2 cows. You sell one and buy a bull. Your herd multiples and
the economy grows. You sell them and retire on the income.
- American Capitalism:
- You have 2 cows. You sell one, and force the other to produce the milk
of four cows. Later, you hire a consultant to analyse why the cow
has dropped dead.
- Enron Venture Capitalism:
- You have 2 cows. You sell 3 of them to your publicly listed company using
letters of credit opened by your brother-in-law at the bank, then execute
a debt/equity swap with an associated general offer so that you get all four
cows back, with tax exemption for five cows. The milk rights of the six cows
are transferred via an intermediary to a Cayman Island Company secretly
owned by the majority shareholder who sells the rights to all seven cows
back to your listed company. The annual report says the company owns eight
cows, with an option on one more. You sell one cow to buy a new president
of the United States, leaving you with nine cows. No balance sheet provided
with the release. The public then buys your bull.
- Accenture Model Capitalism:
- You have 2 cows. You shred them.
- French Capitalism:
- You have 2 cows. You go on strike, organise a riot and block the roads
because you want 3 cows.
- Japanese Capitalism:
- You have 2 cows. You redesign them so they are 1/10 the size of an ordinary
cow and produce twenty times the milk. You then create a clever cow cartoon
image called "Cowkimon" and market it worldwide.
- German Capitalism:
- You have 2 cows. You re-engineer them so they live for 100 years,
eat once a month and milk themselves.
- Italian Capitalism:
- You have 2 cows, but you don't know where they are. You decide to have lunch.
- Russian Capitalism:
- You have 2 cows. You count them and learn that you have 5 cows. You count
again and learn you have 42 cows. You count again and learn you
have 2 cows. You open another bottle of vodka.
- Swiss Capitalism:
- You have 5000 cows. None of them belong to you. You charge the owners
for storing them.
- Chinese Capitalism:
- You have 2 cows. You have 300 people milking them. You claim that you
have a full employment and and high bovine productivity. You arrest
the journalist who reports otherwise.
- Indian Capitalism:
- You have 2 cows. You worship them.
- British Capitalism:
- You have 2 cows. Both are mad.
- Iraqi Capitalism:
- Everyone thinks you have many cows. You tell them you have none but
they don't believe you and bomb the shit out of your farm. You still
have no cows, but at least you are part of a democracy.
- New Zealand Capitalism:
- You have 2 cows. The one on the left is looking pretty sexy...
- Australian Capitalism:
- You have 2 cows. Business seems good. You close the office and go for
a few celebratory beers.
[ Wed 02.05.2012 20:48 |
/interests/humour |
comment ]
[ Sat 21.04.2012 19:26 |
/interests/humour |
comment ]
possibly educated but precisely zero practical relevance.
i'm serious - which of the above would you consider to be practically
useful bits of knowledge and which not?
('impact the course of history'?!?....*bwuahahaa*)
source: pleated-jeans
[ Fri 06.04.2012 00:25 |
/interests/humour |
comment ]
There are people who pull off
pretty amazing stunts, like getting
lost for three days/four nights in a
fairly small national park just
inland from the Gold Coast.
Somehow I can see only one explanation: she must have been wearing her bikini
over her eyes :-)
[ Sun 18.03.2012 16:03 |
/interests/au |
comment ]
that's the way i read this company name:
'your health and safety is unintentional and purely accidental, as you
wouldn't need to buy our services if you were safe and healthy.'
[ Sun 18.03.2012 14:03 |
/interests/humour |
comment ]
(pic snarfed from
the demotivator company)
Researchers have found that going to meetings makes people stupid.
(The whole paper can be found here - a candidate for an IG Nobel
Price?)
If only the apparatchiks in my place of ork knew that - or even better,
read this Harvard Business review article...
[ Fri 02.03.2012 22:53 |
/interests/humour |
comment ]
One of the nasty
coercive laws of the last few years has just taken a beating:
A Yank federal appeals court has ruled that
being forced to decrypt your stuff
is unconstitutional. Good for the J. Doe
in question, who relied on TrueCrypt
which is a pretty nice tool (open-source - but badly licenced, multi-platform,
and it does plausible deniability).
The actual text of the ruling is also pretty interesting in its argumentation.
Now if only the powers that be in this place would scrap the
Cybercrime Act 2001 No. 161, items 12 and 28...
[ Fri 02.03.2012 22:24 |
/interests/anti |
comment ]
Last week Aldi OZ had an especially odd item on special:
blood stain removers, 8 units per pack.
Just how did I survive for 39 years without such highly crucial, essential
stuff that you need every single day?
(Maybe it's because I have a spade. Then, maybe not.)
[ Tue 31.01.2012 22:02 |
/interests/au |
comment ]
Nope - I'm in the wrong movie...or more likely: I work for the wrong
gang.
Maybe they 'award' us these things so as to properly weigh us down
here in the trenches, to make sure that no dreams or hopes escape
and fly away.
Well then, back to work in my usual 'first week of the semester'
work clothing...
[ Tue 24.01.2012 19:55 |
/interests/anti |
comment ]
The
current wanking draft for HTML5, section 8.2.2.2
translates into the W3C saying 'standards are a good thing, but we
are clairvoyant and know better than all of you, so fuck them standards and all
the people actually relying on standards compliance!'
Dear W3C, when I label material as being encoded in iso-8859-1
then I MEAN ISO-8859-1 and
not smart-shite-infested windows-1252, thank you very much.
Your oh-so-helpful labelling of this mess a 'willful violation, motivated by
a desire for compatibility' motivates me to shoot you all on sight.
[ Fri 16.12.2011 22:26 |
/interests/anti |
comment ]
I've got these Ikea spice racks in my kitchen, and the way I installed them
they needed to be fastened to the wall for stability. I didn't want to
drill the tiles, however.
Once again my answer is "recycling": I habitually salvage the magnets
from dead hard drives. The spice rack is coated steel, the magnets are pretty
strong and so I simply glued a bunch of them onto the tiles. Silicone
sealant makes a decent glue for operations like that, and it's removable
if need be. Problem solved.
[ Thu 15.12.2011 22:55 |
/interests/tinkering |
comment ]
...doesn't have to be high tech. I've got a new toy that I really like:
It's a Aristo 868 slide rule, and I find it pretty amazing
how much you
can do with it. Best of all: no batteries :-)
I'm obviously not against high tech, for example:
That's my trusty HP 28S, which I got in 1988 - RPN forever!
But still there is a certain minimalistic appeal to the simple
magic of sliding log scales...
[ Thu 15.12.2011 22:29 |
/interests/comp |
comment ]
I like
gumtree quite a bit: it's free
for private ads, no registration required, simple email-based access and
best of all it works. When my nephew visited we needed a car seat for
him, and the
second ad I responded to worked out. Now that Emil is back in Vienna the
seat is surplus.
I posted an ad two days ago, had four responses within 24 hours and sold the seat today (for the same amount as I paid two months ago). Very nice.
I just hope ebay (who own gumtree via some subsidiary nowadays) don't stuff
this service up...
[ Fri 02.12.2011 09:56 |
/interests/au |
comment ]
From the aptly named 'strange but true' category (in the Sydney Morning Herald news) here's a story about
ridiculously gullible people.
[ Tue 22.11.2011 10:05 |
/interests/humour |
comment ]
(with apologies to any non-Austrian readers for the utterly untranslatable
title...)
Today we turned this:
into this:
and here's the story.
(more...)
[ Thu 22.09.2011 23:15 |
/interests/tinkering |
comment ]
The laundry and the water heater are renewed and I'm declaring the
renovation work in this place done, finished, over.
(I know, I know, famous last words and all that - but at least
I
don't plan any further biggies).
Here are some photos of the exercise.
(more...)
[ Wed 14.09.2011 00:55 |
/interests/au |
comment ]
Not bad: since the new meter went in, I consumed electricity worth
$81 - and received $43 credit for the energy
my solar panels created.
[ Tue 13.09.2011 23:30 |
/interests/au |
comment ]
but then that's maybe a good thing? Because Tron = pretty cool for 1982,
but Tron Guy = doubleplusuncool, anytime.
Recently I bought some pretty cheap LED strips (5050-type, 60 LEDs/meter,
flexible, waterproof and self-adhesive, can be cut every 5cm, cost
$72 for ten meters) for overhauling the under-cabinet lighting in the kitchen.
One old laptop PSU went into the range hood casing (displacing the trashy
light sockets that thing had) and the left side is powered by a low-profile
LED transformer. Mounting the stuff is a breeze: cut to size, cut and
peel back a little of the silicon waterproofing, solder on wires, then
peel off the backing paper and stick it in place, done.
I think it looks great - I'm pretty sure my sisters
will say it looks like an abattoir...
It's certainly very nice for working and it's also pretty frugal for
the amount of light (about 2A at 12V on the left side, a bit less on
the right).
[ Sat 03.09.2011 22:25 |
/interests/tinkering |
comment ]
Look, a
leak - quick,
get a plumber!
IMNSHO the cablegate-gate serves assange right, after dribbling
out just some of the cables and in homeopathetic amounts over a year.
Information wants to be free after all:-)
[ Fri 02.09.2011 15:08 |
/interests/humour |
comment ]
That's a screenshot from a recent TV advertisment
where Dolly Parton threatens she'll visit Oz real soon, after leaving us
in peace for the previous 28 years.
Partlejuice indeed:
looks like she spent those umpteen years well interred and/or hitting
the botox clinics.
[ Mon 29.08.2011 23:16 |
/interests/humour |
comment ]
dear wikileaks webhamsters, would you *please* stop inflating every single damn cable
with all the navigational fluff? it's all empty carbs, you know, and makes mirroring
you a FPITA.
if you downloaded the latest cablegate snapshot via bittorrent you might be surprised
that it's only about 300 megabytes (for 150k cables) - but you WILL be unpleasantly surprised
when you unpack that archive: it expands (like kudzu) to a whopping 30+ gigabytes.
the reason: every single cable page is infested with links everywhere else and then some, so
that the actual content is just about 3%.
take this cable for example:
after ripping out all the gunk between <div class='pane small'> (might have called the
css class 'pain, big') and the closing </div> after 'courage is contagious', the page shrinks
from a whopping 168k to just 6k. the cleaned page thus consumes only
3.6% of the disk space and network bandwidth of the fugly original beast (and don't forget
there's 150 thousand such occurrences right now).
nobody, dear leakers, is going to mirror 30+g of you strutting your fluff on a daily basis -
but a decent, still navigatable 7g would be a very different story.
[ Mon 29.08.2011 13:57 |
/interests/anti |
comment ]
include, amongst others, that they're patronizing little
FPOS.
[ Thu 21.07.2011 21:17 |
/interests/humour |
comment ]
Some time ago I wrote up my
experiences with running gpg remotely.
This post documents the most recent changes I've made to my setup, which
finally make my gpg (and ssh) keys fully mobile and 'migratory'.
Like before I use the kernel key storage system to cache passphrases
(and that won't change until I switch to gnupg2 with the agent). But now
my keys are all stored on a usb stick, in an encrypted filesystem.
When I login the first time any day, I load the keys from the encrypted
storage into a RAM disk. (A simple symlink in ~/.gnupg is sufficient to
convince gnupg to find the secret ring.) When I leave for/from work I
nuke the RAM disk - that way the keys are always only present
where I physically am.
The big new change from the previous setup is that now I
use sshfs when I need to
use gpg for anything on a remote box: I ssh into the target box
with a remote port forwarded back to a listening instance of sftp-server
on the local box (which has the keys in RAM). With agent forwarding on, the
sshfs connection doesn't require entering passwords, and the mount point is of
course set to be the same as the RAM disk location for locally loaded keys,
so to gpg it's totally transparent. (I'd never do any of this if not all
machines in question were under my exclusive full control.)
sshfs is no speed daemon, but then the secret ring file isn't large.
sshfs with -o directport on the forwarded port reuses the existing outbound
ssh connection, so one single outbound ssh connection does it all - and
another benefit of that setup is that the keys vanish from the remote
machine as soon as the outbound ssh connection is shut down.
The one simple shell script doing all this setup is less than 60 lines long:
simple, neat, sufficient.
[ Wed 13.07.2011 20:26 |
/interests/crypto |
comment ]
What do you do with dead hard disks? I usually salvage the magnets; the
larger ones make perfect holders for things like tools, knifes or
mobiles.
Here's my ghetto mobile mount, mk.2: a 3x3cm piece of thin
sheet metal sellotaped to the back of the phone and two fat ex-disk magnets
screwed to the dashboard. Plenty strong, vibration-proof and completely
invisible under the silicone phone cover. And, of course, zero cost.
[ Mon 11.07.2011 22:12 |
/interests/tinkering |
comment ]
zeit wars, und gut is: der letzte von den 'adligen' gfriesern, ein gewisser
otto, ist jetzt endlich abgebankelt. zeit hat er sich gelassen - wie mit allem
anderen, wie zb. dem herrschafts-ansprüche aufgeben
(das hat bis 1961 gedauert...na hallo?!?).
aber sogar einen widerling wie den da erwischt es irgendwann - und jetzt
kriechen ihm, wie in ö ja so üblich und komplett erwartet - posthum die
ganzen schwarzen und sonstwie ewiggestrigen
deppen in den modrigen arsch.
[ Mon 04.07.2011 23:05 |
/interests/anti |
comment ]
..of those high-energy photons, please!
Ahem. On Monday the sparkies performed
the solar installation on my roof (6 big panels for a nominal 1.5kW of lovely solar electricity).
We'll see how much of my energy needs that will take care of (it won't be all for sure; I usually need
about 11kW/day and a 1.5kW installation won't provide more than 60% of that) - but the feed in tariffs
for exporting energy to the grid are good (so far): you get quite a bit more for your exported kW
than you pay for consumption.
Now I just need to wire up the inverter's serial port and start logging performance with rrdtool...
[ Wed 01.06.2011 11:51 |
/interests/au |
comment ]
Making the news today:
QLD coppers have arrested a journalist - for
attending the AusCERT conference and publishing articles
about the conference. Hello, WTF?!?
Right now it seems the coppers are backpedalling quite furiously, but they certainly
deprived him of his freedom (temporarily) and seized his ipad (not so temporarily).
[ Wed 18.05.2011 12:59 |
/interests/anti |
comment ]
Well, if I was a letter I'd also feel like being abandoned after
having those two parasitic muppets pasted on me.
(for my few colonial readers, Karl Kraus said "In Austria, sending a letter
means to abandon it". He was obviously not enamoured with the ÖPTV's services,
and used the nuances of German to the limit:
"Aufgeben" means both posting a letter and abandoning something
(as in: all hope), and "heissen" is good for both expressing
"is called" and "has the meaning of"...)
[ Fri 06.05.2011 19:24 |
/interests/au |
comment ]
[
newer... ] [
older... ]