--- insserv-1.14.0.orig/debian/update-rc.d-insserv +++ insserv-1.14.0/debian/update-rc.d-insserv @@ -0,0 +1,593 @@ +#! /usr/bin/perl +# +# update-rc.d Update the links in /etc/rc[0-9S].d/ +# + +use strict; +use warnings; + +my $initd = "/etc/init.d"; +my $etcd = "/etc/rc"; +my $notreally = 0; + +# Save last action to this directory +my $archive = "/var/lib/update-rc.d"; + +# Print usage message and die. + +sub usage { + print STDERR "update-rc.d: error: @_\n" if ($#_ >= 0); + print STDERR < remove + update-rc.d [-n] defaults [NN | SS KK] + update-rc.d [-n] start|stop NN runlvl [runlvl] [...] . + update-rc.d [-n] disable|enable [S|2|3|4|5] + -n: not really + -f: force + +The disable|enable API is not stable and might change in the future. +EOF + exit (1); +} + +# Dependency based boot sequencing is the default, but upgraded +# systems might keep the legacy ordering until the sysadm choose to +# migrate to the new ordering method. sysv-rc version 2.87dsf-2 will +# remove /var/lib/insserv/using-insserv and this divert, thus transfering +# the responsibility for dependency based update-rc.d to sysv-rc. +if ( -f "/var/lib/insserv/using-insserv" && ! -f "/etc/init.d/.legacy-bootordering" ) { + info("using dependency based boot sequencing"); + exit insserv_updatercd(@ARGV); +} + +# Check out options. +my $force; + +my @orig_argv = @ARGV; + +while($#ARGV >= 0 && ($_ = $ARGV[0]) =~ /^-/) { + shift @ARGV; + if (/^-n$/) { $notreally++; next } + if (/^-f$/) { $force++; next } + if (/^-h|--help$/) { &usage; } + &usage("unknown option"); +} + +sub save_last_action { + my ($script, @arguments) = @_; + + return if $notreally; + + open(FILE, ">", "$archive/${script}.new") || die "unable to write to $archive/${script}.new"; + print FILE join(" ","update-rc.d",@arguments), "\n"; + close(FILE); + rename "$archive/${script}.new", "$archive/${script}"; +} + +sub remove_last_action { + my ($script) = @_; + unlink "$archive/$script"; +} + +# Action. + +&usage() if ($#ARGV < 1); +my $bn = shift @ARGV; + +unless ($bn =~ m/[a-zA-Z0-9+.-]+/) { + print STDERR "update-rc.d: illegal character in name '$bn'\n"; + exit (1); +} + +if ($ARGV[0] ne 'remove') { + if (! -f "$initd/$bn") { + print STDERR "update-rc.d: $initd/$bn: file does not exist\n"; + exit (1); + } + &parse_lsb_header("$initd/$bn"); + &cmp_args_with_defaults($bn, $ARGV[0], @ARGV); +} elsif (-f "$initd/$bn") { + if (!$force) { + printf STDERR "update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)\n"; + exit (1); + } +} + +my @startlinks; +my @stoplinks; + +$_ = $ARGV[0]; +if (/^remove$/) { &checklinks ("remove"); remove_last_action($bn); } +elsif (/^defaults$/) { &defaults (@ARGV); &makelinks; save_last_action($bn, @orig_argv); } +elsif (/^(start|stop)$/) { &startstop (@ARGV); &makelinks; save_last_action($bn, @orig_argv); } +elsif (/^(dis|en)able$/) { &toggle (@ARGV); &makelinks; save_last_action($bn, @orig_argv); } +else { &usage; } + +exit (0); + +sub info { + print STDOUT "update-rc.d: @_\n"; +} + +sub warning { + print STDERR "update-rc.d: warning: @_\n"; +} + +sub error { + print STDERR "update-rc.d: error: @_\n"; + exit (1); +} + +sub error_code { + my $rc = shift; + print STDERR "update-rc.d: error: @_\n"; + exit ($rc); +} + +# Check if there are links in /etc/rc[0-9S].d/ +# Remove if the first argument is "remove" and the links +# point to $bn. + +sub is_link () { + my ($op, $fn, $bn) = @_; + if (! -l $fn) { + warning "$fn is not a symbolic link\n"; + return 0; + } else { + my $linkdst = readlink ($fn); + if (! defined $linkdst) { + die ("update-rc.d: error reading symbolic link: $!\n"); + } + if (($linkdst ne "../init.d/$bn") && ($linkdst ne "$initd/$bn")) { + warning "$fn is not a link to ../init.d/$bn or $initd/$bn\n"; + return 0; + } + } + return 1; +} + +sub checklinks { + my ($i, $found, $fn, $islnk); + + print " Removing any system startup links for $initd/$bn ...\n" + if (defined $_[0] && $_[0] eq 'remove'); + + $found = 0; + + foreach $i (0..9, 'S') { + unless (chdir ("$etcd$i.d")) { + next if ($i =~ m/^[789S]$/); + die("update-rc.d: chdir $etcd$i.d: $!\n"); + } + opendir(DIR, "."); + my $saveBN=$bn; + $saveBN =~ s/\+/\\+/g; + foreach $_ (readdir(DIR)) { + next unless (/^[SK]\d\d$saveBN$/); + $fn = "$etcd$i.d/$_"; + $found = 1; + $islnk = &is_link ($_[0], $fn, $bn); + next unless (defined $_[0] and $_[0] eq 'remove'); + if (! $islnk) { + print " $fn is not a link to ../init.d/$bn; not removing\n"; + next; + } + print " $etcd$i.d/$_\n"; + next if ($notreally); + unlink ("$etcd$i.d/$_") || + die("update-rc.d: unlink: $!\n"); + } + closedir(DIR); + } + $found; +} + +sub parse_lsb_header { + my $initdscript = shift; + my %lsbinfo; + my $lsbheaders = "Provides|Required-Start|Required-Stop|Default-Start|Default-Stop"; + open(INIT, "<$initdscript") || die "error: unable to read $initdscript"; + while () { + chomp; + $lsbinfo{'found'} = 1 if (m/^\#\#\# BEGIN INIT INFO\s*$/); + last if (m/\#\#\# END INIT INFO\s*$/); + if (m/^\# ($lsbheaders):\s*(\S?.*)$/i) { + $lsbinfo{lc($1)} = $2; + } + } + close(INIT); + + # Check that all the required headers are present + if (!$lsbinfo{found}) { + printf STDERR "update-rc.d: warning: $initdscript missing LSB information\n"; + printf STDERR "update-rc.d: see \n"; + } else { + for my $key (split(/\|/, lc($lsbheaders))) { + if (!exists $lsbinfo{$key}) { + warning "$initdscript missing LSB keyword '$key'\n"; + } + } + } +} + + +# Process the arguments after the "enable" or "disable" keyword. + +sub toggle { + my @argv = @_; + my ($action, %lvls, @start, @stop, @xstartlinks); + + if (!&checklinks) { + print " System start/stop links for $initd/$bn do not exist.\n"; + exit (0); + } + + $action = $argv[0]; + if ($#argv > 1) { + while ($#argv > 0 && shift @argv) { + if ($argv[0] =~ /^[S2-5]$/) { + $lvls{$argv[0]}++; + } else { + &usage ("expected 'S' '2' '3' '4' or '5'"); + } + } + } else { + $lvls{$_}++ for ('S', '2', '3', '4', '5'); + } + + push(@start, glob($etcd . '[2-5S].d/[KS][0-9][0-9]' . $bn)); + + foreach (@start) { + my $islink = &is_link (undef, $_, $bn); + next if !$islink; + + next unless my ($lvl, $sk, $seq) = m/^$etcd([2-5S])\.d\/([SK])([0-9]{2})$bn$/; + $startlinks[$lvl] = $sk . $seq; + + if ($action eq 'disable' and $sk eq 'S' and $lvls{$lvl}) { + $xstartlinks[$lvl] = 'K' . sprintf "%02d", (100 - $seq); + } elsif ($action eq 'enable' and $sk eq 'K' and $lvls{$lvl}) { + $xstartlinks[$lvl] = 'S' . sprintf "%02d", -($seq - 100); + } else { + $xstartlinks[$lvl] = $sk . $seq; + } + } + + push(@stop, glob($etcd . '[016].d/[KS][0-9][0-9]' . $bn)); + + foreach (@stop) { + my $islink = &is_link (undef, $_, $bn); + next if !$islink; + + next unless my ($lvl, $sk, $seq) = m/^$etcd([016])\.d\/([SK])([0-9]{2})$bn$/; + $stoplinks[$lvl] = $sk . $seq; + } + + if ($action eq 'disable') { + print " Disabling system startup links for $initd/$bn ...\n"; + } elsif ($action eq 'enable') { + print " Enabling system startup links for $initd/$bn ...\n"; + } + + &checklinks ("remove"); + @startlinks = @xstartlinks; + + 1; +} + +# Process the arguments after the "defaults" keyword. + +sub defaults { + my @argv = @_; + my ($start, $stop) = (20, 20); + + &usage ("defaults takes only one or two codenumbers") if ($#argv > 2); + $start = $stop = $argv[1] if ($#argv >= 1); + $stop = $argv[2] if ($#argv >= 2); + &usage ("codenumber must be a number between 0 and 99") + if ($start !~ /^\d\d?$/ || $stop !~ /^\d\d?$/); + + $start = sprintf("%02d", $start); + $stop = sprintf("%02d", $stop); + + $stoplinks[$_] = "K$stop" for (0, 1, 6); + $startlinks[$_] = "S$start" for (2, 3, 4, 5); + + 1; +} + +# Process the arguments after the start or stop keyword. + +sub startstop { + my @argv = @_; + my($letter, $NN, $level); + + while ($#argv >= 0) { + if ($argv[0] eq 'start') { $letter = 'S'; } + elsif ($argv[0] eq 'stop') { $letter = 'K'; } + else { + &usage("expected start|stop"); + } + + if ($argv[1] !~ /^\d\d?$/) { + &usage("expected NN after $argv[0]"); + } + $NN = sprintf("%02d", $argv[1]); + + if ($argv[-1] ne '.') { + &usage("start|stop arguments not terminated by \".\""); + } + + shift @argv; shift @argv; + $level = shift @argv; + do { + if ($level !~ m/^[0-9S]$/) { + &usage( + "expected runlevel [0-9S] (did you forget \".\" ?)"); + } + if (! -d "$etcd$level.d") { + print STDERR + "update-rc.d: $etcd$level.d: no such directory\n"; + exit(1); + } + $level = 99 if ($level eq 'S'); + $startlinks[$level] = "$letter$NN" if ($letter eq 'S'); + $stoplinks[$level] = "$letter$NN" if ($letter eq 'K'); + } while (($level = shift @argv) ne '.'); + } + 1; +} + +# Create the links. + +sub makelinks { + my($t, $i); + my @links; + + if (&checklinks) { + print " System start/stop links for $initd/$bn already exist.\n"; + return 0; + } + print " Adding system startup for $initd/$bn ...\n"; + + # nice unreadable perl mess :) + + for($t = 0; $t < 2; $t++) { + @links = $t ? @startlinks : @stoplinks; + for($i = 0; $i <= $#links; $i++) { + my $lvl = $i; + $lvl = 'S' if ($i == 99); + next if (!defined $links[$i] or $links[$i] eq ''); + print " $etcd$lvl.d/$links[$i]$bn -> ../init.d/$bn\n"; + next if ($notreally); + symlink("../init.d/$bn", "$etcd$lvl.d/$links[$i]$bn") + || die("update-rc.d: symlink: $!\n"); + } + } + + 1; +} + +## Dependency based +sub insserv_updatercd { + my @args = @_; + my @opts; + my $scriptname; + my $action; + my $notreally = 0; + + my @orig_argv = @args; + + while($#args >= 0 && ($_ = $args[0]) =~ /^-/) { + shift @args; + if (/^-n$/) { push(@opts, $_); $notreally++; next } + if (/^-f$/) { push(@opts, $_); next } + if (/^-h|--help$/) { &usage; } + usage("unknown option"); + } + + usage("not enough arguments") if ($#args < 1); + + $scriptname = shift @args; + $action = shift @args; + if ("remove" eq $action) { + if ( -f "/etc/init.d/$scriptname" ) { + my $rc = system("insserv", @opts, "-r", $scriptname) >> 8; + if (0 == $rc && !$notreally) { + remove_last_action($scriptname); + } + error_code($rc, "insserv rejected the script header") if $rc; + exit $rc; + } else { + # insserv removes all dangling symlinks, no need to tell it + # what to look for. + my $rc = system("insserv", @opts) >> 8; + if (0 == $rc && !$notreally) { + remove_last_action($scriptname); + } + error_code($rc, "insserv rejected the script header") if $rc; + exit $rc; + } + } elsif ("defaults" eq $action || "start" eq $action || + "stop" eq $action) { + # All start/stop/defaults arguments are discarded so emit a + # message if arguments have been given and are in conflict + # with Default-Start/Default-Stop values of LSB comment. + cmp_args_with_defaults($scriptname, $action, @args); + + if ( -f "/etc/init.d/$scriptname" ) { + my $rc = system("insserv", @opts, $scriptname) >> 8; + if (0 == $rc && !$notreally) { + save_last_action($scriptname, @orig_argv); + } + error_code($rc, "insserv rejected the script header") if $rc; + exit $rc; + } else { + error("initscript does not exist: /etc/init.d/$scriptname"); + } + } elsif ("disable" eq $action || "enable" eq $action) { + insserv_toggle($notreally, $action, $scriptname, @args); + # Call insserv to resequence modified links + my $rc = system("insserv", @opts, $scriptname) >> 8; + if (0 == $rc && !$notreally) { + save_last_action($scriptname, @orig_argv); + } + error_code($rc, "insserv rejected the script header") if $rc; + exit $rc; + } else { + usage(); + } +} + +sub parse_def_start_stop { + my $script = shift; + my (%lsb, @def_start_lvls, @def_stop_lvls); + + open my $fh, '<', $script or error("unable to read $script"); + while (<$fh>) { + chomp; + if (m/^### BEGIN INIT INFO$/) { + $lsb{'begin'}++; + } + elsif (m/^### END INIT INFO$/) { + $lsb{'end'}++; + last; + } + elsif ($lsb{'begin'} and not $lsb{'end'}) { + if (m/^# Default-Start:\s*(\S?.*)$/) { + @def_start_lvls = split(' ', $1); + } + if (m/^# Default-Stop:\s*(\S?.*)$/) { + @def_stop_lvls = split(' ', $1); + } + } + } + close($fh); + + return (\@def_start_lvls, \@def_stop_lvls); +} + +sub lsb_header_for_script { + my $name = shift; + + foreach my $file ("/etc/insserv/overrides/$name", "/etc/init.d/$name", + "/usr/share/insserv/overrides/$name") { + return $file if -s $file; + } + + error("cannot find a LSB script for $name"); +} + +sub cmp_args_with_defaults { + my ($name, $act) = (shift, shift); + my ($lsb_start_ref, $lsb_stop_ref, $arg_str, $lsb_str); + my (@arg_start_lvls, @arg_stop_lvls, @lsb_start_lvls, @lsb_stop_lvls); + + ($lsb_start_ref, $lsb_stop_ref) = parse_def_start_stop("/etc/init.d/$name"); + @lsb_start_lvls = @$lsb_start_ref; + @lsb_stop_lvls = @$lsb_stop_ref; + return if (!@lsb_start_lvls and !@lsb_stop_lvls); + + if ($act eq 'defaults') { + @arg_start_lvls = (2, 3, 4, 5); + @arg_stop_lvls = (0, 1, 6); + } elsif ($act eq 'start' or $act eq 'stop') { + my $start = $act eq 'start' ? 1 : 0; + my $stop = $act eq 'stop' ? 1 : 0; + + # The legacy part of this program passes arguments starting with + # "start|stop NN x y z ." but the insserv part gives argument list + # starting with sequence number (ie. strips off leading "start|stop") + # Start processing arguments immediately after the first seq number. + my $argi = $_[0] eq $act ? 2 : 1; + + while (defined $_[$argi]) { + my $arg = $_[$argi]; + + # Runlevels 0 and 6 are always stop runlevels + if ($arg eq 0 or $arg eq 6) { + $start = 0; $stop = 1; + } elsif ($arg eq 'start') { + $start = 1; $stop = 0; $argi++; next; + } elsif ($arg eq 'stop') { + $start = 0; $stop = 1; $argi++; next; + } elsif ($arg eq '.') { + next; + } + push(@arg_start_lvls, $arg) if $start; + push(@arg_stop_lvls, $arg) if $stop; + } continue { + $argi++; + } + } + + if ($#arg_start_lvls != $#lsb_start_lvls or + join("\0", sort @arg_start_lvls) ne join("\0", sort @lsb_start_lvls)) { + $arg_str = @arg_start_lvls ? "@arg_start_lvls" : "none"; + $lsb_str = @lsb_start_lvls ? "@lsb_start_lvls" : "none"; + warning "$name start runlevel arguments ($arg_str) do not match", + "LSB Default-Start values ($lsb_str)"; + } + if ($#arg_stop_lvls != $#lsb_stop_lvls or + join("\0", sort @arg_stop_lvls) ne join("\0", sort @lsb_stop_lvls)) { + $arg_str = @arg_stop_lvls ? "@arg_stop_lvls" : "none"; + $lsb_str = @lsb_stop_lvls ? "@lsb_stop_lvls" : "none"; + warning "$name stop runlevel arguments ($arg_str) do not match", + "LSB Default-Stop values ($lsb_str)"; + } +} + +sub insserv_toggle { + my ($dryrun, $act, $name) = (shift, shift, shift); + my (@toggle_lvls, $start_lvls, $stop_lvls, @symlinks); + my $lsb_header = lsb_header_for_script($name); + + # Extra arguments to disable|enable action are runlevels. If none + # given parse LSB info for Default-Start value. + if ($#_ >= 0) { + @toggle_lvls = @_; + } else { + ($start_lvls, $stop_lvls) = parse_def_start_stop($lsb_header); + @toggle_lvls = @$start_lvls; + if ($#toggle_lvls < 0) { + error("$name Default-Start contains no runlevels, aborting."); + } + } + + # Find symlinks in rc.d directories. Refuse to modify links in runlevels + # not used for normal system start sequence. + for my $lvl (@toggle_lvls) { + if ($lvl !~ /^[S2345]$/) { + warning("$act action will have no effect on runlevel $lvl"); + next; + } + push(@symlinks, $_) for glob("/etc/rc$lvl.d/[SK][0-9][0-9]$name"); + } + + if (!@symlinks) { + error("no runlevel symlinks to modify, aborting!"); + } + + # Toggle S/K bit of script symlink. + for my $cur_lnk (@symlinks) { + my $sk; + my @new_lnk = split(//, $cur_lnk); + + if ("disable" eq $act) { + $sk = rindex($cur_lnk, '/S') + 1; + next if $sk < 1; + $new_lnk[$sk] = 'K'; + } else { + $sk = rindex($cur_lnk, '/K') + 1; + next if $sk < 1; + $new_lnk[$sk] = 'S'; + } + + if ($dryrun) { + printf("rename(%s, %s)\n", $cur_lnk, join('', @new_lnk)); + next; + } + + rename($cur_lnk, join('', @new_lnk)) or error($!); + } +} --- insserv-1.14.0.orig/debian/compat +++ insserv-1.14.0/debian/compat @@ -0,0 +1 @@ +6 --- insserv-1.14.0.orig/debian/dirs +++ insserv-1.14.0/debian/dirs @@ -0,0 +1,6 @@ +etc/bash_completion.d +etc/insserv.conf.d +etc/insserv/overrides +usr/sbin +usr/share/insserv/overrides +var/lib/update-rc.d --- insserv-1.14.0.orig/debian/bts-lefttoreport +++ insserv-1.14.0/debian/bts-lefttoreport @@ -0,0 +1,8 @@ +#!/bin/sh + +basedir=$(dirname $0) + +ls $basedir/overrides |sort > bts-total.txt +(cd $basedir/overrides ; egrep -l 'BTS|Already present' *) |sort> bts-reported.txt +comm -23 bts-total.txt bts-reported.txt +rm bts-total.txt bts-reported.txt --- insserv-1.14.0.orig/debian/seq-changes +++ insserv-1.14.0/debian/seq-changes @@ -0,0 +1,54 @@ +#! /bin/bash +# Script from Frans Pop + +set -e + +if [ -z "$1" ]; then + echo "Usage: insserv-seq-changes /var/lib/insserv/" + exit 1 +fi + +oldtar="$(tar tzf $1)" +for i in S $(seq 0 6); do + echo "Runlevel $i" + new="$(cd /etc/rc$i.d; ls -1 [KS]* | sort | nl)" + old="$(echo "$oldtar" | grep "^rc$i.d/[KS]" | cut -d/ -f2 | sort | nl)" + case $i in + S|0|6) + old="$(echo "$old" | sed -r "s/[KS][0-9]+//")" + new="$(echo "$new" | sed -r "s/[KS][0-9]+//")" + ;; + *) + old="$(echo "$old" | sed -r "s/([KS])[0-9]+/\1_/")" + new="$(echo "$new" | sed -r "s/([KS])[0-9]+/\1_/")" + ;; + esac + echo "$new" | while read num cmd; do + oldnum=$(echo "$old" | grep "[[:space:]]$cmd$" | awk '{print $1}') + if [ "$oldnum" ]; then + diff=$(($num - $oldnum)) + else + oldnum="---" + diff="" + fi + if [ ${#cmd} -ge 16 ]; then + echo -e "$cmd\t$num\t$oldnum\t$diff" + elif [ ${#cmd} -ge 8 ]; then + echo -e "$cmd\t\t$num\t$oldnum\t$diff" + else + echo -e "$cmd\t\t\t$num\t$oldnum\t$diff" + fi + done + echo "$old" | while read num cmd; do + if ! echo "$new" | grep -q "[[:space:]]$cmd$"; then + if [ ${#cmd} -ge 16 ]; then + echo -e "$cmd\t---\t$oldnum" + elif [ ${#cmd} -ge 8 ]; then + echo -e "$cmd\t\t---\t$oldnum" + else + echo -e "$cmd\t\t\t---\t$oldnum" + fi + fi + done + echo +done --- insserv-1.14.0.orig/debian/manpages +++ insserv-1.14.0/debian/manpages @@ -0,0 +1 @@ +debian/update-rc.d-insserv.8 --- insserv-1.14.0.orig/debian/make-testsuite +++ insserv-1.14.0/debian/make-testsuite @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Extract key information from the current to try to generate a test +# suite script to demonstrate detected bugs. + +echo 'set +C' +echo "cat <<'EOF' > \$insconf" +grep -v '#' /etc/insserv.conf |grep -v '^$' +echo "EOF" +echo 'set -C' +echo + +for f in /etc/init.d/*; do + name=$(basename $f) + case $name in + README|rc|rcS|skeleton) + ;; + *) + echo "addscript $name <<'EOF'" + sed -n -r '/^### BEGIN INIT INFO/, /END INIT INFO/p' < $f + echo "EOF" + echo + ;; + esac +done + +echo 'cd $tmpdir/etc' +echo 'mkdir rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d' +cd /etc +for f in rc?.d/*; do + case $f in + */README) + ;; + *) + echo ln -s $(readlink $f) $f + ;; + esac +done + +echo +echo list_rclinks --- insserv-1.14.0.orig/debian/check-archive-initd-scripts +++ insserv-1.14.0/debian/check-archive-initd-scripts @@ -0,0 +1,275 @@ +#!/usr/bin/perl +# +# Check the consistency of all init.d scripts in the archive. Run +# this on bellini.debian.org. + +use warnings; +use strict; +use File::Basename; + +my $warn = 1; + +my $basedir = "/org/lintian.debian.org/laboratory/binary"; + +my @scripts = @ARGV; +@scripts = <$basedir/*/init.d/*> unless (@scripts); + +my %scriptinfo; +my %provides; + +my @virts = qw($local_fs $remote_fs $syslog $time $named + $portmap $network $all + $mail-transport-agent $x-font-server + $null $x-display-manager + ); +my @harddepheaders = qw(required-start required-stop); +my @softdepheaders = qw(should-start + should-stop x-start-before x-stop-after); +my $lsbheaders = "Provides|Required-Start|Required-Stop|Default-Start|Default-Stop"; +my $optheaders = "x-start-before|x-stop-after|should-start|should-stop"; + +for my $virt (@virts) { + $provides{$virt} = ['insserv/etc/insserv.conf']; +} + +# Ignore obsolete scripts, as these are unlikely to cause problems. +for my $old (qw(glibc evms raid2 ldm sdm)) { + $provides{$old} = ['obsolete']; +} + +# First pass to load the database +for my $initdscript (@scripts) { + next if $initdscript =~ m%/rc|/rcS|/README%; + my %lsbinfo = parse_lsb_header($initdscript); + $scriptinfo{$initdscript} = \%lsbinfo; + next unless ($lsbinfo{'found'}); + + my %checked; + for my $provide (split(/[ ,\t]+/, $lsbinfo{provides})) { + if (exists $provides{$provide}) { + push(@{$provides{$provide}}, $initdscript) + } else { + $provides{$provide} = [$initdscript]; + } + $checked{$provide} = 1; + } +} + +for my $provide (sort keys %provides) { + if (1 < scalar @{$provides{$provide}}) { + my %script; + map { $script{basename($_)} = 1; } @{$provides{$provide}}; + if (1 < scalar keys %script) { + error(sprintf("scripts %s provide duplicate '%s'", + join(",", short_name(@{$provides{$provide}})), + $provide)); + } + } +} + +# Second pass, to see which dependencies are missing +for my $initdscript (@scripts) { + next unless ($scriptinfo{$initdscript}->{'found'}); + my $short = short_name($initdscript); + my %checked; + my @hardmissing = (); + for my $header (@harddepheaders) { + my $list = $scriptinfo{$initdscript}->{$header}; + next unless defined $list; + for my $facility (split(/[ ,\t]+/, $list)) { + next if exists $checked{$facility}; + $checked{$facility} = 1; + push(@hardmissing, $facility) + unless exists $provides{$facility}; + } + } + error("script $short depend on non-existing provides: " + . join(" ", @hardmissing)) if (@hardmissing); + my @softmissing = (); + for my $header (@softdepheaders) { + my $list = $scriptinfo{$initdscript}->{$header}; + next unless defined $list; + for my $facility (split(/[ ,\t]+/, $list)) { + next if exists $checked{$facility}; + $checked{$facility} = 1; + push(@softmissing, $facility) + unless exists $provides{$facility}; + } + } + warning("script $short relate to non-existing provides: " + . join(" ", @softmissing)) if (@softmissing); + + if (exists $checked{'$syslog'} + && $scriptinfo{$initdscript}->{'default-start'} =~ m/s/i) { + error("script $short depend on \$syslog and start from rcS.d/"); + } + if (!exists $checked{'$remote_fs'} + && !exists $checked{'$syslog'} + && $scriptinfo{$initdscript}->{'need_remote_fs'} + && $scriptinfo{$initdscript}->{'default-start'} =~ m/s/i) { + warning("script $short possibly missing dependency on \$remote_fs"); + } elsif (!exists $checked{'$local_fs'} + && !exists $checked{'$remote_fs'} + && !exists $checked{'$syslog'} + && $scriptinfo{$initdscript}->{'need_local_fs'} + && $scriptinfo{$initdscript}->{'default-start'} =~ m/s/i) { + warning("script $short possibly missing dependency on \$local_fs"); + } + + if (!exists $checked{'$local_fs'} + && $scriptinfo{$initdscript}->{'need_syslog'}) { + warning("script $short possibly missing dependency on \$syslog"); + } + + my %provided; + for my $provide (split(/[ ,\t]+/, + $scriptinfo{$initdscript}->{provides})) { + $provided{$provide} = 1; + if ($provide =~ m/\$/) { + error("script $short provide virtual facility $provide"); + } + } + + my $basename = basename($initdscript, ".sh"); + info("script $short does not provide its own name") + unless exists $provided{$basename}; + + # Detect common problems with runlevel settings. + my @startrl = sort split(/\s+/, lc($scriptinfo{$initdscript}->{'default-start'})); + my @stoprl = sort split(/\s+/, lc($scriptinfo{$initdscript}->{'default-stop'})); + + unless ( @startrl || @stoprl) { + error("script $short do not start or stop in any runlevels"); + } + # Scripts starting in rcS.d/ normally do not stop or only stop + # during hald and shutdown. + elsif ((array_equal(['s'], \@startrl) && array_equal([], \@stoprl)) + || ( array_equal(['s'], \@startrl) + && array_equal(['0','6'], \@stoprl))) { + # OK + } else { + # Most scripts either start in rcS.d, or in runlevels 2-5 + if (!array_equal(['2', '3', '4', '5'], \@startrl) && + !array_equal(['s'], \@startrl) && + (!array_equal([], \@startrl) && @stoprl)) { + # Some obvious errors (runlevels 2-5 are equivalent in Debian) + if (array_equal(['3', '5'], \@startrl) + || array_equal(['3', '4', '5'], \@startrl)) { + error("script $short have inconsistent start runlevels: ", + join(" ", @startrl)); + } else { + warning("script $short does not start in the usual runlevels: ", + join(" ", @startrl)); + } + } + + # And most scripts stop in runlevel (1) runlevels (0, 1, 6), + # only starts or only stops in (0) or (6). + if (!array_equal(['0', '1', '6'], \@stoprl) && + !array_equal(['1'], \@stoprl) && + !array_equal(['0', '6'], \@stoprl) && + !(array_equal(['0'], \@stoprl) && !@startrl) && + !(array_equal(['6'], \@stoprl) && !@startrl) && + !(array_equal([], \@stoprl) && @startrl)) { + warning("script $short does not stop in the usual runlevels: ", + join(" ", @stoprl)); + } + } +} + +exit 0; + +sub parse_lsb_header { + my $initdscript = shift; + my $short = short_name($initdscript); + my %lsbinfo; + unless (open(INIT, "<", $initdscript)) { + error("script $short is unreadable"); + return (); + } + my $inheader = 0; + while () { +# print; + chomp; + if (m/^\#\#\# BEGIN INIT INFO\s*$/) { + $lsbinfo{'found'} = 1; + $inheader = 1; + } + $inheader = 0 if (m/\#\#\# END INIT INFO$/); + if ($inheader + && m/^\# ($lsbheaders|$optheaders):\s*(\S?.*)$/i) { +# print "$1\n"; + $lsbinfo{lc($1)} = $2; + } + s/\#.*$//; # Remove comments + $lsbinfo{'need_remote_fs'} = 1 if m%/usr/s?bin/%; + $lsbinfo{'need_local_fs'} = 1 if m%/var/%; + + # Detect the use of tools resting in /usr/ + $lsbinfo{'need_remote_fs'} = 1 if m%awk%; + $lsbinfo{'need_remote_fs'} = 1 if m%which%; + } + close(INIT); + + # When running on bellini.debian.org, check if $syslog is needed + my $objdumpinfo = dirname($initdscript) . "/../objdump-info"; + if ( -f $objdumpinfo) { + print "Checking for syslog symbol\n"; + if (open(OBJDUMP, "<", $objdumpinfo)) { + while () { + $lsbinfo{'need_syslog'} = 1 if /GLIBC.* syslog/; + } + close OBJDUMP; + } + } + + # Check that all the required headers are present + if (!$lsbinfo{'found'}) { + error("script $short is missing LSB header"); + } else { + for my $key (split(/\|/, lc($lsbheaders))) { + if (!exists $lsbinfo{$key}) { + error("script $short missing LSB keyword '$key'"); + } + } + } + return %lsbinfo +} + +sub short_name { + my @scripts; + for my $script ( @_ ) { + my $copy = $script; + $copy =~ s%$basedir/%%g; + push @scripts, $copy; + } + if (wantarray) { + return @scripts; + } else { + return $scripts[0]; + } +} + +sub array_equal { + my ($a1, $a2) = @_; + return 0 if (scalar @{$a1} != scalar @{$a2}); + + my $i = 0; + while ($i < scalar @{$a1}) { + return 0 if $a1->[$i] ne $a2->[$i]; + $i++; + } + return 1; +} + +sub info { + print "info: @_\n"; +} + +sub warning { + print "warning: @_\n" if $warn; +} + +sub error { + print "error: @_\n"; +} --- insserv-1.14.0.orig/debian/copyright +++ insserv-1.14.0/debian/copyright @@ -0,0 +1,20 @@ +This package was debianized by Petter Reinholdtsen on +Sun, 21 Aug 2005 11:20:54 +0200. + +It was downloaded from + +Copyright Holder: Werner Fink and SuSE LINUX AG. + +License: + + Copyright 2000-2004 Werner Fink, 2000 SuSE GmbH Nuernberg, Germany, + 2003 SuSE Linux AG, Germany. + 2004 SuSE LINUX AG, Germany. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + +On Debian systems, a copy of the GNU General Public License version 2 +may be found in the file /usr/share/common-licenses/GPL-2. --- insserv-1.14.0.orig/debian/watch +++ insserv-1.14.0/debian/watch @@ -0,0 +1,6 @@ +# Run the "uscan" command to check for upstream updates and more. +# See uscan(1) for format + +version=2 + +ftp://ftp.suse.com/pub/projects/init/insserv-(.*).tar.gz debian uupdate --- insserv-1.14.0.orig/debian/docs +++ insserv-1.14.0/debian/docs @@ -0,0 +1 @@ +README --- insserv-1.14.0.orig/debian/check-initd-order +++ insserv-1.14.0/debian/check-initd-order @@ -0,0 +1,425 @@ +#!/usr/bin/perl +# +# Author: Petter Reinholdtsen +# Date: 2005-08-21 +# +# Read LSM init.d headers in SysV init.d scripts, and verify correct +# start order for all runlevels. It can also provide a graph. +# +# To generate a graph, run it like this +# +# check-initd-order -g > initorder.dotty && dotty initorder.dotty + +use strict; +use warnings; + +my $rcbase = "/etc"; + +my $overridepath = "/usr/share/insserv/overrides"; +my $hostoverridepath = "/etc/insserv/overrides"; + +my $debug = 0; +my $errors = 0; + +my %rcmap = + ( + 'B' => 'rc.boot', + 'S' => 'rcS.d', + '1' => 'rc1.d', + '2' => 'rc2.d', + '3' => 'rc3.d', + '4' => 'rc4.d', + '5' => 'rc5.d', + '6' => 'rc6.d', + ); + +my %sysmap; + +my %provideslist; +my %scriptorder; +my %opts; + +# Used to draw graphs +my %gotrevdeps; +my %allprovides; + +while($#ARGV >= 0 && ($_ = $ARGV[0]) =~ /^-/) { + shift @ARGV; + if (/^-([cdgko])$/) { $opts{$1}++; next } + if (/^-b$/) { $rcbase = shift; next } + if (/^-h|--help$/) { &usage; } + &usage("unknown option"); +} + +load_sysmap("$rcbase/insserv.conf"); + +$debug = $opts{'d'}; +my $useoverrides = $opts{'o'} ? 0 : 1; + +if ($opts{'g'}) { + graph_generate(); + exit 0; +} + +check_bootorder(); +exit $errors > 0 ? 1 : 0; + +sub usage { + print STDERR "check-initd-order: error: @_\n" if ($#_ >= 0); + print STDERR <) { + chomp; + s/\#.*$//; + next if m/^\s*$/; + if (m/^(\$\S+)\s+(\S.*\S*)\S*$/) { + my $virt = $1; + for my $dep (split(/\s+/, $2)) { + $dep =~ s/^\+//g; + $sysmap{$dep} = $virt; + } + } + } + close(CONF); +} + +sub graph_addnode { + my ($isstopseq, $lsbinforef) = @_; + my %lsbinfo = %{$lsbinforef}; + + unless ($lsbinfo{'provides'}) { + error "File ". $lsbinfo{'file'} . " is missing the provides header\n"; + $lsbinfo{'provides'} = $lsbinfo{'file'}; + $lsbinfo{'provides'} =~ s/^[SK]\d{2}//; + } + + my $key = $opts{'k'} ? 'stop' : 'start'; + my $revkey = $opts{'k'} ? 'stop-after' : 'start-before'; + my @provides = split(/\s+/, $lsbinfo{'provides'}); + for my $name (@provides) { + if (exists $sysmap{$name}) { + graph_addnode($isstopseq, + {'provides' => $sysmap{$name}, + "required-$key" => $name}); + } + } + + if (1 < @provides) { + my @providescopy = @provides; + my $lastprovide = shift @providescopy; + for my $provide (@providescopy) { + graph_addnode($isstopseq, + {'provides' => $lastprovide, + "required-$key" => $provide}); + graph_addnode($isstopseq, + {'provides' => $provide, + "required-$key" => $lastprovide}); + } + } + + for my $provide (@provides) { + my $provideesc = $provide; $provideesc =~ s/"/\\"/g; + my %deps = + ( + "required-$key" => 'blue', + "should-$key" => 'springgreen', + "$revkey" => 'yellow' + ); + + for $key (keys %deps) { + if (exists $lsbinfo{$key} && $lsbinfo{$key}) { + my @depends = split(/\s+/, $lsbinfo{$key}); + + my $dependonall = 0; + for my $pkg (@depends) { + $dependonall = 1 if ($pkg eq '$all'); + } + + for my $pkg (@depends) { + my $pkgesc = $pkg; $pkgesc =~ s/"/\\"/g; + my $color = $deps{$key}; + if ($revkey eq $key) { + print "\"$provideesc\" -> \"$pkgesc\"[color=$color] ;\n"; + $gotrevdeps{$pkg} = 1 unless $dependonall; + } else { + print "\"$pkgesc\" -> \"$provideesc\"[color=$color] ;\n"; + $gotrevdeps{$provide} = 1 unless $dependonall; + } + } + } + } + + print "\"$provideesc\" [shape=box];\n" unless $allprovides{$provide}; + $allprovides{$provide} = 1; + } +} + +sub graph_generate_mode { + my ($isstopseq) = @_; + my @dirs = $isstopseq ? $rcmap{6} : ($rcmap{S}, $rcmap{2}); + for my $rcdir (@dirs) { + chdir "$rcbase/$rcdir/."; + my @scripts = $isstopseq ? : ; + for my $script (@scripts) { + my $lsbinforef = load_lsb_tags("$rcbase/$rcdir/$script", + $useoverrides); + + unless (defined $lsbinforef) { + error "LSB header missing in $rcbase/$rcdir/$script\n"; + $script =~ s/^[SK]\d{2}//; + $lsbinforef = {'provides' => $script, + 'required-start' => '$remote_fs $syslog', + 'required-stop' => '$remote_fs $syslog'}; + } + graph_addnode($isstopseq, $lsbinforef); + } + } + # Mark all packages without any reverse dependencies as depending + # on $all + for my $provide (keys %allprovides) { + next unless (exists $gotrevdeps{$provide}); + my $lsbinforef = {'provides' => '$all', + 'required-start' => "$provide", + 'required-stop' => "$provide"}; + graph_addnode($isstopseq, $lsbinforef); + } +} + +sub graph_generate { + print "# Generating graph\n"; + print < $bootorder)) { + my $deporder; + if (exists $scriptorder{$tag}{$dep}) { + $deporder = $scriptorder{$tag}{$dep} + } else { + $deporder = exists $provideslist{$dep} ? $provideslist{$dep} : "?"; + } + error(sprintf("Incorrect order %s@%s %s %s%s\n", + $dep, $deporder, 'S' eq $tag ? '>' : '<', + $name, $order)); + } + } + } + } +} + +sub check_bootorder { + my $bootorder = 0; + my @dirs = $opts{'k'} ? $rcmap{6} : ($rcmap{S}, $rcmap{2}); + my @scripts; + for my $rcdir (@dirs) { + push(@scripts, $opts{'k'} ? <$rcbase/$rcdir/K*> : <$rcbase/$rcdir/S*>); + } + + if ($opts{'k'}) { + $scriptorder{'K'}{'$all'} = 1; + } else { + # Calculate script order for the script before the scripts + # with the last boot sequence number. + my $tmpbootorder = 0; + my $allorder = 0; + my $maxorder = 0; + my $maxbootorder = 0; + for my $scriptpath (@scripts) { + my $script = $scriptpath; + $script =~ s%^.*/([^/]+)$%$1%; + $tmpbootorder++; + my ($tag, $order, $name) = $script =~ m/^(.)(\d{2})(.+)$/; + if ($order > $maxorder) { + $allorder = $maxbootorder; + $maxbootorder = $tmpbootorder; + $maxorder = $order; + } + + my $lsbinforef = load_lsb_tags($scriptpath, + $useoverrides); + + if (exists $lsbinforef->{'provides'} + && $lsbinforef->{'provides'}) { + for my $provide (split(/\s+/, $lsbinforef->{'provides'})) { + $provideslist{$provide} = $order; + } + } else { + $provideslist{$script} = $order; + } + } + $scriptorder{'S'}{'$all'} = $allorder; + } + for my $scriptpath (@scripts) { + my $script = $scriptpath; + $script =~ s%^.*/([^/]+)$%$1%; + $bootorder++; + my ($tag, $order, $name) = $script =~ m/^(.)(\d{2})(.+)$/; + + $scriptorder{$tag}{$name} = $bootorder; + $scriptorder{$tag}{$sysmap{$name}} = $bootorder + if (exists $sysmap{$name}); + +# print "$script\n"; +# print "T: $tag O: $order N: $name\n"; + my $lsbinforef = load_lsb_tags($scriptpath, + $useoverrides); + + unless (defined $lsbinforef) { + error "LSB header missing in $scriptpath\n"; + next; + } + my %lsbinfo = %{$lsbinforef}; + + if (exists $lsbinfo{'provides'} && $lsbinfo{'provides'}) { + for my $provide (split(/\s+/, $lsbinfo{'provides'})) { + $scriptorder{$tag}{$provide} = $bootorder; + $scriptorder{$tag}{$sysmap{$provide}} = $bootorder + if (exists $sysmap{$provide}); + } + } else { + error "no LSB header provides value in script $scriptpath\n"; + } + + if ('S' eq $tag) { + check_deps($lsbinforef, $tag, $order, $bootorder, 'required-start', 1); + check_deps($lsbinforef, $tag, $order, $bootorder, 'should-start', 0); +# check_deps($lsbinforef, 'K', $order, $bootorder, 'start-before', 0); + } + if ('K' eq $tag) { + check_deps($lsbinforef, $tag, $order, $bootorder, 'required-stop', 1); + check_deps($lsbinforef, $tag, $order, $bootorder, 'should-stop', 0); +# check_deps($lsbinforef, 'S', $order, $bootorder, 'stop-after', 0); + } + } +} + +sub load_lsb_tags { + my ($initfile, $useoverrides) = @_; + my $lsbinforef = load_lsb_tags_from_file($initfile); + + if ($useoverrides) { + # Try override file + $initfile = readlink($initfile) if (-l $initfile); + my $basename = basename($initfile); + + # Only read shipped override file when initscript does not + # contain LSB tags. + if (! defined($lsbinforef) && -f "$overridepath/$basename") { + print STDERR "Override $overridepath/$basename\n" if $debug; + $lsbinforef = load_lsb_tags_from_file("$overridepath/$basename"); + } + + # Always read the host override in $hostoverridepath. + if (-f "$hostoverridepath/$basename") { + print STDERR "Override $hostoverridepath/$basename\n" if $debug; + $lsbinforef = load_lsb_tags_from_file("$hostoverridepath/$basename"); + } + + } + return $lsbinforef; +} + +sub load_lsb_tags_from_file { + my ($file) = @_; + print STDERR "Loading $file\n" if $debug; + ### BEGIN INIT INFO + # Provides: xdebconfigurator + # Required-Start: $syslog + # Required-Stop: $syslog + # Default-Start: 2 3 4 5 + # Default-Stop: 1 6 + # Short-Description: Genererate xfree86 configuration at boot time + # Description: Preseed X configuration and use dexconf to + # genereate a new configuration file. + ### END INIT INFO + unless (open(FILE, "<$file")) { + warn "error: Unable to read $file"; + return; + } + my $found = 0; + my ($provides, $requiredstart, $requiredstop, $shouldstart, $shouldstop); + my ($startbefore, $stopafter); + while () { + chomp; + $found = 1 if (m/\#\#\# BEGIN INIT INFO/); + next unless $found; + last if (m/\#\#\# END INIT INFO/); + + $provides = $1 if (m/^\# provides:\s+(\S*.*\S+)\s*$/i); + $requiredstart = $1 if (m/^\# required-start:\s+(\S*.*\S+)\s*$/i); + $requiredstop = $1 if (m/^\# required-stop:\s+(\S*.*\S+)\s*$/i); + $shouldstart = $1 if (m/^\# should-start:\s+(\S*.*\S+)\s*$/i); + $shouldstop = $1 if (m/^\# should-stop:\s+(\S*.*\S+)\s*$/i); + $startbefore = $1 if (m/^\# X-Start-Before:\s+(\S*.*\S+)\s*$/i); + $stopafter = $1 if (m/^\# X-Stop-After:\s+(\S*.*\S+)\s*$/i); + } + close(FILE); + + return undef unless ($found); + +# print "Provides: $provides\n" if $provides; + return { + 'provides' => $provides, + 'required-start' => $requiredstart, + 'required-stop' => $requiredstop, + 'should-start' => $shouldstart, + 'should-stop' => $shouldstop, + 'start-before' => $startbefore, + 'stop-after' => $stopafter, + 'file' => $file, + }; +} --- insserv-1.14.0.orig/debian/README.source +++ insserv-1.14.0/debian/README.source @@ -0,0 +1,16 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To get the fully patched source after unpacking the source package, cd +to the root level of the source package and run: + + debian/rules patch + +Removing a patch is as simple as removing its entry from the +debian/patches/series file, and please also remove the patch file +itself. + +To clean up afterwards again, "debian/rules unpatch" will do the +work for you - or you can of course choose to call +"fakeroot debian/rules clean" all together. --- insserv-1.14.0.orig/debian/control +++ insserv-1.14.0/debian/control @@ -0,0 +1,31 @@ +Source: insserv +Section: misc +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Petter Reinholdtsen +Uploaders: Kel Modderman +Build-Depends: debhelper (>= 6.0.7), po-debconf, quilt +Standards-Version: 3.8.4 +DM-Upload-Allowed: yes +Homepage: http://savannah.nongnu.org/projects/sysvinit +XSBC-Debian-Vcs-Svn: svn://svn.debian.org/initscripts-ng/trunk/src/insserv +XSBC-Debian-Vcs-Browser: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/ + +Package: insserv +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: bootchart +Breaks: sysv-rc (<< 2.87dsf-3) +Description: Tool to organize boot sequence using LSB init.d script dependencies + The insserv program is used to update the order of symlinks in + /etc/rc?.d/ with sysv-rc based on dependencies specified in the + scripts themselves using LSB init.d script headers. + . + This allow each package maintainer to specify their init.d script + relation to other scripts and make it possible to detect and reject + script dependency loops as well as making sure all scripts start in + their intended order. + . + The program insserv in this package should be used with care and + together with the sysv-rc package, as using it incorrectly can lead + to an unbootable system. --- insserv-1.14.0.orig/debian/update-bootsystem-insserv +++ insserv-1.14.0/debian/update-bootsystem-insserv @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Author: Petter Reinholdtsen +# Date: 2009-08-04 +# +# Transition script only to be used by sysv-rc version 2.87dsf-2 if +# insserv is upgraded without sysv-rc being upgraded too. + +set -e + +case "$1" in + enable|'') + exit 0 + ;; + check) + exit 1 + ;; + *) + echo "error: Unknown argument '$1'" + exit 1 + ;; +esac + +exit 0 --- insserv-1.14.0.orig/debian/rules +++ insserv-1.14.0/debian/rules @@ -0,0 +1,106 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PACKAGE = insserv + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS = -g -O0 +else + CFLAGS = -g -O2 +endif + +#CFLAGS += -DDEBUG=1 + +INSTALL = install +INSTALL_DATA = $(INSTALL) -m644 +DESTDIR = $(CURDIR)/debian/$(PACKAGE) + +pkgdatadir = /usr/share/$(PACKAGE) +sbindir = /usr/sbin + +include /usr/share/quilt/quilt.make + +build: build-stamp + +build-stamp: $(QUILT_STAMPFN) + dh_testdir + + # Add here commands to compile the package. + $(MAKE) COPTS="$(CFLAGS)" + + chmod a+rx debian/run-testsuite + debian/run-testsuite + + touch build-stamp + +clean: + dh_testdir + rm -f build-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + # Remove patches after doing 'make clean', to allow patches to adjust the clean target + $(MAKE) -f debian/rules unpatch + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/$(PACKAGE). + $(MAKE) install COPTS="$(CFLAGS)" DESTDIR=$(DESTDIR) + + # Install overrides if present + for data in debian/overrides/* ; do \ + test -f $$data || continue ; \ + $(INSTALL_DATA) $$data $(DESTDIR)$(pkgdatadir)/overrides/. ;\ + done + + $(INSTALL) debian/check-initd-order $(DESTDIR)$(pkgdatadir)/. + $(INSTALL) debian/check-archive-initd-scripts \ + $(DESTDIR)$(pkgdatadir)/. + $(INSTALL) debian/seq-changes $(DESTDIR)$(pkgdatadir)/. + $(INSTALL) debian/make-testsuite $(DESTDIR)$(pkgdatadir)/. + $(INSTALL) debian/update-bootsystem-insserv $(DESTDIR)$(sbindir)/. + $(INSTALL) debian/update-rc.d-insserv $(DESTDIR)$(sbindir)/. + + # Install bash(1) completion + $(INSTALL_DATA) debian/bash-completion $(DESTDIR)/etc/bash_completion.d/insserv + + dh_lintian + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGES + dh_installdocs + dh_installexamples + dh_installdebconf +# dh_install + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install + +.PHONY: phony --- insserv-1.14.0.orig/debian/lintian-overrides +++ insserv-1.14.0/debian/lintian-overrides @@ -0,0 +1 @@ +insserv: binary-without-manpage usr/sbin/update-bootsystem-insserv --- insserv-1.14.0.orig/debian/changelog +++ insserv-1.14.0/debian/changelog @@ -0,0 +1,1286 @@ +insserv (1.14.0-2.1ubuntu1) precise; urgency=low + + * Add 200_hide_insserv_on_ubuntu.patch: Move insserv out of system path + to disuade package maintainers from invoking it directly. (LP: + #897390) + + -- Adam Stokes Wed, 15 Feb 2012 17:08:07 -0800 + +insserv (1.14.0-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Drop definition of $portmap (Closes: #564501). + * Add unbound to definition of $named (Closes: #602901). + + -- Luk Claes Sat, 19 Mar 2011 12:48:34 +0100 + +insserv (1.14.0-2) unstable; urgency=low + + [ Kel Modderman ] + * Add 21_tweak_warnings.patch to make insserv warn about differing on + disk state/LSB runlevel info for the script(s) in its argument list. + (Closes: #578308) + * Add 100_show.patch which allows insserv --showall to dump start/stop + bit, sequence number, runlevels and script name in the format: + SK:NUM:RUNLEVELS:SCRIPT. It is commented out in quilt series file + until confirmation from #573004 that it is actually useful. + * Add 30_interactive_regexp_match_fix.patch which fixes failure to + properly match the correct group in the regular expression used on + the X-Interactive keyword. (Closes: #580564) + * Modify 92_m68k_alignment.patch so that the define is grouped in an + area of code which other similar defines live. + + [ Petter Reinholdtsen ] + * Improve the output from make-testsuite. + * Adjust the test_x_interactive behaviour to make sure it fails with + a fatal error if X-Interactive: true do not work. + + -- Petter Reinholdtsen Fri, 07 May 2010 09:45:19 +0200 + +insserv (1.14.0-1) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Fix typo (loop->look) in previous changelog (Closes: #549286). + Thanks to Josh Triplett. + * New testsuite code test_undetected_loop to report error when the + loop detection fail to trigger with a loop involving a virtual + facility, as was detected in #554905. + * Change homepage link to the Savannah project. + + [ Kel Modderman ] + * New upstream release. + * Drop patches applied upstream: + - 20_install_perms_fixup.patch + - 21_tests_suite_new_functions.patch + - 30_deterministic_order.patch + - 40_badboy_segfault.patch + - 50_symlink_in_initddir.patch + - 60_all_keyword_start_only.patch + - 61_interactive_keyword.patch + - 62_upstart_job.patch + - 70_req_start_all_depends.patch + - 71_complete_makefile.patch + - 80_manual_warnings.patch + - 81_lessverbose.patch + - 82_loop_exit_msg.patch + - 90_no_runlevel_spec_for_debian.patch + - 91_kfreebsd_nofadvice.patch + - 93_hurd_no_path_max.patch + - 94_v1_12_2.patch + - 95_stop_all.patch + - 96_hurd_no_at_funcs.patch + * Refresh remaining patch series. + * Set debian/source/format to 1.0. + * Adjust Standards-Version to 3.8.4, no other chages required. + * Add 20_manpage_spelling.patch to fix spelling errors in insserv(8). + * Add note next to test_undetected_loop() that it's 2 tests currently + fail but are not terminal. + + -- Petter Reinholdtsen Mon, 03 May 2010 08:13:56 +0200 + +insserv (1.12.0-14) unstable; urgency=low + + * Remove obsolete rules targets missing-overrides, bin-by-inst.txt, + missingpkgs, missing-by-popcon and clean-extra. + * New patch 82_loop_exit_msg.patch to make exit message when a loop + is detected look more like the exit messages when other problems + are detected. + * Make check-initd-order report missing provides header as errors + instead of printing perl warnings. + * New patch 62_upstart_job.patch implementing support for upstart + jobs (Closes: #547235). Add testsuite test to ensure that it is + working. + * Refreshed all patches. + * New patch 96_hurd_no_at_funcs.patch to try harder to get the + source building on hurd, where for example the readlinkat() symbol + exist in libc but always fail. + + -- Petter Reinholdtsen Thu, 01 Oct 2009 19:58:44 +0200 + +insserv (1.12.0-13) unstable; urgency=low + + * New argument -b to check-initd-order, to be able to replace /etc/ + with another directory. This allow for easier testing of the script. + * Update update-rc.d-insserv to the one in sysv-rc svn. + + -- Petter Reinholdtsen Sun, 20 Sep 2009 21:58:11 +0200 + +insserv (1.12.0-12) unstable; urgency=low + + * Use dh_lintian during build. Depend on debhelper (>= 6.0.7) for this. + * Correct wiki URL in README.Debian (Closes: #545171). Thanks to + Josh Triplett for noticing the old URL. + * Make sure check-initd-order generated valid dotty files when + scripts provide strings with " in them (Closes: #545521). Thanks + to Laurent Bonnaud for discovering the problem. + * Drop the Loading... messages from the default verbosity level, and + only show them when -v is used several times. + * Add script check-archive-initd-scripts to check all init.d scripts + in the Debian archive for consistency. + + -- Petter Reinholdtsen Sun, 13 Sep 2009 11:27:49 +0200 + +insserv (1.12.0-11) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Migrate the responsibility for enabling or disabling dependency + based boot sequencing from the insserv package to the sysv-rc + package. Rewrite package description to reflect this (Closes: + #475478, #511753, #538959). Keep a dummy update-bootsystem-insserv + script to avoid having to conflict with sysv-rc version 2.87dsf-2. + Keep update-rc.d-insserv to make it impossible for the update-rc.d + diversion to be a dangling link during upgrades. Make it a copy + of update-rc.d from the new sysv-rc version to make sure both + behave the same way. update-rc.d-insserv should be removed in + Squeeze+1. update-bootsystem-insserv could be removed when + sysv-rc 2.87dsf-2 has been gone from unstable for 3 months. + * Drop dependencies on sysv-rc, initscripts and sysvinit-utils, and + leave it for sysv-rc to pull in the packages needed for dependency + based boot sequencing to work properly. + * Update README to reflect that dependency based boot sequencing is + now the default in Debian. Drop reference to obsolete CONCURRENCY + setting (Closes: #540447). + * Add new test case test_override_remove trying to reproduce bug #540866. + No luck so far. + * Add new test case test_insserv_virt_loop to reproduce a bug + reported by Raphael Geissert, where an incorrect insserv.conf will + make insserv hang forever. Add new patch 94_v1_12_2.patch from + upstream to fix it (Closes: #541613). + * Correct test test_early_all to fail if $all do not work with stop + sequences. Add new patch 95_stop_all.patch from upstream to fix + it (Closes: #542043). + * Change the definition of $syslog to include rsyslog, sysklogd, + dsyslog, inetutils-syslogd and syslog-ng, to include all syslog + implmenetations in the archive. Dropped the syslog provide from + the list, as it should not be used. + * Update to Standards-Version 3.8.3, no changes required. + * Add lintian override for the transitient update-bootsystem-insserv + binary missing a manual page. + * Add new test test_local_virtual to verify that local virtual + facilities work properly. + + [ Kel Modderman ] + * Add new patch 20_install_perms_fixup.patch to install binary and + conffile with correct permissions. + * Add new patch 21_tests_suite_new_functions.patch to add a couple + of new test suite functions to upstream test suite. + * Make sure update-rc.d compares command line parameters for start/stop + runlevel configuration with the Default-Start and Default-Stop values in + LSB info comment of script and warns if there are differences. + + -- Petter Reinholdtsen Sat, 05 Sep 2009 11:50:22 +0200 + +insserv (1.12.0-10) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Change check-initd-order to return a exit code when there is a problem + with the boot sequence or dependencies. + * Change the default to enable dependency based boot sequencing if + it is safe to do. This should enable it in the common case, + while avoiding conversion on problems. + * Move all code from insserv.config to insserv.postist and remove + insserv.config to make sure update-bootsystem-insserv is available + and working when it is needed to test if it is safe to migrate to + dependency based boot sequencing. + + -- Petter Reinholdtsen Sun, 26 Jul 2009 21:06:56 +0200 + +insserv (1.12.0-9) unstable; urgency=low + + * Adjust patch 71_complete_makefile to make sure the recursion depth + calculation is done correctly in expand_faci(). + + -- Petter Reinholdtsen Thu, 23 Jul 2009 20:41:24 +0200 + +insserv (1.12.0-8) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Refresh 92_m68k_alignment.patch. + * Simplify test for bug #534526, while still triggering the bug. + * Change definition of $time to make hwclock optional, as it might + be dropped from the boot sequence in the future. + * New patch 71_complete_makefile from upstream fixing .depend.* + content when processing virtual facility definitions refering to + other virtual facilities (Closes: #534526). + + [ Kel Modderman ] + * Before inserting an initscript with insserv, check that + /etc/init.d/ exists in update-rc.d-insserv. + + -- Petter Reinholdtsen Wed, 22 Jul 2009 23:53:05 +0200 + +insserv (1.12.0-7) unstable; urgency=low + + * Update standards-version from 3.8.1 to 3.8.2. No changes needed. + * Fix wrong quote char in insserv(8) manual page. + * Add required trailing slash to Vcs-Browser URL. + * Improve package description to make it more obvious that insserv + is not activated when installed. + * Depend on sysvinit-utils (>= 2.86.ds1-62) to get a version of + startpar that keep working even when /dev/pts is not yet mounted. + * Depend on the initscripts version we want (>= 2.86.ds1-63) + (instead of conflicting with the version we do not want which can + give upgrade problems), to get one with the X-Interactive flags + set in the scripts. Drop hostname, mountkernfs, mountdevsubfs, + checkroot and checkfs from the list of interactive scripts. + * New patch 91_kfreebsd_nofadvice.patch trying to get the source + building on kfreebsd. + * New patch 92_m68k_alignment.patch trying to get the source + building on m68k (Closes: #493637). + * New patch 93_hurd_no_path_max.patch trying to get the source + building on hurd. Need a better one. + + -- Petter Reinholdtsen Wed, 01 Jul 2009 00:17:13 +0200 + +insserv (1.12.0-6) unstable; urgency=low + + * Add keyboard-setup, console-setup, cryptdisks, cryptdisks-early + and checkfs-loop as interactive scripts while we wait for scripts + to use X-Interactive: true as documented in bug #458224 (Closes: + #510517, #534711). + * Fix typo in testsuite function initdir_purge(), making sure the + rc?.d directories are removed during purge. + * Add new patch introducing a new keyword 'X-Interactive: true' in + the LSB header (Closes: #458224). Add test suite to verify that + it is working. + * Add DM-Upload-Allowed: yes header to allow my co-maintainer to + upload this package. + * Add testcase for incomplete .depend.boot file based on test + created by Raphael Geissert for bug #534526. Make this a + non-fatal error in production builds while we figure out what is + wrong. + + -- Petter Reinholdtsen Fri, 26 Jun 2009 20:18:36 +0200 + +insserv (1.12.0-5) unstable; urgency=low + + [ Kel Modderman ] + * Convert dpatches to quilt series and adjust debian/rules and + debian/control. + * Refresh debian/patches/10_nosuse.patch to apply without fuzz. + * Add debian/patches/70_req_start_all_depends.patch to correct + dependency information written to .depend.* files for scripts which + declare Required-Start: $all. Thanks to upstream developer Werner + Fink for giving us th heads up about this problem and patch. + * Add Japanese translation. Thanks Hideki Yamane. (Closes: #512858) + * Add Swedish translation. Thanks Martin Bagge. (Closes: #503603) + * Add debian/manpages and call dh_installman without specific + arguments in debian/rules. + * Depend on debhelper >= 6 and use compat level of 6. + * Update to Standards-Version 3.8.1 without any required changes. + * Add Homepage field to debian/control. + * Add debian/patches/80_manual_warnings.patch to correct format, + spelling and grammar errors in manual page. + * Add debian/patches/90_no_runlevel_spec_for_debian.patch to remove + reference to known runlevels on Debian systems. These should be + defined in Debian policy. (Closes: #500542) + * Add interface to disable|enable service symlinks for all Default- + Start runlevels or those specified on the command line. This is + analogous to the interface introduced to update-rc.d of 2.86.ds1-62. + * Make sure disable|enable action does not call insserv if it did not + alter any runlevel symlinks. + * Consolidate debian/insserv.dirs into debian/dirs, only one should + exist. + * Add debian/bash-completion and install it to /etc/bash_completion.d/ + to enhance usability for bash shell users. + * When arguments to start/stop/defaults action are given to update- + rc.d wrapper, emit a warning that the LSB information of script + overrides the given arguments. + * Improve the way in which update-rc.d disable/enable function + determines index of S or K bit of runlevel symlink by using rindex + instead of a hardcoded index. + * Improve update-rc.d enable/disable function for when an unhandled + runlevel is given as argument. + * Also look in /usr/share/insserv/overrides/ when performing + disable/enable function in update-rc.d. + + [ Petter Reinholdtsen ] + * Make a note in the usage text that update-rc.d disable and enable + API is not yet set in stone. + + -- Petter Reinholdtsen Tue, 23 Jun 2009 08:19:19 +0200 + +insserv (1.12.0-4) unstable; urgency=low + + [ Petter Reinholdtsen ] + * New test test_early_all to control that $all only affect start or + stop sequences. Trying to reproduce issue reported in #485307. + + [ Kel Modderman ] + * Add 60_all_keyword_start_only.dpatch to prevent Required-Stop: $all + from modifying start link sort order. (Closes: #499721) + * Make test_early_all() test suite function unconditionally fatal, + this is an importan bug fixed by 60_all_keyword_start_only.dpatch. + + -- Petter Reinholdtsen Thu, 25 Sep 2008 20:36:10 +0200 + +insserv (1.12.0-3) unstable; urgency=low + + [ Kel Modderman ] + * test_fake_loop() and test_fake_loop_reverse() are now unconditionally fatal + tests because they pass with insserv >= 1.12.0. + * Modify 10_nosuse.dpatch to define ISSUSE as -DNOTSUSE instead of unsetting + it, to avoid fooling the build system. + * Purge the rc symlinks in initddir_purge() function of testsuite-common. + * Add a remscript() function to testsuite-common for deleting initscripts + from test init.d/ directory. + * Add test_all_keyword() function to run-testsuite to observe the + semantics of using the $all keyword. It is currently a non-fatal + test. + * Add test_script_in_runlevel() function to expose segfault reported + in #493202. + * Add 40_badboy_segfault.dpatch to fix segfault when scriptname() + function of insserv does not return script name due to script in + runlevel directory not being a symlink (or corrupt). (Closes: #493202) + * Add 50_symlink_in_initddir.dpatch to defend aginst symlinks + installed to /etc/init.d/ that point to other scripts in + /etc/init.d/, causing insserv to fail due to duplicate provides. + (Closes: #485045) + * Extend test_initd_symlink() test suite case to handle cases which + 50_symlink_in_initddir.dpatch must handle. + + -- Petter Reinholdtsen Sat, 20 Sep 2008 21:31:55 +0200 + +insserv (1.12.0-2) unstable; urgency=low + + [ Kel Modderman ] + * Make test_duplicate_provides() test case more realistic by placing + initscripts in init.d dir before registering with insserv. Make sure first + script is registered. + * Add test_deterministic_order() test function to make sure that when two or + more initscripts provide the same facility, the first script actually can + be registered with insserv reliably. + * Add 30_deterministic_order.dpatch to defend against the inconsistent + directory stream sequence returned by readdir(3) under different + circumstances. (Closes: #494514) + + -- Petter Reinholdtsen Wed, 20 Aug 2008 21:08:13 +0200 + +insserv (1.12.0-1) unstable; urgency=low + + [ Kel Modderman ] + * New upstream version. + - preserve empty runlevel configurations, override adding or removoval of + existing start/top runlevel configration (Closes: #477415, #492526) + * Discard patches applied to or no longer relevant to new upstream: + - 11_more_warnings.dpatch + - 32_debug_option.dpatch + - 33_nosuse_scripts.dpatch + - 40_segfault_virtprov.dpatch + - 41_cleansystem.dpatch + - 42_loopnochangemsg.dpatch + - 50_sign_warning.dpatch + - 51_overwrite_output.dpatch + - 52_shutdown_links.dpatch + - 60_disable_cfgfilter_stat.dpatch + - 62_warn_on_missing_required_fields.dpatch + - 63_warn_on_missing_default_fields.dpatch + - 64_missing_default_fields_fallback.dpatch + * Discard patches not applied in series: + - 32_debug_option.dpatch + - 34_debian_fixedscripts.dpatch + * Refresh patches that still apply to new upstream: + - 10_nosuse.dpatch + - 31_debian_conf.dpatch + * Add an extra call to list_rclinks() in test_newbug_keepoldorder() + function of run-testsuite, after introducing the bug. + * Make test_adding_start() and test_adding_stop() run-testsuite + functions unconditionally fatal on failure. + * Make test_bogus_facility() run-testsuite function non-fatal. + * Mark tests that are currently failing with a comment in run-testsuite. + * Add test_removing_start() and test_removing_stop() to run-testsuite, + showing that insserv will preserve existing links when script header is + unproperly replaced with empty Default-Start or Default-Stop. + * Make test_adding_start() case a more realistic example. + * Make test_incorrect_stopscripts() a fatal test, insserv should not + add shutdown links when none are present. + * Make test_newbug_keepoldorder() test case non-fatal, the fact that it + passed before was not by design but by luck, as per upstream analysis + which is included with test code. + * Handle CFLAGS in debian/rules more consistently, different options were + passed to make in build and install targets, and dpkg now also tampers + with the variable. + * Remove a bunch of overrides for scripts now with valid LSB information in + testing distribution today, or have been removed from archive. + * Add common test suite function for purging init directory, runlevel links + and dependency makefiles. + * Add test_incorrect_startscripts() to replicate bug report described in + #492526, and make sure insserv do not regress in this behaviour. + * Now we have no overrides to install by default, but we may in future, + modify debian/rules to only install overrides from ./debian/overrides/* if + they are present, but not fail otherwise. + * Add test_initd_symlink() test suite function to test if illegal + symlinks in /etc/init.d/ cause problems. + * Bump Standards Version to 3.8.0, add debian/README.source to describe patch + system to conform. No other changes required. + * Add myself to Uploaders. + * Rename 31_debian_conf.dpatch to 11_debian_conf.dpatch, to keep + Debian port patches in tight sequence. + + [ Petter Reinholdtsen ] + * Mention initcycle tool from Adam Jensen in README.Debian. + * Adjust test_initd_symlink test to accept the first insertion + and reject the second, as both scripts have the same provide. + + -- Petter Reinholdtsen Wed, 30 Jul 2008 18:18:00 +0200 + +insserv (1.11.0-9) unstable; urgency=low + + [ Petter Reinholdtsen ] + * New test case to demonstrate the bug reported in #477415. + * Include empty directories /etc/insserv.conf.d and + /etc/insserv/overrides in the package, to get dpkg to warn about + content there when purging insserv (Closes: #471237). + * Debconf translations: + - Updated German from Erik Schanze (Closes: #479254). + + [ Kel Modderman ] + * Add patch 60_disable_cfgfilter_stat to remove stat check from the + callback function that filters the scanning of /etc/insserv.conf.d/ dir + for confiuration file snippets. Instead do stat check in scan_conf(). + * New test case to show that two initscripts cannot have the same Provides + field. + * New test case exposing ability to insert a script into runlevel + configuration that depends on virtual facility that is not provided or + does not exist. + * New test case to check that /etc/insserv.conf.d/ can be used to allow one + or more services to define and provide a virtual facility. + * Ensure custom insserv.conf.d/* files are cleaned after + test_insserv_conf_d() in run-testsuite. + * Add test_onlystart() test case to check we can insert scripts with empty + stop runlevel configuration. + * Add test_broken_header() test case to show it seems possible to insert a + script missing Required-{Start,Stop} lsb info fields. + * Add test_no_default_start() to show that it seems possible to insert script + missing Default-Start field. + * Add test_no_default_stop() to show that it seems possible to insert script + missing Default-Stop field, and that links are created in stop runlevels. + * Add 62_warn_on_missing_required_fields and + 63_warn_on_missing_default_fields to enable warnings by default about + missing Provides, Required-Start, Required-Stop, Default-Start or + Default-Stop LSB comment keywords. + * Add a note to new patches to relate them to a case function of the test + suite. + * Add 64_missing_default_fields_fallback to ensure sane fallback of + empty runlevel configuration is used for scripts missing Default- + Start or Default-Stop lsb keywords. + * Add test_noprovides_header() to show that it is possible to insert script + missing Provides keyword, and many warnings are exposed as a result. + * Add test_adding_start() to expose that adding start levels uncleanly + modifies on disk configuration. Give test_adding_start and + test_adding_stop test script unique names. + + [ Petter Reinholdtsen ] + * Made test_adding_start and test_adding_stop checks non-fatal for + production builds, as this problem is no regression from earlier versions. + + -- Petter Reinholdtsen Sun, 25 May 2008 21:46:04 +0200 + +insserv (1.11.0-8) unstable; urgency=low + + * Make sure the consistency check in update-bootsystem-insserv + report all problems and not only the first one. + + -- Petter Reinholdtsen Mon, 24 Mar 2008 23:32:22 +0100 + +insserv (1.11.0-7) unstable; urgency=low + + * Added override files for digitools and ddns3-client. + * Make sure the dependency based update-rc.d check the argument list + slightly, to avoid bugs like #470062. + + -- Petter Reinholdtsen Thu, 13 Mar 2008 13:54:31 +0100 + +insserv (1.11.0-6) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Added override files for at, fiaif, gom, ifupdown-scripts-zg2 and tspc. + * Correct typo in override file for lvm2. + * Changed postinst and update-bootsystem-insserv to remove the + generated files /etc/init.d/.depend.* when disabled or removed. + * Implemented better support in check-initd-orderfor graphing $all + relations. + * Restructure update-bootsystem-insserv slightly to make it possible + to check if it is safe to convert to dependency based boot + sequencing without doing the conversion. + * Updated 31_debian_conf to list glibc, hostname and keymap as interactive + scripts, as none of them can use a pseudoterminal. + * Add two new tests to verify that x-start-before and x-stop-after + work as they should. + * Debconf translations: + - Added Spanish from Steve Lord Flaubert (Closes: #467391). + - Added German from Erik Schanze (Closes: #467483). + - Added Dutch from Bart Cornelis (Closes: #467418). + + [ Kel Modderman ] + * Modify debian/insserv.config debconf script to honour a preseeded debconf + value enabling dependency based boot on first installation only. + + -- Petter Reinholdtsen Sun, 2 Mar 2008 18:00:02 +0100 + +insserv (1.11.0-5) unstable; urgency=low + + * Add test to verify that introducing a loop will not change the boot + sequence, but make insserv exit with an error. + * Added patch 42_loopnochangemsg to change the message printed when + a loop is detected, to let the user know that the boot sequence is + untouched. + * Added patch 52_shutdown_links to fix incorrecly inserted stop + symlinks (Closes: #464017). + * Added patch 53_debugoutput to provide more useful debug output + used to track down the stop symlink issues. Not enabled by default. + * Debconf translations: + - Added Russian from Yuri Kozlov (Closes: #467164). + - Added Czech from Miroslav Kure (Closes: #467170). + - Added Italian from Luca Monducci (Closes: #467295). + + -- Petter Reinholdtsen Sun, 24 Feb 2008 23:49:12 +0100 + +insserv (1.11.0-4) unstable; urgency=low + + * Added override file for whitelister. + * Reinsert previously removed override file for lvm2 and others + while we wait for the packages in testing to be fixed (Closes: + #466700). These should be removed when lenny is verified to have + headers in place. + * Debconf translations: + - Added French from Christian Perrier (Closes: #466345). + + -- Petter Reinholdtsen Thu, 21 Feb 2008 09:27:34 +0100 + +insserv (1.11.0-3) unstable; urgency=low + + * Rewrote patch debian/patches/40_segfault_virtprov.dpatch with a + solution provided by upstream. + * Added script debian/seq-changes from Frans Pop installed in + /usr/share/insserv/ to extract the sequence changes done by + insserv. + * New testsuite check to detect incorrectly inserted stop symlinks + when scripts with incorrect headers are encountered. + * Removed override file for snmptrapfmt, as the package now include + the LSB header. + * Removed override file save-etc-disk. It is not present in Debian. + * Update the package description and debconf question text (Closes: #464109). + * New patch 11_more_warnings to activate more warning flags during + build. Obsoletes setting the same flags in debian/rules. + * New patch 50_sign_warning getting rid of some signed/unsigned + compare issues. + * Update test suite to the one provided by Werner Fink. + * Extended test suite to report status at the end. + * New patch 32_debug_option to add new option -D to print debug + output. + * New patch 33_nosuse_scripts to disable some SUSE specific settings. + * New patch 51_overwrite_output to improve output when symlinks on + disk do not match the default-* headers. + * Added override file for slashem-common. + * New patch 41_cleansystem to clean the .system file. Changed rules + file to make sure it take effect. + * Change test suite to use /bin/bash, as it uses bash-features. + * Debconf translations: + - Added Galician from Jacobo Tarrio (Closes: #465067). + - Added Vietnamese from Clytie Siddall (Closes: #465437). + - Added Portugese from Américo Monteiro (Closes: #465519). + - Added Finnish from Esko Arajärvi (Closes: #465800). + + -- Petter Reinholdtsen Sun, 17 Feb 2008 13:54:03 +0100 + +insserv (1.11.0-2) unstable; urgency=low + + * Changed patch 31_debian_conf to accept rsyslog and syslog-ng as + implementations for the $syslog facility. + * Added test case to detect insserv crashing when it find scripts + providing virtual system facilities. + * Changed update-bootsystem-insserv to refuse to enable dependency + based boot sequencing when a script provide a virtual system + facility. + * Changed patch 10_nosuse.dpatch to make sure we build with -g. + * Added patch debian/patches/40_segfault_virtprov.dpatch to avoid + segfault when finding an enabled script that provide a virtual + system facility. + + -- Petter Reinholdtsen Fri, 1 Feb 2008 09:24:10 +0100 + +insserv (1.11.0-1) unstable; urgency=low + + * New upstream version. + - Drop patches 20_path_at_runtime, 21_overrides, 32_debian_nolsb, + 33_debian_localok, 38_debuginfo, 40_nosusescript, + 41_debiandefault, 42_redundantlvl, 43_shutdown, + 44_reportloopmemb, 45_loopsarefatal and 46_complete_removal + merged upstream. + - Updated insserv(8) manual page for Debian (Closes: #462064). + - Correct path to insserv.conf in test suite to keep it working. + - A lot faster (Closes: #462211). + * New example script make-testsuite useful to generate a test script + demonstrating a problem. + * Added override files for guidedog and puppet. + * Removed override file for atd and lvm2, as the packages now include + the LSB header. + + -- Petter Reinholdtsen Thu, 31 Jan 2008 09:05:07 +0100 + +insserv (1.10.0-6) unstable; urgency=low + + * Implement support for preseeding insserv, to make it possible to + enable it at install time. This only work the first time the + package is installed and config is executed when + /usr/sbin/update-rc.d-insserv does not exist yet. + * Changed check-initd-order to load virtual facilities from + /etc/insserv.conf (Closes: #459522) + * Extended testsuite to more closely match real Debian for the + shutdown sequence. + * New patch 46_complete_removal.dpatch to make sure all symlinks are + removed on removal (Closes: #460034). Based on patch from Kel + Modderman. Made failing removal test fatal. + + -- Petter Reinholdtsen Sat, 19 Jan 2008 14:45:27 +0100 + +insserv (1.10.0-5) unstable; urgency=low + + * Made sure to initialize the badstate variable before it is used in + update-bootsystem-insserv. + * Removed override files for uptimed and uptimed.sh, as the uptimed + package now include the LSB headers. + * Make sure to give a proper error message when failing to enable + dependency based boot system and insserv return an error code + (Closes: #461141). + + -- Petter Reinholdtsen Wed, 16 Jan 2008 23:29:09 +0100 + +insserv (1.10.0-4) unstable; urgency=low + + * Made problematic test cases for bug #460034 and #458582 fatal + in testing and non-fatal when uploading. + * Added override files for bastille-firewall. + * Do not warn about obsolete init.d scripts that have been removed + (Closes: #461073). Patch from Kel Modderman. + * Provide more information when convertion to dependency based boot + sequencing can not be done. + + -- Petter Reinholdtsen Wed, 16 Jan 2008 22:00:50 +0100 + +insserv (1.10.0-3) unstable; urgency=low + + * Added test case for problem with symlink removal, bug #460034. + * Added override files for uptimed, uptimed.sh and guarddog. + * Removed override file nfs-user-server as the compiled in defaults + are better than the proposed overrides. + * Add mountoverflowtmp to virtual facility $local_fs, to make sure + /tmp/ is always mounted before the scripts needing /tmp/ is + started. Conflict with initscripts before 2.86.ds1-48, to avoid a + dependency loop with this change. + * Make debconf question translatable (Closes: #386703). + + -- Petter Reinholdtsen Sun, 13 Jan 2008 19:32:34 +0100 + +insserv (1.10.0-2) unstable; urgency=low + + * Implement new check-initd-order option -c to be used with -g to + generate a combined graph for boot and shutdown dependencies. + * Split test suite into two files, one generic part + (testsuite-common) and one Debian specific part (run-testsuite). + * Remove ntpdate and ntp-server as optional dependencies for $time + as both are obsolete, and changing them to the current 'ntp' would + make a loop. + * Removed override file for resolvconf and laptop-netconf, as the + unstable packages got the header now. + * Removed override file for devmapper, as the unstable packages no + longer include a init.d script + * Remove reference to lwresd in headers-reported, as the unstable + package got the header now. + * Added override files for the console-cyrillic and + gibraltar-bootsupport package. + + -- Petter Reinholdtsen Wed, 9 Jan 2008 22:42:31 +0100 + +insserv (1.10.0-1) unstable; urgency=low + + * New upstream version released 2007-10-10. + - Updated patches 10_nosuse, 20_path_at_runtime, 21_overrides and + 43_shutdown to apply on the new version. + - Removed patch 11_revdepend as it is included upstream. + * In graphs, name scripts without provides header, and scripts + without LSB header, using the name of the file in /etc/init.d/. + This make it easier to spot loops involving these scripts. + * Added override file for hpoj. + * Ask if insserv should be activated at install time, using a medium + priority debconf question. The default is no. + * Restructure test script to work with new test feature implemented + in version 1.10. + * Update patch 42_redundantlvl to get rid of two compiler warnings. + + -- Petter Reinholdtsen Mon, 7 Jan 2008 23:37:53 +0100 + +insserv (1.09.0-14) unstable; urgency=low + + * Changed patch 21_overrides to only warn once about scripts without + LSB header, to reduce the noise. + * Changed patch 21_overrides to speed up processing by only reading + override default files only when the script is lacking an LSB header. + * Moved default dependency values from patch 21_overrides to + 41_debiandefault where it belong. + * New test to check that scripts introducing a loop (or a fake loop, + see bug #458582) will refuse to install. + * New patch 45_loopsarefatal to make sure insserv considering all + kind of loops fatal, to not mess up the script sequences. + * Introduce very simple manual page for update-rc.d-insserv. + * Make failing 'make clean' fatal, as it should always work. + * Change debconf template text to make it easier to understand. + + -- Petter Reinholdtsen Sun, 6 Jan 2008 09:37:43 +0100 + +insserv (1.09.0-13) unstable; urgency=low + + * Update patch 21_overrides to fix bug in override handling. Now a + header in a script or override file complete replaces previously + loaded headers. + * Add test to check and verify that override files in + /etc/insserv/override replaces headers in the scripts in + /etc/init.d/, and made previously failing loop breaking test + fatal, as it is working with the fixed override patch. + + -- Petter Reinholdtsen Fri, 4 Jan 2008 12:25:55 +0100 + +insserv (1.09.0-12) unstable; urgency=low + + * New patch 34_debian_fixedscripts to hardcode a few script sequence + numbers, to let the generated boot sequence be more like the + original one. Modified 40_nonsusescripts to no longer disable the + setlsb() function. This patch is not enabled by default, as it is + not obvious that it is a good idea. + * Added override files for hostname.dhcp and mountfix. + * Adjust override file for lvm2, to provide both lvm2 and lvm, to + make it easier until the lvm provide is dropped. + * Adjust override file for lvm2 to use reverse depend on checkfs, + mountall and umountfs to make it possible to drop lvm relations + from initscripts. + + -- Petter Reinholdtsen Fri, 4 Jan 2008 01:38:00 +0100 + +insserv (1.09.0-11) unstable; urgency=low + + * Added test to demonstrate the fake loop warning issue (bug + #458582). + * Implemented support for non-fatal tests in the testsuite. + * Added override file for dmraid, scsitools-pre.sh and scsitools.sh. + * Added patch 44_reportloopmemb to make loop reporting code in + insserv more helpful, and make sure to report the extended loop + output in update-bootsystem-insserv when refusing to switch to + dependency based boot (Closes: #458683). + * Move code to divert update-rc.d from postinst to + update-bootsystem-insserv, to make sure both ways to activate + insserv are equivalent. + * Extended check-initd-order to graph services with multiple + provides as two nodes that depend on each other, and which ahve + the same dependencies. + * Changed update-bootsystem-insserv to call 'reset' after looping + over packages postinst scripts, in case the terminal is messed up + as it is when I test it. + * Disabled check for reverse dependencies in check-initd-order. It + does not to work properly, and gave false error reports. + * Removed flag file /etc/update-rc.d-insserv and use the update-rc.d + diversion as the flag to detect if insserv is enabled. Adjustd + package removal and update-rc.d-insserv to reflect this. + * Added Vcs-Svn and Vcs-Browser info in control file, pointing to + the Debian packaging project. + + -- Petter Reinholdtsen Wed, 2 Jan 2008 18:41:31 +0100 + +insserv (1.09.0-10) unstable; urgency=low + + * Make sure to exit with an error code if it isn't safe to remove + the package. + + -- Petter Reinholdtsen Tue, 1 Jan 2008 21:12:24 +0100 + +insserv (1.09.0-9) unstable; urgency=low + + * Removed override file pptpd as the compiled in defaults are better + than the proposed overrides. + * Correct override file for laptop-netconf after checking the script + and the package. + * Added override file for racoon, and corrected override file for + setkey, after checking the scripts in the package. + * Try to make recovery routine more robust by not trying to run + non-existing postinst scripts, and only run postinst scripts for + packages with executable scripts in /etc/init.d/. + * Extended check-initd-order to check optional start dependencies, + and implement check of the shutdown sequence. + * Extended to check reverse dependencies too. + * Changed enabling code to refuse to convert to dependency based + boot sequence when obsolete init.d scripts are found, as these + tend to mess up the boot sequence. + * Changed enabling code to refuse to convert to dependency based + boot sequence if several scripts provide the same service. + * Added prerm code to refuse to be removed while enabled, to avoid + messing up the boot system completely. + + -- Petter Reinholdtsen Tue, 1 Jan 2008 21:08:14 +0100 + +insserv (1.09.0-8) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Removed override files cpqarrayd, hotkey-setup and spamassassin as + they are equivalent with the defaults compiled into insserv. + * Removed override files courier-ldap, courier-authdaemon, + courier-imap-ssl and courier-imap, irqbalance and nethack-common + as the compiled in defaults are better than the proposed + overrides. + * Extended check-initd-order to graph reverse dependencies + (X-Start-Before and X-Stop-AFter). Draw reverse dependencies in + yellow. + * Added patch 11_revdepend fetched from a review copy of version + 1.10. Modified 20_override to cope with the change. Based on + changes from Werner Fink. + * Renamed patches 20_overrides to 21_overrides and + 44_path_at_runtime to 20_path_at_runtime, to prepare for Otavios + extensions. + + [ Otavio Salvador ] + * Extended patch 21_override to allow override path changing so the + unit test can use it. + + -- Petter Reinholdtsen Mon, 31 Dec 2007 19:26:00 +0100 + +insserv (1.09.0-7) unstable; urgency=low + + * Try to make it it easier to disabling the dependency based boot + sequencing by calling the postinst of all packages with init.d + scripts to register the scripts again. + * Extend check-initd-order to handle the virtual dependecy $all. + * Reword the debconf question to try to make it clearer and + easier to understand. + * Minor cleanup in irqbalance and atd override file, only depend + on $remote_fs, no need to also depend on $local_fs. + * Update check-initd-order to use the same default dependencies + ($remote_fs $syslog) and the same virtual dependencies as insserv + when generating dotty graphs. + * Update check-initd-order to draw left-to-right dotty graphs. + Based on tip from Frans Pop and Trent Buck. + * Update lvm2 override to stop before umountroot. + + -- Petter Reinholdtsen Sun, 30 Dec 2007 18:48:47 +0100 + +insserv (1.09.0-6) unstable; urgency=low + + * Update patch 20_overrides to let scripts without an LSB header + depend on $syslog as well as $remote_fs. + * Add test case to check that scripts without LSB header is ordered + after syslog + + -- Petter Reinholdtsen Sun, 30 Dec 2007 12:39:33 +0100 + +insserv (1.09.0-5) unstable; urgency=low + + * Update patch 44_path_at_runtime to include support for -c to point + to a local config file. It is required for a proper test suite. + * Fix typo in test suite and extend it to check more scenarios. + * Use local config file when running test suite. + * Change $syslog virtual facility to depend on either syslog or + sysklogd. The sysklogd script provide syslog and not the sysklogd + string that was requested in bug #324679. + * Update patch 31_debian_conf to list udev mountdevsubfs checkroot + checkfs console-screen as interactive scripts that should run + alone. + + -- Petter Reinholdtsen Sun, 30 Dec 2007 09:23:22 +0100 + +insserv (1.09.0-4) unstable; urgency=low + + * Update patch 20_overrides to add useful default values for scripts + without LSB header (Closes: #431697). + * Update patch 43_shutdown to handle scripts with both start and + stop levels. (Closes: #452462). + * New patch 44_path_at_runtime to add new option -p to make it + possible to replace /etc/init.d with another path for testing. + * Add script debian/run-testsuite to test the generated order, and + use it during the build. + + -- Petter Reinholdtsen Sat, 29 Dec 2007 16:00:31 +0100 + +insserv (1.09.0-3) unstable; urgency=low + + * Update patch 40_nosusescript to disable unused function setlsb(). + * Add sendsigs to the $remote_fs virtual facility, to make sure the + services depending on $remote_fs for the shutdown sequence are not + killed before their init.d script get a chance to stop them. + * New patch 43_shutdown to fix the handling of stop scripts and thus + the shutdown sequence (Closes: #452462). Thanks to Otavio + Salvador for help with debugging and part of the patch. + + -- Petter Reinholdtsen Sat, 29 Dec 2007 00:20:04 +0100 + +insserv (1.09.0-2) unstable; urgency=low + + * New patch 10_nosuse to disable SUSE specific build. This make + it easier to debug insserv. + * Update patch 40_nosusescript to remove SUSE-specific handling + of the halt and reboot script. + * Remove all override files for init.d scripts with LSB style + dependency headers (Closes: #386544). + * Update snmptrapfmt override file, making it more accurate. + * Updated standards-version from 3.7.2 to 3.7.3. No changes needed. + + -- Petter Reinholdtsen Tue, 25 Dec 2007 14:24:26 +0100 + +insserv (1.09.0-1) unstable; urgency=low + + * New upstream release. (Closes: #426091) + - Support X-Start-Before and X-Stop-After (Closes: #326120) + - Building with DEB_BUILD_OPTIONS=nostrip no longer strip the + binary. (Closes: #437210) + * Let /usr/share/insserv/check-initd-order read override files in + /etc/insserv/overrides/ just like insserv does. Patch from Arjan + Oosting. (Closes: #429398) + * Correct the dependencies for nbd-client and libnss-ldap. + * Add override file for spamassassin. + * Update watch file with new upstream URL. (Closes: #450044) + + -- Petter Reinholdtsen Sat, 17 Nov 2007 21:17:20 +0100 + +insserv (1.08.0-14) unstable; urgency=low + + * Correct the dependencies for hwclock.sh. + * Update libdevmapper*, raid2 and mdadm-raid by adding + module-init-tools as an alternative to modutils, and move + both from required-start to should-start, as either or both + might be available. (Closes: #432072) + + -- Petter Reinholdtsen Mon, 9 Jul 2007 13:40:36 +0200 + +insserv (1.08.0-13) unstable; urgency=low + + * Add override files for sysfsutils and hplip. + * Add cryptdisks-early as should-start to the lvm2 override + file (Closes: 429402) + + -- Petter Reinholdtsen Mon, 18 Jun 2007 17:32:50 +0100 + +insserv (1.08.0-12) unstable; urgency=low + + * Add override files for nbd-server and libdevmapper1.02.1. + * Update override files for atd, atftpd, discover, enable-nat, + keymap.sh, klogd, mplayer, networking, open-backdoor, + openbsd-inetd, report-reboot, rsync and start-wlan + based on the headers in the packages themselves. + * Add override file for lvm2 (Closes: #426104). + + -- Petter Reinholdtsen Sat, 26 May 2007 12:42:38 +0200 + +insserv (1.08.0-11) unstable; urgency=low + + * Add override file for timidity. + * Add override file for powernowd. + * Add override file for laptop-mode. + * Update override file for libnss-ldap. + + -- Petter Reinholdtsen Thu, 2 Nov 2006 13:36:10 +0100 + +insserv (1.08.0-10) unstable; urgency=low + + * Add override file for cpqarrayd. + * Add override file for libpam-devperm. + * Add override file for screen-cleanup. + + -- Petter Reinholdtsen Sat, 14 Oct 2006 21:00:31 +0200 + +insserv (1.08.0-9) unstable; urgency=low + + * Change bind9 override file to avoid dependency loop involving + $syslog->sysklogd->$named->bind9. Remove $syslog dependency and + insert $remote_fs dependency instead. Make the $network dependency + conditional to work when netbase is not installed. + * Add override file for resolvconf. + * Add override file for installation-report. + * Minor cleanup in nviboot override file, only depend on $remote_fs, no need + to also depend on $local_fs. + + -- Petter Reinholdtsen Sat, 7 Oct 2006 10:08:04 +0200 + +insserv (1.08.0-8) unstable; urgency=low + + * Add override files for festival, hotkey-setup and lisa. + * New patch 41_debiandefault to set the default runlevels for start (2345) + and stop (016) on Debian. + + -- Petter Reinholdtsen Sat, 16 Sep 2006 17:32:24 +0200 + +insserv (1.08.0-7) unstable; urgency=low + + * Remove override file console-screen.sh. The info is now present in the + file itself. + * Modify override file for lvm to document that it should stop just + before halt and reboot. + * Modify override file for exim4 to only conditional depend on $named. + * Rewrite check-initd-order to avoid the dependency on perl-modules, + to make it easier to run in systems with small disks. + * Remove override files for aumix, cfengine2, cryptdisk, hdparm, + ifupdown, ifupdown-clean, kdm, nfs-common, nfs-kernel-server, + pcmcia, portmap, sudo, udev, udev-mtab, x11-common, + xdebconfigurator. It is good enough in the scripts themselves + now. + * Modify override file for atd to avoid redundant dependencies and + drop runlevel 'S' from the stop list. Reported as bug #376780. + + -- Petter Reinholdtsen Thu, 14 Sep 2006 15:15:49 +0200 + +insserv (1.08.0-6) unstable; urgency=low + + * Minor change to the template text, explaining that the S* symlinks + are renamed to K* symlinks in rc0.d/ and rc6.d/. + * Correct override file for sysklogd and klogd. These should not + start in runlevel S, and should stop in runlevel 1. + * Add $syslog to the dependency list for openbsd-inetd, to make sure + it can log its start to syslog. Drop $local_fs, as it is a + dependency for $remote_fs. + * New patch debian/patches/40_nosusescript to avoid inserting the + 'single' script showing up in runlevel S, and also avoid fixing + the sequence number to the values used by SuSe. + * Correct override file for hotplug-net, it should depend on $local_fs. + * Correct override file for hotplug, it should stop before $local_fs. + * Modify patch 31_debian_conf to also list ifupdown as part of the + $network facility, to make $network available in runlevel 0 and 6. + * Try to make update-bootsystem-insserv more robust on restores. + Move conversion logs and related files to /var/lib/insserv. + + -- Petter Reinholdtsen Sun, 10 Sep 2006 20:17:15 +0200 + +insserv (1.08.0-5) unstable; urgency=low + + * New flag -k for check-initd-order to look at the stop sequence instead + of the start sequence. + * Correct override files for acpid, alsa, alsa-utils, apmd, + hwclockfirst.sh, ifupdown, modutils, networking, nullmailer, + openbsd-inetd, pcmcia, procps.sh, and update-hostname. + * Remove override files for bootlogd, bootmisc.sh, checkfs.sh, + checkroot.sh, glibc.sh, halt, hostname.sh, module-init-tools, + mountall.sh, mountdevsubfs.sh, mountnfs.sh, reboot, rmnologin, + sendsigs, single, stop-bootlogd, umountfs umountnfs.sh and urandom + as the scripts themselves now have correct dependency information + in them. + * With the current patches and dependency info, insserv generate + correct shutdown order. (Closes: #350188) + + -- Petter Reinholdtsen Sat, 9 Sep 2006 20:23:28 +0200 + +insserv (1.08.0-4) unstable; urgency=low + + * Change update-bootsystem-insserv to refuse to convert the boot + system if there are dependency loops. + * New patch 37_consistent_path to make more consistent log output. + * Adjust the the rules file to make sure we build using the compiler options + specified there. + * New patch 33_debian_localok making .local a valid ending, + to accept script names like 'rc.local'. + * New patch 38_debuginfo to improve the debug output. + * New patch 39_debianlvl.dpatch to handle rcS.d/ a bit better. + * Add override for mountdevsubfs.sh, documenting its + relation to udev. + * Add override for stop-bootlogd, documenting that it should come late, + after rmnologin. + * Make it easier to enable the dependency based boot system by + adding a fairly well hidden debconf question to activate it. + * Adjust the override files for dns-clean, hotplug, hotplug-net, + hwclock.sh, keymap.sh, libdevmapper1.00, libdevmapper1.01, + libdevmapper1.02, modutils, nviboot and procps.sh to make sure + they only start in runlevel S. + * Adjust override file for acpid, nstxd and nstxcd, to make sure + they are not started in runlevel S. + * Adjust override file for makedev and rmnologin, there is + no reason to add stop links for them. + * Remove 'S' from all override files listing it in should-stop. It + never make sense to add stop scripts in rcS.d/. + * Allow check-initd-order to continue even if one file is unreadable. + * Add override files for apt-index-watcher, vbesave, acpi-support + and libnss-ldap. + * Correct the definition of $remote_fs to include mountnfs, + mountnfs-bootclean and umountnfs. + * Correct the definition of $local_fs to include mountfs, + mountfs-bootclean and umountfs. + * Adjust the override file for openbsd-inetd, to make sure it start + after /usr/ is mounted. + + -- Petter Reinholdtsen Fri, 8 Sep 2006 19:14:15 +0200 + +insserv (1.08.0-3) unstable; urgency=low + + * Extend check-initd-order to accept a new argument -o, to not load + the override files. + + -- Petter Reinholdtsen Thu, 7 Sep 2006 11:59:17 +0200 + +insserv (1.08.0-2) unstable; urgency=low + + * New patch 35_fixunused removing incorrect 'unused' flagg from a + few functions, to avoid compile warning on s390. + * New patch 36_memleak fixing a minor memory leak. + * Updated override file for libdevmapper1.00. + * Added override file for libdevmapper1.02. + * Sync override files with the unstable init.d scripts for + alsa,alsa-utils, atd, bootlogd, bootmisc.sh, cfengine2, + checkfs.sh, checkroot.sh, console-screen.sh, cryptdisk, exim4, + fam, halt, hdparm, kdm, keymap.sh, makedev, module-init-tools, + mountall.sh, mountnfs.sh, networking, nfs-common, + nfs-kernel-server, pcmcia, portmap, pppd-dns, procps.sh, reboot, + rmnologin, single, sudo, udev, udev-mtab, umountfs, umountnfs.sh, + urandom and xdebconfigurator. I assume the package maintainer + know the scripts best, and use their values. + * Added override file for usplash. + * Modify update-bootsystem-insserv to report dependency loop + problems. (Closes: #386301) + * Add recommend on perl-modules. (Closes: #386300) + * Update standards-version to 2.7.2. No changes needed. + * Do not include 'klogd' in the $syslog facility, to avoid + dependency loop. + * Change mountvirtfs to mountdevsubfs in all override files, to + use the new name instead of the obsolete name. + * The keymap override should not depend on $syslog, and neither should + keymap.sh itself (bug #386338). + * Update 20_overrides.dpatch to new version of the source. + + -- Petter Reinholdtsen Thu, 7 Sep 2006 00:45:18 +0200 + +insserv (1.08.0-1) unstable; urgency=low + + * New upstream release. + * Correct name of logfile, moving the stderr redirect to the insserv + call. (Closes: #349494) + * Add code in update-bootsystem-insserv to convert all S* symlinks + in rc1.d and rc6.d to K* symlinks before insserv is executed. to + reflect the argument passed on to these scripts in debian. + Addresses part of bug #350188. + + -- Petter Reinholdtsen Sun, 1 Apr 2006 17:30:35 +0100 + +insserv (1.04.0-2) unstable; urgency=low + + * Modify 20_override.dpatch based on input from upstream author + Werner Fink, to add more error handling. + + -- Petter Reinholdtsen Fri, 11 Nov 2005 15:35:27 +0100 + +insserv (1.04.0-1) unstable; urgency=low + + * New upstream release. + - Start building without -DSUSE, to enable processing of *-stop headers. + * Updated upstream URL in copyright file to match the latest location. + * Remove 40_dryrunmore.dpatch, applied upstream. + * Remove 41_dryrun_msg.dpatch, applied upstream. + * Remove 50_cfgfilter.dpatch, applied upstream. + * Merged 20_overrides.dpatch and 25_overrides.dpatch into one patch + 20_overrides.dpatch. + * New 34_debian.dpatch modifying the paths from rc#.d/, getting + non-SUSE case working on Debian. + * New patch 30_non_suse.dpatch fixing segfault in the non-SUSE case. + * Updated init.d override files for hwclockfirst, ifupdown, + ifupdwon-clean, initrd-tools, keymap, networking, procps and + udev-mtab. + + -- Petter Reinholdtsen Thu, 10 Nov 2005 22:50:14 +0100 + +insserv (1.02.0-3) unstable; urgency=low + + * Added init.d override files for acct, apache2, snmpd and snmptrapfmt. + * Updated and corrected override file for alsa, apache, atd, cron, + gdm, gpsd, initrd-tools, udev-mtab and xdm. + * Wrote graphviz dotty graph generation support for check-init-order (-g). + * Updated README.Debian to reflect the current status in Debian, and + included some instructions on how to use this package. + * Documented in the override files which dependency information I've + reported to BTS. + * Add 'ntpdate' as a optional dependency for the $time virtual + facility, to make sure NTP update is done on machines without + their own NFS server + * Wrote manual page for update-bootsystem-insserv(8). + + -- Petter Reinholdtsen Thu, 10 Nov 2005 00:18:49 +0100 + +insserv (1.02.0-2) unstable; urgency=low + + * Added init.d override files for hibernate, mdadm-raid, start-wlan + and x11-common. + * Corrected sysklogd override file, to only provide sysklogd. + * Document BTS bug numbers in the override file for the init.d + dependency headers I've submitted to the package maintainer. + + -- Petter Reinholdtsen Wed, 5 Oct 2005 17:04:01 +0200 + +insserv (1.02.0-1) unstable; urgency=low + + * New upstream version. + - Rewritten to handle non-SuSe systems better. + - Patches 05_verbose_doc, 10_dryrun, and 50_lsb_shold_std removed, + as they are included upstream. + - Updated patch 40_dryrunmore to match new version, and extend it to + also cover SuSe code. + * Still building with -DSUSE as the new non-SuSe features are still + buggy. + * Changed download URL in copyright file to + . + * Removed rc and rcS, as a version of sysvinit + with equivalent patches is in sid and etch now. + * Added and updated init.d dependency info override files. + The provided dependencies is tested to work on my test machines + with 2.4 and 2.6 installs. (Closes: #325798) + * New script update-bootsystem-insserv to reorder + the boot scripts with a backup. + * Avoid initscripts with .dpkg* in the name. + (51_cfgfilter_dpkg.dpatch) (Closes: #326445) + * Add dependency on sysv-rc. (Closes: #329279) + + -- Petter Reinholdtsen Sat, 3 Sep 2005 13:18:51 +0200 + +insserv (1.00.8-5) unstable; urgency=low + + * Updated dependency info for (module-init-tools, modutils, raid2, mdadm) + * Added dependency override files (noflushd, laptop-net, whereami, pcscd) + + -- Petter Reinholdtsen Fri, 2 Sep 2005 09:21:25 +0200 + +insserv (1.00.8-4) unstable; urgency=low + + * Added dependecy override files (xdm, irqbalance). + * Updated dependency info for a few override files (devfsd, + discover, hotplug, hotplug-net, hwclock.sh, keymap.sh, rmnologin, + sudo, gdm, lvm, ntpdate, xfs, aumix, freevo, laptop-netconf, + report-reboot, open-backdoor). + * New patch to avoid warning about missing override files if the + init.d file already contain LSB tags. (25_override.dpatch) + * Correct header example in the insserv(8) manual page. + (50_lsb_should_std.dpatch) + + -- Petter Reinholdtsen Thu, 1 Sep 2005 22:24:51 +0200 + +insserv (1.00.8-3) unstable; urgency=low + + * Added dependecy override files (nullmailer, binfmt-support). + * Add suggests on bootchart, a great tool to debug the boot + sequence. + * New patch to get dryrun mode working also when /etc/rc.boot is + missing. (40_dryrunmore.dpatch) + * Added more information about the dangers of reorganizing the boot + sequence in README.Debian. + * Some package cleanup. + + -- Petter Reinholdtsen Fri, 30 Aug 2005 00:20:16 +0200 + +insserv (1.00.8-2) unstable; urgency=low + + * Updated and added dependecy override files. + * Added script check-initd-order, trying to check the current boot + sequence in debian based on the LSB headers present. + + -- Petter Reinholdtsen Fri, 26 Aug 2005 00:20:16 +0200 + +insserv (1.00.8-1) unstable; urgency=low + + * Initial Release. (Closes: #324926) + * Document the -v (--verbose) flag. (05_verbose_doc.dpatch) + * Implement new option -n (--dryrun). (10_dryrun.dpatch) + * Implement support for reading LSB init.d header info from override + files. (20_overrides.dpatch) + * Adjust some paths and avoid installing LSB install scripts to + match Debian policy. (30_debian.dpatch) + * Add README.Debian explaining how to test this. + + -- Petter Reinholdtsen Fri, 26 Aug 2005 00:19:16 +0200 --- insserv-1.14.0.orig/debian/update-rc.d-insserv.8 +++ insserv-1.14.0/debian/update-rc.d-insserv.8 @@ -0,0 +1,14 @@ +.\" Copyright 2008,2009 Petter Reinholdtsen +.\" May be distributed under the GNU General Public License +.TH "update-bootsystem-insserv" "8" "28 July 2009" "Petter Reinholdtsen" "" +.SH "NAME" +update\-rc.d\-insserv \- obsolete +.SH "DESCRIPTION" +.B update\-rc.d\-insserv +is an obsolete implementation of the update-rc.d interface for the dependency +based boot sequencing system insserv. The implementation was moved into the +sysv-rc update-rc.d implementation. +.SH "SEE ALSO" +update\-rc.d(8), insserv(8), update-bootsystem-insserv(8) +.SH "AUTHOR" +Petter Reinholdtsen, --- insserv-1.14.0.orig/debian/bash-completion +++ insserv-1.14.0/debian/bash-completion @@ -0,0 +1,36 @@ +# insserv(8) completion +# +# Copyright (c) 2009 Kel Modderman +# + +have insserv && +_insserv() +{ + local cur prev sysvdir services options + + cur=`_get_cword` + prev=${COMP_WORDS[COMP_CWORD-1]} + + [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \ + || sysvdir=/etc/init.d + + services=( $(echo $sysvdir/!(README*|*.dpkg*|*.rpm@(orig|new|save))) ) + services=( ${services[@]#$sysvdir/} ) + options=( -c --config -d -f -n -o --override -p --path -r -v ) + + case "$prev" in + -c|--config) + _filedir + ;; + -o|--override|-p|--path) + _filedir -d + ;; + *) + COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' -- \ + $cur ) ) + ;; + esac + + return 0 +} && +complete -F _insserv insserv --- insserv-1.14.0.orig/debian/run-testsuite +++ insserv-1.14.0/debian/run-testsuite @@ -0,0 +1,2254 @@ +#!/bin/bash + +basedir=$(dirname $0) +. $basedir/../tests/suite + +if head -1 debian/changelog | grep -q UNRELEASED ; then + severity=check +else + severity=test +fi + +update_conf() { +set +C +cat <<'EOF' > $insconf +$local_fs +mountall +umountfs +$network +networking +ifupdown +$named +named +dnsmasq +lwresd +bind9 $network +$remote_fs $local_fs +mountnfs +mountnfs-bootclean +umountnfs +sendsigs +$syslog +syslog +sysklogd +$portmap portmap +$time hwclock + udev mountdevsubfs checkroot checkfs console-screen +EOF +set -C +} +########################################################################## +test_normal_sequence() { +echo +echo "info: test normal boot sequence scripts, and their order" +echo + +insertscript mountkernfs.sh <<'EOF' +### BEGIN INIT INFO +# Provides: mountkernfs +# Required-Start: +# Required-Stop: +# Should-Start: glibc +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript mountdevsubfs.sh <<'EOF' +### BEGIN INIT INFO +# Provides: mountdevsubfs mountvirtfs +# Required-Start: mountkernfs +# Required-Stop: +# Should-Start: udev +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript checkroot.sh <<'EOF' +### BEGIN INIT INFO +# Provides: checkroot +# Required-Start: mountdevsubfs +# Required-Stop: +# Should-Start: keymap hwclockfirst +# Should-stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript ifupdown-clean <<'EOF' +### BEGIN INIT INFO +# Provides: ifupdown-clean +# Required-Start: checkroot +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript ifupdown <<'EOF' +### BEGIN INIT INFO +# Provides: ifupdown +# Required-Start: ifupdown-clean +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript checkfs.sh <<'EOF' +### BEGIN INIT INFO +# Provides: checkfs +# Required-Start: checkroot +# Required-Stop: +# Should-Start: lvm cryptdisks +# Should-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript mountall.sh <<'EOF' +### BEGIN INIT INFO +# Provides: mountall +# Required-Start: checkfs +# Required-Stop: +# Should-Start: lvm +# Should-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript mountnfs.sh <<'EOF' +### BEGIN INIT INFO +# Provides: mountnfs +# Required-Start: $local_fs +# Required-Stop: +# Should-Start: $network +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript beforenfs <<'EOF' +### BEGIN INIT INFO +# Provides: beforenfs +# Required-Start: $local_fs +# Required-Stop: +# X-Start-Before: mountnfs +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript hwclock.sh <<'EOF' +### BEGIN INIT INFO +# Provides: hwclock +# Required-Start: mountdevsubfs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript killprocs <<'EOF' +### BEGIN INIT INFO +# Provides: killprocs +# Required-Start: $local_fs +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +insertscript single <<'EOF' +### BEGIN INIT INFO +# Provides: single +# Required-Start: $local_fs killprocs $all +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +insertscript needlocalfs <<'EOF' +### BEGIN INIT INFO +# Provides: needlocalfs +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insertscript needallfs <<'EOF' +### BEGIN INIT INFO +# Provides: needallfs +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insertscript sysklogd <<'EOF' +### BEGIN INIT INFO +# Provides: syslog +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insertscript reboot <<'EOF' +### BEGIN INIT INFO +# Provides: reboot +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript halt <<'EOF' +### BEGIN INIT INFO +# Provides: halt +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 +### END INIT INFO +EOF + +insertscript umountroot <<'EOF' +### BEGIN INIT INFO +# Provides: umountroot +# Required-Start: +# Required-Stop: +# Should-Stop: halt reboot +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript umountfs <<'EOF' +### BEGIN INIT INFO +# Provides: umountfs +# Required-Start: +# Required-Stop: umountroot +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript umountnfs <<'EOF' +### BEGIN INIT INFO +# Provides: umountnfs +# Required-Start: +# Required-Stop: umountfs +# Should-Stop: $network $portmap nfs-common +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript needallfs2 <<'EOF' +### BEGIN INIT INFO +# Provides: needallfs2 +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# X-Start-Before: needallfs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insertscript kexec <<'EOF' +### BEGIN INIT INFO +# Provides: kexec +# Required-Start: +# Required-Stop: reboot +# X-Stop-After: umountroot +# Default-Start: +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript networking <<'EOF' +### BEGIN INIT INFO +# Provides: networking +# Required-Start: mountkernfs ifupdown $local_fs +# Required-Stop: ifupdown $local_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript nolsbheader <<'EOF' +EOF + +list_rclinks + +check_order S mountkernfs.sh mountdevsubfs.sh +check_order S ifupdown-clean ifupdown +check_order S ifupdown-clean ifupdown +check_order S mountall.sh mountnfs.sh +check_order S mountall.sh beforenfs +check_order S beforenfs mountnfs.sh + +check_order 0 needallfs umountnfs +check_order 0 umountroot halt + +check_order 1 killprocs single +check_order 1 needallfs killprocs + +check_order 2 needlocalfs needallfs +check_order 2 needlocalfs nolsbheader +check_order 2 sysklogd nolsbheader +check_order 2 needallfs2 needallfs + +check_order 6 needallfs umountnfs +check_order 6 nolsbheader umountnfs +check_order 6 umountfs umountroot +check_order 6 umountnfs networking +check_order 6 networking ifupdown +check_order 6 umountnfs umountfs +check_order 6 umountroot reboot +check_order 6 umountroot kexec +check_order 6 kexec reboot +} +########################################################################## +test_override_files() { +echo +echo "info: test if override files replace headers in the file" +echo + +initdir_purge + +# Two scripts with a loop between them +insertscript base <<'EOF' || true +### BEGIN INIT INFO +# Provides: base +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript mover <<'EOF' || true +### BEGIN INIT INFO +# Provides: mover +# Required-Start: base +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +check_order S base mover + +mkdir -p $overridedir +cat <<'EOF' > $overridedir/mover +### BEGIN INIT INFO +# Provides: mover +# Required-Start: +# Required-Stop: +# X-Start-Before: base +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insserv_reg mover + +list_rclinks + +# Make sure the override file moved mover before base +check_order S mover base +rm -rf $overridedir +} +########################################################################## +test_override_loop() { +echo +echo "info: testing to insert scripts with a loop, and the effect of an override file" +echo + +initdir_purge + +# Two scripts with a loop between them +if insertscript loop1 <<'EOF' ; then +### BEGIN INIT INFO +# Provides: loop1 +# Required-Start: loop2 +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + error "inserting script with missing dependencies did not fail" +fi + +insertscript loop2 <<'EOF' || true +### BEGIN INIT INFO +# Provides: loop2 +# Required-Start: loop1 +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +# Test if override file can be used to break the loop +mkdir -p $overridedir +cat <<'EOF' > $overridedir/loop1 +### BEGIN INIT INFO +# Provides: loop1 +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +check_script_not_present S loop1 +check_script_not_present S loop2 + +insserv_reg loop1 || true +insserv_reg loop2 || true + +check_order S loop1 loop2 +rm -rf $overridedir +} +########################################################################## + +test_override_remove() { +echo +echo "info: Try to reproduce BTS #540866" +echo + +initdir_purge + +addscript testscript <<'EOF' +### BEGIN INIT INFO +# Provides: testscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +mkdir -p ${overridedir}/. +cat >${overridedir}/testscript <<'EOF' +### BEGIN INIT INFO +# Provides: testscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insserv_reg testscript + +list_rclinks + +check_script_not_present 3 testscript + +echo info: Trying to remove the script + +insserv_del testscript + +list_rclinks + +check_script_not_present 3 testscript +} + +########################################################################## +test_long_loop() { +echo +echo "info: testing to insert scripts with a longer loop, making sure it fail" +echo + +initdir_purge + +# Three scripts with a loop between them, make sure introducing the +# loop fail, as it will make insserv generate a unstable and broken +# boot and shutdown sequence. +insertscript loop1 <<'EOF' +### BEGIN INIT INFO +# Provides: loop1 +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript loop2 <<'EOF' || true +### BEGIN INIT INFO +# Provides: loop2 +# Required-Start: loop1 +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +if insertscript loop3 <<'EOF' ; then +### BEGIN INIT INFO +# Provides: loop3 +# Required-Start: loop2 +# Required-Stop: +# X-Start-Before: loop1 +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + error "inserting script causing a loop did not fail" +fi +} +########################################################################## +test_combined_loop() { +# Test real loop in the combined start and stop sequence. There is no +# loop in the start sequence, and no loop in the stop sequence, but in +# the combined graph insserv is creating internally, there is a loop. +# This make sense, as scripts need to be installed in dependency +# order, and there is no way to install these scripts that make sure +# both start and stop dependencies are fulfilled. +echo +echo "info: test handling of loops in the combination of start and stop sequences" +echo + +initdir_purge + +insertscript startfirst <<'EOF' || true +### BEGIN INIT INFO +# Provides: startfirst +# Required-Start: +# Required-Stop: startsecond +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript startsecond <<'EOF' || true +### BEGIN INIT INFO +# Provides: startsecond +# Required-Start: startfirst +# Required-Stop: +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +list_rclinks + +test_order S startfirst startsecond +test_order 6 startsecond startfirst +} +########################################################################## +test_fake_loop() { +# Test another fake loop. This one should work, as it is possible to +# install the two scripts in sequence because one of the dependencies +# are optional. It does not with insserv today. +echo +echo "info: test handling of 'fake' loops in the combination of start and stop sequences" +echo + +initdir_purge + +insertscript startfirst_stopfirst <<'EOF' || true +### BEGIN INIT INFO +# Provides: startfirst_stopfirst +# Required-Start: +# Required-Stop: +# Should-Stop: startsecond_stoplast +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript startsecond_stoplast <<'EOF' || true +### BEGIN INIT INFO +# Provides: startsecond_stoplast +# Required-Start: startfirst_stopfirst +# Required-Stop: +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +list_rclinks + +check_order S startfirst_stopfirst startsecond_stoplast +check_order 6 startfirst_stopfirst startsecond_stoplast +} +########################################################################## +test_fake_loop_reverse() { +# Test another fake loop using reverse dependencies to document that +# it can happen based on information provided in one package only. +# This should work, as it is possible to install the two scripts in +# sequence because one of the dependencies are optional. It does not +# with insserv today. Note thought that the generated order is +# different from the one above. + +echo +echo "info: test handling of 'fake' loops using reverse depends" +echo + +initdir_purge + +insertscript startfirst_stopfirst <<'EOF' || true +### BEGIN INIT INFO +# Provides: startfirst_stopfirst +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript startsecond_stoplast <<'EOF' || true +### BEGIN INIT INFO +# Provides: startsecond_stoplast +# Required-Start: startfirst_stopfirst +# Required-Stop: +# X-Stop-After: startfirst_stopfirst +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +list_rclinks + +# #458582 +check_order S startfirst_stopfirst startsecond_stoplast +check_order 6 startfirst_stopfirst startsecond_stoplast +} +########################################################################## +test_badscript() { +echo +echo "info: test if bad script in init.d/ with no symlinks in rc*.d/ make problems" +echo + +initdir_purge + +addscript sitelocal <<'EOF' || true +### BEGIN INIT INFO +# Provides: duplicate +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript distroglobal <<'EOF' || true +### BEGIN INIT INFO +# Provides: dublicate +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +list_rclinks + +check_script_present S distroglobal +} +########################################################################## +test_onlystart() { +echo +echo "info: check that it work to insert scripts with only start runlevels" +echo + +initdir_purge + +insertscript onlystart <<'EOF' || true +### BEGIN INIT INFO +# Provides: onlystart +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +check_script_present 2 onlystart +check_script_present 3 onlystart +check_script_present 4 onlystart +check_script_present 5 onlystart + +check_script_not_present 0 onlystart +check_script_not_present 1 onlystart +check_script_not_present 6 onlystart +} +########################################################################## +test_onlystop() { +echo +echo "info: check that it work to insert scripts with only stop runlevels" +echo +# This test check that the common way to update the runlevels used by +# a given script is working. It simulates these calls to update-rc.d: +# update-rc.d oldscript default +# update-rc.d -f oldscript remove +# update-rc.d oldscript start 20 2 3 4 5 . stop 20 1 . + +initdir_purge + +insertscript onlystop <<'EOF' || true +### BEGIN INIT INFO +# Provides: onlystop +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +list_rclinks + +check_script_present 0 onlystop +check_script_present 6 onlystop + +check_script_not_present 1 onlystop +check_script_not_present 2 onlystop +check_script_not_present 3 onlystop +check_script_not_present 4 onlystop +check_script_not_present 5 onlystop +check_script_not_present S onlystop +} +########################################################################## +test_removal() { +echo +echo "info: test if script removal removes all symlinks." +echo +# This test check that the common way to update the runlevels used by +# a given script is working. It simulates these calls to update-rc.d: +# update-rc.d oldscript default +# update-rc.d -f oldscript remove +# update-rc.d oldscript start 20 2 3 4 5 . stop 20 1 . + +initdir_purge + +insertscript oldscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: oldscript +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +# Check that the problematic symlinks are presend, as well as one that +# is OK. +check_script_present 0 oldscript +check_script_present 1 oldscript +check_script_present 3 oldscript +check_script_present 6 oldscript + +set +C +addscript oldscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: oldscript +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: 2 4 5 +# Default-Stop: 1 +### END INIT INFO +EOF +set -C + +# Remove old symlinks +insserv_del oldscript +# Insert new ones, this time without runlevel 0 and 6 +insserv_reg oldscript + +list_rclinks + +check_script_not_present 0 oldscript +check_script_present 1 oldscript +check_script_present 2 oldscript +check_script_not_present 3 oldscript +check_script_not_present 6 oldscript +} + +########################################################################## +test_segfault_virtfac() { +echo +echo "info: detect segfault caused by script providing virtual facility." +echo + +initdir_purge + +insertscript badheaderscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: $syslog +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +# Problem is only triggered if there are start or stop symlinks for +# the script present. +mkdir -p $initddir/../rc2.d +ln -s ../init.d/badheaderscript $initddir/../rc2.d/S02badheaderscript + +# This one segfaults +insertscript okscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: okscript +# Required-Start: $syslog +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +list_rclinks + +check_script_present 2 okscript +} +########################################################################## +test_incorrect_startscripts() { +echo +echo "info: Check if insserv add start symlinks for scripts that" +echo "info: currently do not have them. #492526" +echo + +initdir_purge + +insertscript disablestartscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: disablestartscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF +list_rclinks + +check_script_present 2 disablestartscript +check_script_present 5 disablestartscript +check_script_not_present S disablestartscript +check_script_present 1 disablestartscript + +rm $initddir/../rc{2,3,4,5}.d/S??disablestartscript + +# Update symlinks, see if it add start symlinks +insserv_reg . + +list_rclinks + +check_script_not_present 2 disablestartscript +check_script_not_present 3 disablestartscript +check_script_not_present 4 disablestartscript +check_script_not_present 5 disablestartscript +check_script_not_present S disablestartscript +check_script_present 0 disablestartscript +check_script_present 1 disablestartscript +} +########################################################################## +test_incorrect_stopscripts() { +echo +echo "info: Check if insserv add stop symlinks for scripts that" +echo "info: currently do not have them." +echo + +initdir_purge + +insertscript disablestopscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: disablestopscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF +list_rclinks + +check_script_present 2 disablestopscript +check_script_present 5 disablestopscript +check_script_not_present S disablestopscript +check_script_present 1 disablestopscript + +rm $initddir/../rc{0,1}.d/K??disablestopscript + +# Update symlinks, see if it add stop symlinks +insserv_reg . + +list_rclinks + +check_script_present 2 disablestopscript +check_script_present 5 disablestopscript +check_script_not_present S disablestopscript +check_script_not_present 0 disablestopscript +check_script_not_present 1 disablestopscript +} +########################################################################## +test_newbug_keepoldorder() { +echo +echo "info: Verify that introducing a loop in a working system do" +echo "info: not change the order of the scripts currently on disk." +echo + +initdir_purge + +insertscript mountall <<'EOF' || true +### BEGIN INIT INFO +# Provides: mountall +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript needlocal <<'EOF' || true +### BEGIN INIT INFO +# Provides: needlocal +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript needremote <<'EOF' || true +### BEGIN INIT INFO +# Provides: needremote +# Required-Start: $remote_fs needlocal +# Required-Stop: $remote_fs needlocal +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +insertscript needboth <<'EOF' || true +### BEGIN INIT INFO +# Provides: needboth +# Required-Start: needlocal needremote +# Required-Stop: needlocal needremote +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF + +list_rclinks + +check_order S mountall needlocal +check_order S mountall needremote +check_order S mountall needboth +check_order S needlocal needremote +check_order S needlocal needboth +check_order S needremote needboth + +# Then introduce buggy dependencies in an existing script +set +C +addscript needboth <<'EOF' || true +### BEGIN INIT INFO +# Provides: needboth +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# X-Start-Before: $local_fs +# Default-Start: S +# Default-Stop: 6 +### END INIT INFO +EOF +set -C + +echo "info: calling insserv after introducing a bug in script needboth" +insserv_reg needboth || true + +list_rclinks + +# The severity of this test should be fatal, below is explanation about how +# new (1.11.10) and old (1.11.0) insserv version behaviour changed in this +# test. +# +# Hmm ... with this I've found out that the old insserv will +# run on a loop and therefore exit. This loop was caused +# by the system facility $local_fs make the old insserv +# to do an exit ... now the problem is that the new insserv +# expands all system facility to their real requirements. +# This leads to the new behaviour as there is no node during +# the sorting algorithm which would cause such a loop. +# +# In other words: that the old insserv hasn't changed the +# order was simply a side effect of having a ghost node +# whereas the new insserv does not use such nodes anymore. +# +# If you would remove the `X-Start-Before: $local_fs' the +# old insserv will also change the boot order. + +${severity}_order S mountall needlocal +${severity}_order S mountall needremote +${severity}_order S mountall needboth +${severity}_order S needlocal needremote +${severity}_order S needlocal needboth +${severity}_order S needremote needboth +} +########################################################################## +test_start_before() { +echo +echo "info: Verify that X-start-before work as it should." +echo + +initdir_purge + +insertscript startlast <<'EOF' || true +### BEGIN INIT INFO +# Provides: startlast +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insertscript startfirst <<'EOF' || true +### BEGIN INIT INFO +# Provides: startfirst +# Required-Start: +# Required-Stop: +# X-Start-Before: startlast +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +check_order S startfirst startlast +} +########################################################################## +test_stop_after() { +echo +echo "info: Verify that X-stop-after work as it should." +echo + +initdir_purge + +insertscript stopfirst <<'EOF' || true +### BEGIN INIT INFO +# Provides: stopfirst +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insertscript stopafter <<'EOF' || true +### BEGIN INIT INFO +# Provides: stopafter +# Required-Start: +# Required-Stop: +# X-Stop-After: stopfirst +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +list_rclinks + +check_order 0 stopfirst stopafter +} +########################################################################## +test_adding_start() { +echo +echo "info: Make sure that adding start levels do not change an existing installation." +echo + +initdir_purge + +insertscript addstartscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: addstartscript +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 1 +### END INIT INFO +EOF + +check_script_present 1 addstartscript + +check_script_not_present S addstartscript +check_script_not_present 0 addstartscript +check_script_not_present 2 addstartscript +check_script_not_present 3 addstartscript +check_script_not_present 4 addstartscript +check_script_not_present 5 addstartscript +check_script_not_present 6 addstartscript + +# Then change runlevel in existing script +set +C +addscript addstartscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: addstartscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +### END INIT INFO +EOF +set -C + +# Update script after changing the header +insserv_reg addstartscript || true + +list_rclinks + +check_script_present 1 addstartscript + +check_script_not_present S addstartscript +check_script_not_present 0 addstartscript +check_script_not_present 2 addstartscript +check_script_not_present 3 addstartscript +check_script_not_present 4 addstartscript +check_script_not_present 5 addstartscript +check_script_not_present 6 addstartscript +} +########################################################################## +test_removing_start() { +echo +echo "info: Make sure that removing start levels do not change an existing installation." +echo + +initdir_purge + +insertscript remstartscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: remstartscript +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +check_script_present 0 remstartscript +check_script_present 1 remstartscript +check_script_present 2 remstartscript +check_script_present 3 remstartscript +check_script_present 4 remstartscript +check_script_present 5 remstartscript +check_script_present 6 remstartscript + +# Then change runlevel in existing script +set +C +addscript remstartscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: remstartscript +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 1 6 +### END INIT INFO +EOF +set -C + +# Update script after changing the header +insserv_reg remstartscript || true + +list_rclinks + +check_script_present 2 remstartscript +check_script_present 3 remstartscript +check_script_present 4 remstartscript +check_script_present 5 remstartscript +} +########################################################################## +test_adding_stop() { +echo +echo "info: Make sure that adding stop levels do not change an existing installation." +echo + +initdir_purge + +insertscript addstopscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: addstopscript +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +check_script_present S addstopscript +check_script_not_present 0 addstopscript +check_script_not_present 1 addstopscript +check_script_not_present 2 addstopscript +check_script_not_present 3 addstopscript +check_script_not_present 4 addstopscript +check_script_not_present 5 addstopscript +check_script_not_present 6 addstopscript + +# Then change runlevel in existing script +set +C +addscript addstopscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: addstopscript +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: 0 +### END INIT INFO +EOF +set -C + +# Update script after changing the header +insserv_reg addstopscript || true + +list_rclinks + +check_script_present S addstopscript +check_script_not_present 0 addstopscript +check_script_not_present 1 addstopscript +check_script_not_present 2 addstopscript +check_script_not_present 3 addstopscript +check_script_not_present 4 addstopscript +check_script_not_present 5 addstopscript +check_script_not_present 6 addstopscript +} +########################################################################## +test_removing_stop() { +echo +echo "info: Make sure that removing stop levels do not change an existing installation." +echo + +initdir_purge + +insertscript remstopscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: remstopscript +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO +EOF + +check_script_present S remstopscript +check_script_present 0 remstopscript +check_script_present 6 remstopscript + +check_script_not_present 1 remstopscript +check_script_not_present 2 remstopscript +check_script_not_present 3 remstopscript +check_script_not_present 4 remstopscript +check_script_not_present 5 remstopscript + +# Then change runlevel in existing script +set +C +addscript remstopscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: remstopscript +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF +set -C + +# Update script after changing the header +insserv_reg remstopscript || true + +list_rclinks + +check_script_present 0 remstopscript +check_script_present 6 remstopscript +} +########################################################################## +test_duplicate_provides() { +echo +echo "info: test two initscripts providing same facility." +echo "info: Not sure if this should fail or not." +echo + +initdir_purge + +addscript one <<'EOF' || true +### BEGIN INIT INFO +# Provides: samefac +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +addscript two <<'EOF' || true +### BEGIN INIT INFO +# Provides: samefac +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insserv_reg one || true +insserv_reg two || true + +list_rclinks + +check_script_present S one +${severity}_script_not_present S two +} +########################################################################## +test_bogus_facility() { +echo +echo "info: test insertion of script requiring a virtual facility that doesn't exist" +echo + +initdir_purge + +addscript needbogusvirtual <<'EOF' +### BEGIN INIT INFO +# Provides: needbogusvirtual +# Required-Start: $bogusvirtualfacility +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insserv_reg needbogusvirtual || true + +list_rclinks + +test_script_not_present S needbogusvirtual +} +########################################################################## +test_insserv_conf_d() { +echo +echo "info: test that /etc/insserv.conf.d/ is used" +echo + +initdir_purge +rm -rf ${insconf}.d +mkdir -p ${insconf}.d + +# add a base service, to ensure check_order() is accurate +insertscript dummy <<'EOF' +### BEGIN INIT INFO +# Provides: dummy +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +cat <<'EOF' > ${insconf}.d/facone +$commvirtfac +facone +EOF + +insertscript facone <<'EOF' || true +### BEGIN INIT INFO +# Provides: facone +# Required-Start: dummy +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +cat <<'EOF' > ${insconf}.d/factwo +$commvirtfac +factwo +EOF + +insertscript factwo <<'EOF' || true +### BEGIN INIT INFO +# Provides: factwo +# Required-Start: dummy +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +addscript service <<'EOF' || true +### BEGIN INIT INFO +# Provides: service +# Required-Start: $commvirtfac +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insserv_reg service || true + +list_rclinks + +check_script_present S service +check_order S facone service +check_order S factwo service + +rm -rf ${insconf}.d +} +########################################################################## +test_broken_header() { +echo +echo "info: test insertion of script missing Required-{Start,Stop} fields" +echo + +initdir_purge + +addscript badheader <<'EOF' +### BEGIN INIT INFO +# Provides: badheader +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insserv_reg badheader || true + +list_rclinks + +test_script_present 0 badheader +test_script_present 1 badheader +test_script_present 2 badheader +test_script_present 3 badheader +test_script_present 4 badheader +test_script_present 5 badheader +test_script_present 6 badheader +} +########################################################################## +test_noprovides_header() { +echo +echo "info: test insertion of script missing Provides fields" +echo + +initdir_purge + +addscript badheader <<'EOF' +### BEGIN INIT INFO +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO +EOF + +insserv_reg badheader || true + +list_rclinks + +test_script_present 0 badheader +test_script_present 1 badheader +test_script_present 2 badheader +test_script_present 3 badheader +test_script_present 4 badheader +test_script_present 5 badheader +test_script_present 6 badheader +} +########################################################################## +test_no_default_start() { +echo +echo "info: test insertion of script missing Default-Start field" +echo + +initdir_purge + +addscript nodefstart <<'EOF' +### BEGIN INIT INFO +# Provides: nodefstart +# Required-Start: +# Required-Stop: +# Default-Stop: 0 6 +### END INIT INFO +EOF + +insserv_reg nodefstart || true + +list_rclinks + +check_script_present 0 nodefstart +check_script_present 6 nodefstart + +check_script_not_present 2 nodefstart +check_script_not_present 3 nodefstart +check_script_not_present 4 nodefstart +check_script_not_present 5 nodefstart +} +########################################################################## +test_no_default_stop() { +echo +echo "info: test insertion of script missing Default-Stop field" +echo + +initdir_purge + +addscript nodefstop <<'EOF' +### BEGIN INIT INFO +# Provides: nodefstop +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +### END INIT INFO +EOF + +insserv_reg nodefstop || true + +list_rclinks + +check_script_present 2 nodefstop +check_script_present 3 nodefstop +check_script_present 4 nodefstop +check_script_present 5 nodefstop + +check_script_not_present 0 nodefstop +check_script_not_present 1 nodefstop +check_script_not_present 6 nodefstop +} +########################################################################## +test_initd_symlink() { +echo +echo "info: test that a symlink in /etc/init.d/ to another script does not cause problems" +echo + +initdir_purge + +addscript symlinked <<'EOF' +### BEGIN INIT INFO +# Provides: symlinked +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +### END INIT INFO +EOF + +addscript outsider <<'EOF' +### BEGIN INIT INFO +# Provides: outsider +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +### END INIT INFO +EOF + +#addscript halt <<'EOF' +### BEGIN INIT INFO +# Provides: halt +# Required-Start: +# Required-Stop: +# Default-Start: +# Default-Stop: 0 6 +### END INIT INFO +#EOF + +# Now make an illegal symlink to see if it causes problems, #485045 +ln -s symlinked ${initddir}/symlink + +insserv_reg symlinked || true +insserv_reg symlink || true + +check_script_present 1 symlinked +check_script_present 2 symlinked +check_script_present 3 symlinked +check_script_present 4 symlinked +check_script_present 5 symlinked +check_script_not_present 1 symlink +check_script_not_present 2 symlink +check_script_not_present 3 symlink +check_script_not_present 4 symlink +check_script_not_present 5 symlink + +# Add a /etc/init.d/reboot -> halt symlink, to make sure the SUSE case +# is not broken with stricter symlink sanity checking +#ln -s halt ${initddir}/reboot + +#insserv_reg reboot || true + +#check_script_present 0 reboot +#check_script_present 6 reboot + +# Move outsider to a location other than /etc/init.d/ and create a symlink +# to it. insserv should register it without problems. +mv ${initddir}/outsider ${initddir}/../ +ln -s ../outsider ${initddir}/outsidelink + +insserv_reg outsidelink || true + +list_rclinks + +check_script_present 1 outsidelink +check_script_present 2 outsidelink +check_script_present 3 outsidelink +check_script_present 4 outsidelink +check_script_present 5 outsidelink + +rm -f ${initddir}/../outsider +} +########################################################################## +test_deterministic_order() { +echo +echo "info: test two or more initscripts providing same facility, making sure" +echo "info: that the first script can be registered with insserv, but others fail." +echo + +initdir_purge + +addscript abc <<'EOF' || true +### BEGIN INIT INFO +# Provides: service +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +addscript xyz <<'EOF' || true +### BEGIN INIT INFO +# Provides: service +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +addscript hjk <<'EOF' || true +### BEGIN INIT INFO +# Provides: service +# Required-Start: +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +EOF + +insserv_reg xyz || true +insserv_reg hjk || true +insserv_reg abc || true + +list_rclinks + +# #494514 +check_script_present S xyz +check_script_not_present S abc +check_script_not_present S hjk +} +########################################################################## +test_all_keyword() { +echo +echo "info: test behaviour of a script depending on another with the \$all keyword" +echo "info: #491391" +echo + +initdir_purge + +# Insert a few scripts to flesh out $initdir +for script in one two three +do +insertscript $script < $insconf +$local_fs +mountall +nonexisting +$remote_fs $local_fs +EOF +set -C + +insertscript mountall <<'EOF' +### BEGIN INIT INFO +# Provides: mountall +# Required-Start: +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +insertscript dbus <<'EOF' +### BEGIN INIT INFO +# Provides: dbus +# Required-Start: +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +insertscript hal <<'EOF' +### BEGIN INIT INFO +# Provides: hal +# Required-Start: $remote_fs dbus +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +if ! grep -q "^hal: mountall dbus" ${initddir}/.depend.start ; then + msg="hal should depend on dbus and mountall in .depend.start:" + if [ test = "$severity" ] ; then + warning "$msg" + else + error "$msg" + fi + grep "^hal: " ${initddir}/.depend.start | sed 's/^/ /' +fi + +update_conf +} + +######################### + +test_insserv_virt_loop() { +echo +echo "info: test insserv handle virtual facilities depending on itself." +echo + +initdir_purge + +list_rclinks + +# If $local_fs depend on itself, the error is triggered. +set +C +cat <<'EOF' > $insconf +$local_fs +mountall $local_fs +EOF +set -C + +# This used to hang and use unlimited amount of memory. Now return +# error instead. +insertscript testscript <<'EOF' || true +### BEGIN INIT INFO +# Provides: testscript +# Required-Start: $local_fs +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +update_conf +} + +########################################################################## +test_local_virtual() { +echo +echo "info: Test if home made virtual facilities work as they should." +echo + +initdir_purge + +mkdir $insconf.d + +insertscript test1 <<'EOF' || true +### BEGIN INIT INFO +# Provides: test1 +# Required-Start: $mail-transport-agent +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +insertscript test2 <<'EOF' || true +### BEGIN INIT INFO +# Provides: test2 +# Required-Start: $mail-transport-agent +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +set +C +cat <<'EOF' > $insconf.d/test3 +$mail-transport-agent test3 +EOF +insertscript test3 <<'EOF' || true +### BEGIN INIT INFO +# Provides: test3 +# Required-Start: +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +cat <<'EOF' > $insconf.d/test4 +$mail-transport-agent +test4 +EOF +set -C +insertscript test4 <<'EOF' || true +### BEGIN INIT INFO +# Provides: test4 +# Required-Start: test3 +# Required-Stop: +# Default-Start: 1 +# Default-Stop: +### END INIT INFO +EOF + +list_rclinks + +check_order 1 test3 test1 +check_order 1 test3 test2 +check_order 1 test4 test1 +check_order 1 test4 test2 + +} +########################################################################## +test_insserv_upstart() { +echo +echo "info: test if insserv handle upstart jobs properly." +echo + +initdir_purge + +list_rclinks + +# This used to hang and use unlimited amount of memory. Now return +# error instead. +upstartdir=${tmpdir}/etc/init + +upstartjob="${tmpdir}/lib/init/upstart-job" + +# Add upstart config +oldconf="$insconf" +insconf="$insconf -u $upstartjob" + +# Dummy entry +mkdir -p $(dirname $upstartjob) +cat > $upstartjob < $upstartdir/$name + ln -s $upstartjob $initddir/$name + insserv_reg $name +} + +# XXX Someone that understand upstart need to fill in sensible stuff +# here +insert_upstart_job upstart-test < $insconf +$local_fs mountall +EOF +set -C + +insertscript hibernate <> /etc/default/rcS + + # Ready to reboot + shutdown -r now + +The next boot should then start services in parallel, as early as +possible during the boot process based on the dependency information +provided. + +The 'makefile' style concurrency depend on complete and correct +dependencies in all init.d scripts. There is a simpler and less +strict style 'startpar', which only require all scripts with the same +sequence number to be able to run in parallel, and thus accept +incomplete dependencies as long as the boot sequence number is OK. + +To monitor the boot sequence, the bootchart project is a good choice. +Debian packages are available in etch and sid. The project itself is +available from . + +Background info on alternative boot systems in Debian is available +from +. + +Information on the LSB initscript comment convention is available from +, + and +. + +Information on an alternative approach to parallelism during boot is +available from +. + +A tool to detect cycles is available from Adam Jensen using the git +repository . --- insserv-1.14.0.orig/debian/source/format +++ insserv-1.14.0/debian/source/format @@ -0,0 +1 @@ +1.0 --- insserv-1.14.0.orig/debian/po/ja.po +++ insserv-1.14.0/debian/po/ja.po @@ -0,0 +1,53 @@ +# Copyright (C) 2008 Petter Reinholdtsen +# This file is distributed under the same license as insserv package. +# Hideki Yamane (Debian-JP) , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.12.0-4\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-12-28 22:26+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "依存関係ベースでの起動シーケンスを有効に (あるいは有効にしたままに) しますか?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"依存関係ベースでの起動シーケンスを有効にした場合、LSB コメントヘッダ (あるいは" +"現在まだ無いデフォルト設定) から提供される依存関係情報を使って、/etc/rc*.d/ 内" +"のスクリプトの順番を再構成します。rc0.d/ と rc6.d/ にある全ての S* シンボリック" +"リンクは、(引数 'stop' で) 使われているのが名前と一致しているのを確かめるため、" +"K* シンボリックリンクへ変更されます。変更は変換しても安全なのが確認された後のみ" +"実行されます。有効にした場合に無効にすると変更を元に戻そうと試みます。" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"この機能は実験的なものであることに注意ください。依存関係ベースでの起動シーケンス" +"から元に戻すのは、安全が確保されていない上にシステムの再インストールが必要になる" +"かもしれません。" + --- insserv-1.14.0.orig/debian/po/de.po +++ insserv-1.14.0/debian/po/de.po @@ -0,0 +1,62 @@ +# translation of insserv_1.11.0-8_de.po to German +# Copyright (C) 2008, Erik Schanze +# This file is distributed under the same license as the insserv package. +# +# Erik Schanze , 2008. +msgid "" +msgstr "" +"Project-Id-Version: insserv_1.11.0-8_de\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-05-04 00:19+0200\n" +"Last-Translator: Erik Schanze \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Abhängigkeitsgestützte Reihenfolge beim Hochfahren aktivieren (oder " +"aktiviert lassen)?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Wenn Sie hier zustimmen, werden alle Skripte im Verzeichnis /etc/rc*.d/ " +"anhand der in jedem Skript enthaltenen Informationen über die Abhängigkeiten " +"neu sortiert. Wenn diese Information fehlt, wird die Standardinformation " +"über Abhängigkeiten benutzt. Es werden auch alle symbolischen Links »S*« in " +"den Verzeichnissen rc0.d/ und rc6.d/ in symbolische Links »K*« umgewandelt, " +"um sicher zu stellen, dass ihre Aufrufe (mit dem Argument »stop«) zu ihren " +"Namen passen. Die Änderung wird nur vorgenommen, nachdem überprüft wurde, " +"dass die Umwandlung sicher ist. Wenn Sie hier ablehnen, nachdem Sie schon " +"einmal zugestimmt haben, wird versucht, die Änderungen zurückzunehmen." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Bitte beachten Sie, dass es sich um eine experimentelle " +"Funktionalität handelt. Es gibt keine Garantie, dass man von einer " +"abhängigkeitsgestützten zu einer nicht abhängigkeitsgestützten " +"Reihenfolge des Hochfahrens sicher zurückzukehren kann. Eine " +"Neuinstallation des Systems könnte erforderlich werden." + --- insserv-1.14.0.orig/debian/po/ru.po +++ insserv-1.14.0/debian/po/ru.po @@ -0,0 +1,61 @@ +# translation of ru.po to Russian +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Yuri Kozlov , 2008. +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.10.0-4\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-18 21:53+0300\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Включить (или оставить включённым) порядок загрузки, основанный на " +"зависимостях?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Если вы выберете включение порядка загрузки, основанного на зависимостях, то " +"сценарии в /etc/rc*.d/ будут переупорядочены согласно информации о " +"зависимостях, предоставляемых в LSB закомментированных заголовках (или " +"согласно значениям по умолчанию, если их нет). Все символические ссылки S* в " +"rc0.d/ и rc6.d/ будут обращены в символические ссылки K*, чтобы " +"удостовериться, что то, для чего они используются (с параметром 'stop'), " +"совпадает с их именами. Изменения выполнятся только после того, как будет " +"проверено, что преобразование безопасно. При выключение порядка будет " +"произведена попытка откатить сделанные изменения." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Обратите внимание, что это пока эксперимент. Возвращение назад с порядка " +"загрузки, основанного на зависимостях не гарантируется и может потребоваться " +"переустановка системы." --- insserv-1.14.0.orig/debian/po/vi.po +++ insserv-1.14.0/debian/po/vi.po @@ -0,0 +1,55 @@ +# Vietnamese translation for INS Serv. +# Copyright © 2008 Free Software Foundation, Inc. +# Clytie Siddall , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.10.0-4\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-12 23:06+1030\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.7b3\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "Bật (hoặc cứ bật) dãy khởi động dựa vào quan hệ phụ thuộc không?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Bật tùy chọn này thì các văn lệnh trong thư mục « /etc/rc*.d/ » sẽ được sắp " +"xếp lại tùy theo thông tin về quan hệ phụ thuộc mà được cung cấp bởi phần " +"đầu chú thích LSB (không có thì dùng các giá trị mặc định). Mọi liên kết mềm " +"« S* » đều trong hai thư mục « rc0.d/ » và « rc6.d/ » sẽ được chuyển đổi " +"sang liên kết mềm « K* », để đảm bảo cách dùng chúng tương ứng với tên nó. " +"Thay đổi này sẽ chỉ xảy ra một khi thẩm tra tiến trình chuyển đổi sẽ chạy an " +"toàn. Sau khi bật tùy chọn này, tắt nó sẽ hoàn nguyên thay đổi." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Ghi chú rằng tính năng này vẫn còn thực nghiệm. Không thể đảm bảo tính an " +"toàn khi thử hoàn nguyên khỏi chức năng tạo dãy dựa vào quan hệ phụ thuộc: " +"nó có thể cần thiết cài đặt lại hệ thống." --- insserv-1.14.0.orig/debian/po/pt.po +++ insserv-1.14.0/debian/po/pt.po @@ -0,0 +1,57 @@ +# translation of insserv debconf to Portuguese +# Copyright (C) 2008 Américo Monteiro +# This file is distributed under the same license as the insserv package. +# +# Américo Monteiro , 2008. +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.10.0-4\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-12 00:09+0000\n" +"Last-Translator: Américo Monteiro \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Activar (ou manter activa) a sequência de arranque baseada em dependências?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Se você escolher activar a sequência de arranque baseada em dependências, os " +"scripts em /etc/rc*.d/ serão reordenados usando informação disponibilizada " +"pelos comentários de cabeçalho do LSB (ou pré-definições quando estes não " +"estiverem presentes). Todos os symlinks S* em rc0.d/ e rc6.0 serão " +"convertidos em symlinks K*, para garantir que a maneira que são usados (com " +"o argumento 'stop') coincide com os seus nomes. A alteração só será feita " +"após ter sido verificado que é seguro fazê-la. Desactivando-a quando activa " +"irá tentar reverter a alteração." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Por favor note que esta funcionalidade é experimental. A tentativa de " +"reverter de sequência de arranque baseada em dependências não é " +"garantidamente segura, e poderá necessitar da re-instalação do sistema." --- insserv-1.14.0.orig/debian/po/cs.po +++ insserv-1.14.0/debian/po/cs.po @@ -0,0 +1,55 @@ +# Czech translation of insserv debconf messages. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the insserv package. +# Miroslav Kure , 2008 +# +msgid "" +msgstr "" +"Project-Id-Version: insserv\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-23 12:52+0100\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "Povolit (nebo nechat povolené) zavádění založené na závislostech?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Povolíte-li zavádění založené na závislostech, budou skripty v /etc/rc*.d/ " +"přeskládány na základě informací zapsaných v LSB hlavičkách těchto skriptů. " +"(Pokud LSB informace chybí, použijí se výchozí hodnoty.) Všechny symbolické " +"odkazy S* v rc0.d/ a rc6.d/ budou přejmenovány na K*, aby byly jejich názvy " +"konzistentní se způsobem použití (volání s argumentem „stop“). Změna se " +"provede pouze poté, co se ověří, že je převod bezpečný. Pokud je zavádění " +"založené na závislostech povoleno, způsobí jeho vypnutí návrat do původního " +"stavu." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Mějte prosím na paměti, že se jedná o experimentální vlastnost. Není " +"zaručeno, že se pokus o návrat k původnímu systému zavádění podaří. V " +"krajním případě bude možná nutné přeinstalovat celý systém." --- insserv-1.14.0.orig/debian/po/es.po +++ insserv-1.14.0/debian/po/es.po @@ -0,0 +1,85 @@ +# insserv translation to spanish +# Copyright (C) 2007 Software in the Public Interest, SPI Inc. +# This file is distributed under the same license as the insserv package. +# +# Changes: +# - Initial translation +# Steve Lord Flaubert , 2008 +# +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentación de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/ +# especialmente las notas y normas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Si tiene dudas o consultas sobre esta traducción consulte con el último +# traductor (campo Last-Translator) y ponga en copia a la lista de +# traducción de Debian al español () +# +# +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.10.0-4\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-18 17:18-0500\n" +"Last-Translator: Steve Lord Flaubert \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"¿Activar (o mantener activada) la secuencia de arranque basada en " +"dependencias?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Si escoge activar una secuencia de arranque basada en dependencias, los " +"scripts en «/etc/rc*.d/» serán reordenados mediante información de " +"dependencia proporcionadas por los comentarios de cabecera de LSB (o valores " +"por omisión donde estos no estén presentes). Todos los enlaces simbólicos S* " +"en «rc0.d/ y rc6.d/» serán convertidos en enlaces simbólicos K*, para " +"asegurarse que la forma con que se usan (con el argumento «stop») coincidan " +"con sus nombres. El cambio sólo se hará después de que se compruebe que la " +"conversión es segura. Si está activo al desactivarlo se intentará revertir " +"el cambio. " + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Por favor tenga en cuenta que esta característica es experimental. No está " +"garantizado que se pueda revertir desde una secuencia de arranque basada en " +"dependencias y puede necesitar la reinstalación del sistema." --- insserv-1.14.0.orig/debian/po/fi.po +++ insserv-1.14.0/debian/po/fi.po @@ -0,0 +1,55 @@ +msgid "" +msgstr "" +"Project-Id-Version: insserv\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-15 00:51+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Aktivoidaanko (tai pidetäänkö aktivoituna) riippuvuuspohjainen " +"käynnistyssekvenssi?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Jos riippuvuuspohjainen käynnistyssekvenssi aktivoidaan, hakemistoissa /etc/" +"rc*.d/ olevien komentosarjojen käynnistysjärjestystä muutetaan LSB-" +"kommenttiotsakkeissa annettujen riippuvuustietojen mukaan (tai säilytetään " +"oletusjärjestyksessä, jos otsakkeita ei ole). Kaikki S*-tyypin symboliset " +"linkit hakemistoissa rc0.d ja rc6.d muutetaan K*-tyypin symbolisiksi " +"linkeiksi, sen varmistamiseksi, että niiden käyttötapa (argumentin ”stop” " +"kanssa) täsmää niiden nimiin. Muutos tehdään vasta, kun on varmistettu, että " +"se on turvallista tehdä. Jos riippuvuuspohjainen käynnistyssekvenssi " +"poistetaan käytöstä, muutokset yritetään perua." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Tämä ominaisuus on kokeellinen. Riippuvuuspohjaisen käynnistyssekvenssin " +"purkaminen ei välttämättä ole turvallista ja saattaa johtaa siihen, että " +"järjestelmä on asennettava uudelleen." --- insserv-1.14.0.orig/debian/po/sv.po +++ insserv-1.14.0/debian/po/sv.po @@ -0,0 +1,57 @@ +# translation of insserv.po to swedish +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Martin Bagge , 2008. +msgid "" +msgstr "" +"Project-Id-Version: insserv\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-10-26 23:53+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "Aktivera beroendebaserad uppstartssekvens?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Om du aktiverar beroendebaserad uppstartssekvens kommer att innebära " +"förändringar i ordningen för skripten i /etc/rc*.d/ - denna förändring " +"baseras på information från LSB-huvuden eller standardvärden om LSB-" +"information saknas. Alla S*-skript i rc0.d/ och rc6.d/ kommer att ändras " +"till K* så att namnen blir rätt när de används med argumentet 'stop'. " +"Förändringar kommer endast att genomföras efter att en kontroll har kommit " +"fram till att det är en säker förändring. Vid av avaktivering av " +"beroendebaserad uppstartssekvens kommer förändringarna att bli ogjorda i " +"möjligaste mån." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Observera att denna funktion ännu är helt experimentiell. Att återställa " +"från beroendebaserad uppstartssekvens är långt ifrån garanterat riskfri och " +"kan medföra att systemet måste installeras om." --- insserv-1.14.0.orig/debian/po/nl.po +++ insserv-1.14.0/debian/po/nl.po @@ -0,0 +1,59 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: insserv\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-18 19:18+0100\n" +"Last-Translator: Bart Cornelis \n" +"Language-Team: debian-l10n-dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Dutch\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Wilt u de op vereisten gebaseerde opstartvolgorde activeren (of geactiveerd " +"laten)?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Wanneer u kiest om de op vereisten gebaseerde opstartvolgorde te activeren " +"worden de scripts in /etc/rc*.d/ geordend op basis van de vereisten die " +"voorzien zijn in de LSB-commentaar-kopteksten (of standaardwaarden wanneer " +"deze afwezig zijn). Alle S*-koppelingen in rc0.d/ en rc6.d/ worden omgezet " +"in K*-symbolische koppelingen; dit zorgt ervoor dat de manier waarop ze " +"gebruikt worden (met het argument 'stop') gereflecteerd wordt in hun naam. " +"Deze aanpassing wordt pas uitgevoerd eens nagegaan is dat deze omzetting " +"veilig is. De-activatie probeert deze aanpassing ongedaan te maken (wanneer " +"deze keuze actief was)." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Opgelet: deze functionaliteit is experimenteel. De veiligheid van teruggaan " +"van de op vereisten gebaseerde opstartvolgorde naar de huidige situatie is " +"niet gegarandeerd en kan de herinstallatie van het systeem vereisen." --- insserv-1.14.0.orig/debian/po/it.po +++ insserv-1.14.0/debian/po/it.po @@ -0,0 +1,56 @@ +# Italian translation of the insserv debconf template +# This file is distributed under the same license as the insserv package +# Copyright (C) 2008 Free Software Foundation, Inc. +# Luca Monducci , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: insserv 1.10.0\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-25 14:23+0100\n" +"Last-Translator: Luca Monducci \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "Attivare (o tenere attiva) la sequenza d'avvio basata su dipendenze?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Se si sceglie di attivare la sequenza di avvio basata sulle dipendenze, gli " +"script in /etc/rc*.d/ verranno riordinati in base alle informazioni sulle " +"dipendenze presenti nei commenti delle intestazioni LSB (o in base ai valori " +"predefiniti in caso di mancanza di queste informazioni). Tutti i link " +"simbolici S* in rc0.d/ e rc6.d/ verranno trasformati in link simbolici K* in " +"modo che il loro utilizzo (con l'argomento \"stop\") sia coerente con il " +"loro nome. La modifica verrà effettuata solo dopo aver verificato che la " +"conversione sia sicura. Una volta attivata, la disattivazione cerca di " +"ricreare la configurazione preesistente." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Notare che questa funzionalità è sperimentale. Non si garantisce che il " +"ripristino della configurazione precedente funzioni correttamente e potrebbe " +"richiedere la reinstallazione del sistema." --- insserv-1.14.0.orig/debian/po/templates.pot +++ insserv-1.14.0/debian/po/templates.pot @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" --- insserv-1.14.0.orig/debian/po/gl.po +++ insserv-1.14.0/debian/po/gl.po @@ -0,0 +1,56 @@ +# Galician translation of insserv's debconf templates +# This file is distributed under the same license as the insserv package. +# Jacobo Tarrio , 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: insserv\n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-10 13:40+0000\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"¿Activar (ou manter activada) a secuencia de inicio baseada en dependencias?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Se quere activar a secuencia de inicio baseada en dependencias hanse " +"reordear os scripts de /etc/rc*.d/ empregando a información de depencencias " +"fornecida nas cabeceiras LSB dos comentarios (ou empregando valores por " +"defecto cando estas cabeceiras non estean presentes). Hanse convertir " +"tódalas ligazóns S* de rc0.d/ e rc6.d/ en ligazóns K*, para asegurarse de " +"que a maneira en que se empregan (co argumento \"stop\") coincida cos seus " +"nomes. Só se ha facer o cambio despois de verificar que é seguro realizar a " +"conversión. Ao desactivala cando estea activada hase tentar desfacer o " +"cambio." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Teña en conta que esta característica é experimental. Non se pode garantir " +"que reverter a secuencia de inicio baseada en dependencias sexa unha " +"operación segura, e pode facer necesario reinstalar o sistema." --- insserv-1.14.0.orig/debian/po/fr.po +++ insserv-1.14.0/debian/po/fr.po @@ -0,0 +1,61 @@ +# Translation of insserv debconf templates to French +# Copyright (C) 2008 Christian Perrier +# This file is distributed under the same license as the insserv package. +# +# Christian Perrier , 2008. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: pere@debian.org\n" +"POT-Creation-Date: 2008-02-17 13:56+0100\n" +"PO-Revision-Date: 2008-02-13 07:22+0100\n" +"Last-Translator: Christian Perrier \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "Enable (or keep enabled) the dependency-based boot sequence?" +msgstr "" +"Faut-il activer (ou laisser activée) la gestion des dépendances dans la " +"séquence de démarrage ?" + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"If you choose to enable the dependency-based boot sequence the scripts in /" +"etc/rc*.d/ will be reordered using dependency information provided by LSB " +"comment headers (or defaults where these are not present). All S* symlinks " +"in rc0.d/ and rc6.d/ will be turned into K* symlinks, to make sure the way " +"they are used (with the argument 'stop') matches their names. The change " +"will only be done after it is verified that it is safe to convert. Disabling " +"it when enabled will try to revert the change." +msgstr "" +"Si vous choisissez d'activer la gestion des dépendances pour la séquence de " +"démarrage, les scripts placés dans /etc/rc*.d/ seront remis dans un ordre " +"qui utilise les informations de dépendances fournies par les en-têtes LSB " +"(ou des valeurs par défaut si ceux-ci ne sont pas présents). Tous les liens " +"symboliques de démarrage (liens S*) de rc0.d/ et rc6.d/ seront transformés " +"en lien d'arrêt des services (liens K*) pour garantir que leur mode " +"d'utilisation (avec le paramètre « stop ») correspond à leurs noms. Cette " +"modification ne sera effectuée qu'après contrôle qu'elle peut se faire de " +"façon sûre. Si vous désactivez la gestion des dépendances alors qu'elle est " +"active, ces modifications seront abandonnées." + +#. Type: boolean +#. Description +#: ../insserv.templates:2001 +msgid "" +"Please note that this feature is experimental. Attempting to revert from " +"dependency-based boot sequencing is not guaranteed to be safe, and may " +"require the reinstallation of the system." +msgstr "" +"Veuillez noter que cette fonctionnalité est expérimentale. Le retour en " +"arrière depuis une séquence de démarrage avec gestion des dépendances n'est " +"pas entièrement garanti et un échec peut imposer la réinstallation de " +"l'ensemble du système." --- insserv-1.14.0.orig/debian/po/POTFILES.in +++ insserv-1.14.0/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] insserv.templates --- insserv-1.14.0.orig/debian/overrides/hotplug-net +++ insserv-1.14.0/debian/overrides/hotplug-net @@ -0,0 +1,7 @@ +### BEGIN INIT INFO +# Provides: hotplug-net +# Required-Start: $local_fs ifupdown +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO --- insserv-1.14.0.orig/debian/overrides/modutils +++ insserv-1.14.0/debian/overrides/modutils @@ -0,0 +1,8 @@ +### BEGIN INIT INFO +# Provides: modutils +# Required-Start: checkroot +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO +# Reported to BTS as #335311 --- insserv-1.14.0.orig/debian/overrides/hotplug +++ insserv-1.14.0/debian/overrides/hotplug @@ -0,0 +1,7 @@ +### BEGIN INIT INFO +# Provides: hotplug +# Required-Start: mountdevsubfs checkroot $local_fs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +### END INIT INFO --- insserv-1.14.0.orig/debian/overrides/devfsd +++ insserv-1.14.0/debian/overrides/devfsd @@ -0,0 +1,8 @@ +### BEGIN INIT INFO +# Provides: devfsd +# Required-Start: mountdevsubfs +# Required-Stop: reboot +# Default-Start: S 1 2 3 4 5 +# Default-Stop: 0 6 +### END INIT INFO +# Reported to BTS as bug #324671 --- insserv-1.14.0.orig/debian/overrides/initrd-tools.sh +++ insserv-1.14.0/debian/overrides/initrd-tools.sh @@ -0,0 +1,7 @@ +### BEGIN INIT INFO +# Provides: initrd-tools +# Required-Start: mountdevsubfs +# Required-Stop: +# Default-Start: S +# Default-Stop: +### END INIT INFO --- insserv-1.14.0.orig/debian/patches/92_m68k_alignment.patch +++ insserv-1.14.0/debian/patches/92_m68k_alignment.patch @@ -0,0 +1,18 @@ +Purpose: Get insserv building on m68k, dropping some problematic + alignments (error: requested alignment is not a power of 2) +Fixes: #493637 +Status: Not yet submitted upstream. +--- +--- a/insserv.c ++++ b/insserv.c +@@ -53,6 +53,10 @@ + #endif /* SUSE */ + #include "listing.h" + ++#ifdef __m68k__ /* Fix #493637 */ ++# define aligned(a) ++#endif ++ + #if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 + # ifndef POSIX_FADV_SEQUENTIAL + # define posix_fadvise(fd, off, len, adv) (-1) --- insserv-1.14.0.orig/debian/patches/100_show.patch +++ insserv-1.14.0/debian/patches/100_show.patch @@ -0,0 +1,140 @@ +Description: Dumps start/stop bit, sequence number, runlevels and script + basename for all scripts in the format: + SK:NUM:RUNLEVELS:SCRIPT +Bug-Debian: http://bugs.debian.org/573004 +From: Kel Modderman +--- +--- a/insserv.c ++++ b/insserv.c +@@ -2351,6 +2351,7 @@ static struct option long_options[] = + {"path", 1, (int*)0, 'p'}, + {"override",1, (int*)0, 'o'}, + {"upstart-job",1, (int*)0, 'u'}, ++ {"showall", 0, (int*)0, 's'}, + {"help", 0, (int*)0, 'h'}, + { 0, 0, (int*)0, 0 }, + }; +@@ -2368,6 +2369,7 @@ static void help(const char *restrict co + printf(" -o , --override Path to replace " OVERRIDEDIR ".\n"); + printf(" -c , --config Path to config file.\n"); + printf(" -n, --dryrun Do not change the system, only talk about it.\n"); ++ printf(" -s, --showall Output runlevel and sequence information.\n"); + printf(" -d, --default Use default runlevels a defined in the scripts\n"); + } + +@@ -2390,6 +2392,7 @@ int main (int argc, char *argv[]) + boolean defaults = false; + boolean ignore = false; + boolean loadarg = false; ++ boolean showall = false; + + myname = basename(*argv); + +@@ -2404,7 +2407,7 @@ int main (int argc, char *argv[]) + for (c = 0; c < argc; c++) + argr[c] = (char*)0; + +- while ((c = getopt_long(argc, argv, "c:dfrhvno:p:u:", long_options, (int *)0)) != -1) { ++ while ((c = getopt_long(argc, argv, "c:dfrhvno:p:u:s", long_options, (int *)0)) != -1) { + size_t l; + switch (c) { + case 'c': +@@ -2429,6 +2432,10 @@ int main (int argc, char *argv[]) + verbose ++; + dryrun = true; + break; ++ case 's': ++ showall = true; ++ dryrun = true; ++ break; + case 'p': + if (optarg == (char*)0 || *optarg == '\0') + goto err; +@@ -3368,6 +3375,9 @@ int main (int argc, char *argv[]) + if (maxstart > MAX_DEEP || maxstop > MAX_DEEP) + error("Maximum of %u in ordering reached\n", MAX_DEEP); + ++ if (showall) ++ show_all(); ++ + #if defined(DEBUG) && (DEBUG > 0) + printf("Maxorder %d/%d\n", maxstart, maxstop); + show_all(); +--- a/listing.c ++++ b/listing.c +@@ -889,7 +889,6 @@ boolean is_loop_detected(void) + /* + * For debuging: show all services + */ +-#if defined(DEBUG) && (DEBUG > 0) + void show_all() + { + list_t *tmp; +@@ -904,15 +903,23 @@ void show_all() + name = dir->name; + peg = &dir->stopp; + lvl = peg->run.lvl; ++ lvlstr = lvl2str(lvl); + deep = peg->deep; + if (attof(dir)->script) + script = attof(dir)->script; ++#if defined(DEBUG) && (DEBUG > 0) + else if (*name == '$') + script = "%system"; + else + script = "%guessed"; +- lvlstr = lvl2str(lvl); +- info("K%.2d %s 0x%.2x '%s' (%s)\n", deep, name, lvl, lvlstr, script); ++ info(1, "K%.2d %s 0x%.2x '%s' (%s)\n", deep, name, lvl, lvlstr, ++ script); ++#else ++ else ++ script = NULL; ++ if (script && lvlstr) ++ fprintf(stdout, "K:%.2d:%s:%s\n", deep, lvlstr, script); ++#endif + xreset(lvlstr); + } + if (maxstart > 0) list_for_each(tmp, d_start) { +@@ -926,19 +933,26 @@ void show_all() + name = dir->name; + peg = &dir->start; + lvl = peg->run.lvl; ++ lvlstr = lvl2str(lvl); + deep = peg->deep; + if (attof(dir)->script) + script = attof(dir)->script; ++#if defined(DEBUG) && (DEBUG > 0) + else if (*name == '$') + script = "%system"; + else + script = "%guessed"; +- lvlstr = lvl2str(lvl); +- info("S%.2d %s 0x%.2x '%s' (%s)\n", deep, name, lvl, lvlstr, script); ++ info(1, "S%.2d %s 0x%.2x '%s' (%s)\n", deep, name, lvl, lvlstr, ++ script); ++#else ++ else ++ script = NULL; ++ if (script && lvlstr) ++ fprintf(stdout, "S:%.2d:%s:%s\n", deep, lvlstr, script); ++#endif + xreset(lvlstr); + } + } +-#endif + + /* + * Used within loops to get scripts not included in this runlevel +--- a/insserv.8.in ++++ b/insserv.8.in +@@ -286,6 +286,9 @@ the script will be ignored. + Path to replace existing upstart job path. (default path is + .IR /lib/init/upstart-job ). + .TP ++.BR \-s ,\ \-\-showall ++Output runlevel and sequence information. Do not update symlinks. ++.TP + .BR \-h ,\ \-\-help + Print out short usage message. + .PP --- insserv-1.14.0.orig/debian/patches/20_manpage_spelling.patch +++ insserv-1.14.0/debian/patches/20_manpage_spelling.patch @@ -0,0 +1,23 @@ +Description: Fix spelling errors in insserv(8). +From: Kel Modderman +--- +--- a/insserv.8.in ++++ b/insserv.8.in +@@ -124,7 +124,7 @@ these tags is stopped. + The optional X\-Interactive keyword implies that the script using this + keyword should be started alone in a concurrent boot configuration + because it interact with the user at the console. Only the value +-`true' is recogniced. All other are ignored. ++`true' is recognised. All other are ignored. + .PP + The optional + .B X\-Start\-Before +@@ -244,7 +244,7 @@ in the configuration file + also knows the special facility + .BR $all . + This facility indicates that a service should be inserted +-at the end of all services at starting and at the very begining ++at the end of all services at starting and at the very beginning + at stopping. Clearly all services using this facility will be + grouped into one starting or stopping order. + .\" --- insserv-1.14.0.orig/debian/patches/200_hide_insserv_on_ubuntu.patch +++ insserv-1.14.0/debian/patches/200_hide_insserv_on_ubuntu.patch @@ -0,0 +1,27 @@ +Description: Move insserv binaries out of the default path + On Ubuntu, running insserv directly can devastate your boot and + shutdown sequence. This can cause many problems, including data loss + and incomplete migrations on upgrades (such as the /run migration) + . + Since 3rd-party software packages are known to run insserv directly + if it's available, this patch makes it unavailable by moving it to + /usr/lib, where it can't cause as much trouble. +Author: Adam Stokes +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/insserv/+bug/858122 +Acked-by: Evan Broder +Forwarded: not-needed +Last-Update: 2012-02-15 + +Index: insserv-1.14.0/Makefile +=================================================================== +--- insserv-1.14.0.orig/Makefile 2012-02-15 17:01:06.882286352 -0800 ++++ insserv-1.14.0/Makefile 2012-02-15 17:01:22.226286716 -0800 +@@ -53,7 +53,7 @@ + LINK = ln -sf + # + SDOCDIR = $(DESTDIR)/usr/share/man/man8 +- SBINDIR = $(DESTDIR)/sbin ++ SBINDIR = $(DESTDIR)/usr/lib/insserv + CONFDIR = $(DESTDIR)/etc + LSBDIR = $(DESTDIR)/lib/lsb + USRLSBDIR = $(DESTDIR)/usr/lib/lsb --- insserv-1.14.0.orig/debian/patches/110_portmap.patch +++ insserv-1.14.0/debian/patches/110_portmap.patch @@ -0,0 +1,17 @@ +Drop central definition of $portmap, it's better served by the individual packages providing $portmap. +Index: insserv-1.14.0/insserv.conf +=================================================================== +--- insserv-1.14.0.orig/insserv.conf 2011-03-19 12:42:01.000000000 +0100 ++++ insserv-1.14.0/insserv.conf 2011-03-19 12:42:11.000000000 +0100 +@@ -26,11 +26,6 @@ + $syslog +rsyslog +sysklogd +syslog-ng +dsyslog +inetutils-syslogd + + # +-# SunRPC portmapper available +-# +-$portmap portmap +- +-# + # The system time has been set correctly + # + $time +hwclock --- insserv-1.14.0.orig/debian/patches/21_tweak_warnings.patch +++ insserv-1.14.0/debian/patches/21_tweak_warnings.patch @@ -0,0 +1,30 @@ +Description: only emit warnings about overriding LSB default with symlink + state for the scripts in insserv arg list. +From: Kel Modderman +--- +--- a/insserv.c ++++ b/insserv.c +@@ -3100,8 +3100,9 @@ int main (int argc, char *argv[]) + * of the current script. + */ + if (!defaults && service->start->lvl != 0) { +- warn("warning: current start runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n", +- lvl2str(service->start->lvl), d->d_name); ++ if (!del && isarg && !(argr[curr_argc])) ++ warn("warning: current start runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n", ++ lvl2str(service->start->lvl), d->d_name); + script_inf.default_start = lvl2str(service->start->lvl); + } + } +@@ -3162,8 +3163,9 @@ int main (int argc, char *argv[]) + * of the current script. + */ + if (!defaults && service->stopp->lvl != 0) { +- warn("warning: current stop runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n", +- lvl2str(service->stopp->lvl), d->d_name); ++ if (!del && isarg && !(argr[curr_argc])) ++ warn("warning: current stop runlevel(s) (%s) of script `%s' overwrites defaults (empty).\n", ++ lvl2str(service->stopp->lvl), d->d_name); + script_inf.default_stop = lvl2str(service->stopp->lvl); + } + } --- insserv-1.14.0.orig/debian/patches/series +++ insserv-1.14.0/debian/patches/series @@ -0,0 +1,9 @@ +10_nosuse.patch +11_debian_conf.patch +20_manpage_spelling.patch +21_tweak_warnings.patch +30_interactive_regexp_match_fix.patch +92_m68k_alignment.patch +#100_show.patch +110_portmap.patch +200_hide_insserv_on_ubuntu.patch --- insserv-1.14.0.orig/debian/patches/11_debian_conf.patch +++ insserv-1.14.0/debian/patches/11_debian_conf.patch @@ -0,0 +1,55 @@ +Purpose: Adjust the insserv configuration for Debian init.d script names. +Fixes: None, made as part of Debian porting. +Status: Debian specific, showed to upstream. +--- +Index: insserv-1.14.0/insserv.conf +=================================================================== +--- insserv-1.14.0.orig/insserv.conf 2010-02-19 14:08:04.000000000 +0100 ++++ insserv-1.14.0/insserv.conf 2011-03-19 12:48:16.000000000 +0100 +@@ -1,29 +1,29 @@ + # + # All local filesystems are mounted (done during boot phase) + # +-$local_fs boot.localfs +boot.crypto ++$local_fs +mountall +mountoverflowtmp +umountfs + + # + # Low level networking (ethernet card) + # +-$network network ++$network +networking +ifupdown + + # + # Named is operational + # +-$named +named +dnsmasq +lwresd $network ++$named +named +dnsmasq +lwresd +bind9 +unbound $network + + # + # All remote filesystems are mounted (note in some cases /usr may + # be remote. Most applications that care will probably require + # both $local_fs and $remote_fs) + # +-$remote_fs $local_fs +nfs +smbfs ++$remote_fs $local_fs +mountnfs +mountnfs-bootclean +umountnfs +sendsigs + + # + # System logger is operational + # +-$syslog syslog ++$syslog +rsyslog +sysklogd +syslog-ng +dsyslog +inetutils-syslogd + + # + # SunRPC portmapper available +@@ -33,9 +33,9 @@ + # + # The system time has been set correctly + # +-$time boot.clock +xntpd ++$time +hwclock + + # + # Services which need to be interactive + # +- apache apache2 boot.clock boot.crypto boot.crypto-early boot.localfs boot.rootfsck kbd kdump ntp ++ glibc udev console-screen keymap keyboard-setup console-setup cryptdisks cryptdisks-early checkfs-loop --- insserv-1.14.0.orig/debian/patches/30_interactive_regexp_match_fix.patch +++ insserv-1.14.0/debian/patches/30_interactive_regexp_match_fix.patch @@ -0,0 +1,21 @@ +Description: Fix regular expression match for X-Interactive keyword, it was + off-by-one match group and thus always returned 'X-'. +From: Kel Modderman +--- +--- a/insserv.c ++++ b/insserv.c +@@ -1378,10 +1378,10 @@ static uchar scan_lsb_headers(const int + description = empty; + } + +- if (!interactive && regexecutor(®.interact, COMMON_ARGS) == true) { +- if (val->rm_so < val->rm_eo) { +- *(pbuf+val->rm_eo) = '\0'; +- interactive = xstrdup(pbuf+val->rm_so); ++ if (!interactive && regexecutor(®.interact, COMMON_SHD_ARGS) == true) { ++ if (shl->rm_so < shl->rm_eo) { ++ *(pbuf+shl->rm_eo) = '\0'; ++ interactive = xstrdup(pbuf+shl->rm_so); + } else + interactive = empty; + } --- insserv-1.14.0.orig/debian/patches/10_nosuse.patch +++ insserv-1.14.0/debian/patches/10_nosuse.patch @@ -0,0 +1,15 @@ +Purpose: Disable the SUSE flag. +Fixes: None, made as part of Debian porting. +Status: Debian specific, showed to upstream. +--- +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ INSCONF = /etc/insserv.conf + #DESTDIR = /tmp/root + #DEBUG = -DDEBUG=1 -Wpacked + DEBUG = +-ISSUSE = -DSUSE ++ISSUSE = -DNOTSUSE + DESTDIR = + VERSION = 1.14.0 + DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')