Reinstall Debian init.d scripts into default runlevels

The following zsh snippet allows you to re-install any missing startup/init.d links.

This can be useful/required when e.g. installing an upstart based distribution (like Ubuntu Lucid) has removed some of those, and you want them back after downgrading to Hardy or switching to Debian testing (like I just did).
(apt-get install --reinstall won't bring back those links; you would have to purge (apt-get purge) and reinstall the package instead, removing any other configuration of the package though)

It basically looks for any init scripts that are not present in /etc/rc?.d/S* and then looks at the packages' postinstallation script for an update-rc.d command.

It will not install anything, but only output them (and allows you to pipe it into "sh" for execution).

Worked fine on my "messed up" system, but has rather odd results on my Maverick desktop.


for i in /etc/init.d/* ; do
    a=( /etc/rc?.d/S*$i:t(N) );
    ((${#a})) && continue;
    package=$(dpkg -S $i 2>/dev/null |cut -d: -f1);
    [[ -z $package ]] && continue;
    echo "# $i: $package";
    grep "update-rc\.d $i:t" /var/lib/dpkg/info/$package.postinst;

(in case you need to extract the init script altogether, the following might help for starters:
dpkg-deb --extract /var/cache/apt/archives/$PACKAGE.deb /tmp/foo.)



Mal was lustiges, via Reddit.

Von Daniel in fun06.08.10 German (DE) E-Mail
Schlagworte: , ,


Ubuntu Stack Exchange opened for public beta

Link: http://ubuntu.stackexchange.com/

Ubuntu Stack Exchange has been opened for public beta.

It's similar to (and driven by the same software as) Stackoverflow or Superuser: a user driven site focused on questions and answers regarding a particular topic.

While being in closed beta (to get an initial set of questions, answers and users), the Ubuntu Stack Exchange got more support than the (more generic) Linux Stack Exchange (according to Joel).

By Daniel in Ubuntu2010-08-04 English (EU) Email


Synchronize NoScript settings using Firefox Sync

To synchronize your NoScript settings using Firefox sync (formerly known as Weave) you basically just have to enable storing the NoScript settings into bookmarks (first on master, then on slaves, after having synced).

For full instructions see the NoScript author instructions.

By Daniel in web life05/21/10 English (US) Email

Useful wrappers for apt-get, apt-source and apt-file

Link: https://github.com/blueyed/oh-my-zsh/blob/master/plugins/apt/apt.plugin.zsh

I've finally started to manage the setup of my dotfiles (configuration files) for shell, editor etc.
It is based on the popular dotfiles repository of ryanb and my fork can be found at github:blueyed/dotfiles.

While I'm still in the process of setting this up, I've just added the apt-* helpers I wrote some years ago:

They provide neat things like asrc -g hardy hello to get the version of the "hello" package from hardy (via "apt-get source" and the version number grepped from "apt-cache madison" - so you need to have it in your apt sources list, of course).
Also, ashow -g testing hello will show the package from Debian testing.

Apart from that these are mostly aliases, like "aup" for "sudo apt-get update" and some of them support shell completion (of package names) for e.g. "ainst" ("sudo apt-get install"). Shell completion works in both zsh and bash (at least).

You can get the file (to be sourced in a shell) from:

Feedback is very welcome and I am sure some of this is in packages like debian-goodies already (actually, there's nothing like that in _that_ package, but..).

Does it make sense to add (parts of) it to some package for easy installation across Debian/Ubuntu?


Flattr: you pay for the web

Micro wird ja gerne mit "u" abgekürzt: möchte man nun einen kurzen Twitter-Hash für "Micropayment" erstellen, und das ganze noch in den Zusammenhang des "man bezahlt" stellen, muss "#upay" dabei herauskommen.

Und genau darum geht es:
Einfach bezahlen, und dadurch geben. Bekommen kommt dann wenn man es verdient.

Man sieht etwas, das einem gefällt und hat die Möglichkeit einfach nur "I Like" zu klicken, und dadurch Geld (ein offizielles Tauschmittel) zu transferieren, spenden und zu verteilen.

In diesem Zusammenhang: Flattr wurde als Beta freigegeben: ein Micro-Payment-Dienst, wo das monatliches Budget (z.B. 2€ oder auch 50€) auf alle Upvotes/Klicks in diesem Zeitraum (Monat) verteilt wird: mag man 4 Sachen in der Zeit gibt es für jeden 50¢ oder 12,5€, mag man 50 Sachen bekommt jeder 4¢ oder 1€).

Kleinvieh macht am meisten Mist und die Intention hierbei ist es, ein einfaches Transferieren zu ermöglichen - allerdings natürlich durch ähnlich umfassende Integration, wie es der Facebook-"I like"-Button verlangt (durch Einbinden des JavaScripts auf den Seiten).

Wer bereits einen Flattr-Zugang hat, darf dies nun gerne in meinem Blog-Sidebar ausprobieren und praktizieren, indem er meinem "Thing" (Blog) einen Teil der monatlichen Tantiemen gibt - (auch diesem Eintrag habe ich nun manuell das Widget hinzugefügt).

Ich bin auch angefangen ein umfassenderes b2evolution-Plugin zu schreiben, allerdings mal wieder sehr von Kleinigkeiten im "evocore" frustriert und abgelenkt worden.

Derzeit ist der Dienst noch nicht frei zugänging, man kann sich aber zur Beta anmelden (was ich wohl vor einigen Wochen/Monaten irgendwann getan habe).


tqWorms reloaded

I've noticed some days ago that the DOS game I've written in 1999 can get played still using DOSBox.

The sound is apparently a bit crappy - but fortunately this is not on Linux only..

You can view the old software home at thequod.de/.../tqworms, but this is apparently very old already and I should get it some new home probably. Anyway, https://www.thequod.de/de/comp/mysoft/tqworms should be fine.

Screenshots are up on Flickr finally and it's known to cause maximum pleasure with 5+ users on the same keyboard only.

Would love to play this again - maybe even more when sound stutter (via DOSBox) is being fixed.

By Daniel in development, Ubuntu05/07/10 English (US) Email