On Monday 08 March 2010 17:23:56 Petter Reinholdtsen wrote: > [Alexander Wirt] > > Therefore we would need a stable, machine parseable > > output. Something like > > > > S:NUM:RUNLEVELS:SCRIPT > > K:NUM:RUNLEVELS:SCRIPT > > > > or something like this comes into mind. > > If upstream is willing, which I believe is the case but would have to > be verified, I would be happy to have this as part of the insserv > package. There is some debug code already to dump the script order. > A patch to rewrite this to be available also in non-debug builds would > probably provide what you want. > > Patches welcome. :)
I added a patch to insserv which can output something like: $ ./insserv -s K:04:0 6:hwclock.sh K:07:0 6:umountfs K:03:0 1 6:rsyslog K:04:0 6:umountnfs.sh K:02:0 6:sendsigs ... S:02:2 3 4 5:dnsmasq S:02:2 3 4 5:irqbalance S:02:2 3 4 5:cpufrequtils S:01:2 3 4 5:loadcpufreq ... For all scripts in init.d dir. Is that okay? This might make something like a runlevel.conf configuration: ./insserv -s | sort | perl -e ' printf("#%s\t%-15s %-15s %s\n", "<sort>", "<off>", "<on>", "<script>"); while (<STDIN>) { chomp; ($sk, $seq, $lvls, $name) = split(":"); printf("%.2d\t%-15s %-15s %s\n", $seq, $sk eq "K" ? join(",", split(" ", $lvls)) : "-", $sk eq "S" ? join(",", split(" ", $lvls)) : "-", $name); }' Thanks, Kel. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org