Tags: patch I've made a patch for lintian to check LSB compliance. The difference of the lintian/checks/init.d file are:
*** init.d_old 2006-01-04 15:20:24.000000000 +0000 --- init.d 2006-07-29 13:52:53.000000000 +0100 *************** *** 139,160 **** --- 139,229 ---- # check if file exists in package my $initd_file = "init.d/$_"; + + my $defaultstart; + if (-f $initd_file) { # yes! check it... open(IN,$initd_file) or fail("cannot open init.d file $initd_file: $!"); my %tag; while (defined(my $l = <IN>)) { + + #starts patch + if ($l =~ m/^\#\#\# BEGIN INIT INFO/){ + $tag{'lsb-begin'} = 1 + } + if ($l =~ m/^\#\#\# END INIT INFO/){ + $tag{'lsb-ending'} = 1; + } + if ($l =~ m/^\# provides:\s+\S*.*\S+\s*$/i){ + $tag{'lsb-provides'} = 1; + } + if ($l =~ m/^\# required-start:/i){ + $tag{'lsb-requiredstart'} = 1; + } + if ($l =~ m/^\# required-stop:/i){ + $tag{'lsb-requiredstop'} = 1; + } + if ($l =~ m/^\# should-start:\s+\S*.*\S+\s*$/i){ + $tag{'lsb-shouldstart'} = 1; + } + if ($l =~ m/^\# should-stop:\s+\S*.*\S+\s*$/i){ + $tag{'lsb-shouldstop'} = 1; + } + + if ($l =~ m/^\# default-start:/i){ + $tag{'lsb-defaultstart'} = 1; + $defaultstart=$1 if ($l =~ m/^\# default-start:\s+(\S*.*\S+)\s*$/i); + } + + if ($l =~ m/^\# default-stop:/i){ + $tag{'lsb-defaultstop'} = 1; + } + + if ($l =~ m/^\# short-description:\s+\S*.*\S+\s*$/i){ + $tag{'lsb-shortdescription'} = 1; + } + + if ($l =~ m/^\# description:\s+\S*.*\S+\s*$/i){ + $tag{'lsb-description'} = 1; + } + #end patch + while ($l =~ s/(start|stop|restart|force-reload)//o) { $tag{$1} = 1; } } close(IN); + if ($tag{'lsb-begin'}){ + if ((($defaultstart =~ /[06]/) && ($tag{'lsb-provides'} && $tag{'lsb-requiredstart'} && $tag{'lsb-ending'})) || ($tag{'lsb-provides'} && $tag{'lsb-requiredstart'} && $tag{'lsb-requiredstop'} && $tag{'lsb-defaultstart'} && $tag{'lsb-defaultstop'} && $tag{'lsb-ending'})) { + tag "init.d-script-has-complete-lsb-runtime-information","/etc/init.d/$_"; + } else { + tag "init.d-script-has-incomplete-lsb-runtime-information","/etc/init.d/$_"; + } + + + $tag{'lsb-begin'} or tag "init.d-script-does-not-implement-lsb-begin-header", "/etc/init.d/$_"; + $tag{'lsb-provides'} or tag "init.d-script-does-not-implement-lsb-provides-header", "/etc/init.d/$_"; + $tag{'lsb-requiredstart'} or tag "init.d-script-does-not-implement-lsb-requiredstart-header", "/etc/init.d/$_"; + $tag{'lsb-requiredstop'} or tag "init.d-script-does-not-implement-lsb-requiredstop-header", "/etc/init.d/$_"; + $tag{'lsb-shouldstart'} or tag "init.d-script-does-not-implement-lsb-shouldstart-header", "/etc/init.d/$_"; + $tag{'lsb-shouldstop'} or tag "init.d-script-does-not-implement-lsb-shouldstop-header", "/etc/init.d/$_"; + $tag{'lsb-defaultstart'} or tag "init.d-script-does-not-implement-lsb-defaultstart-header", "/etc/init.d/$_"; + $tag{'lsb-defaultstop'} or tag "init.d-script-does-not-implement-lsb-defaultstop-header", "/etc/init.d/$_"; + $tag{'lsb-shortdescription'} or tag "init.d-script-does-not-implement-lsb-shortdescription-header" , "/etc/init.d/$_"; + $tag{'lsb-description'} or tag "init.d-script-does-not-implement-lsb-description-header", "/etc/init.d/$_"; + $tag{'lsb-ending'} or tag "init.d-script-does-not-implement-lsb-ending-header", "/etc/init.d/$_"; + + } else { + tag "init.d-script-has-no-lsb-runtime-information","/etc/init.d/$_"; + } # all tags included in file? $tag{'start'} or tag "init.d-script-does-not-implement-required-option", "/etc/init.d/$_ start"; $tag{'stop'} or tag "init.d-script-does-not-implement-required-option", "/etc/init.d/$_ stop"; $tag{'restart'} or tag "init.d-script-does-not-implement-required-option", "/etc/init.d/$_ restart"; $tag{'force-reload'} or tag "init.d-script-does-not-implement-required-option", "/etc/init.d/$_ force-reload"; + } else { tag "init.d-script-not-included-in-package", "/etc/init.d/$_"; } And the differences for the init.d.desc are: *** init.d.desc_old 2004-07-04 23:44:13.000000000 +0100 --- init.d.desc 2006-07-29 13:52:04.000000000 +0100 *************** *** 74,76 **** --- 74,134 ---- not registered in the <tt>postinst</tt> script. This is usually a bug, unless you omit the links intentionally for some reason or create the links some other way. + + Tag: init.d-script-does-not-implement-lsb-begin-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt>### BEGIN INIT INFO</tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-ending-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt>### END INIT INFO</tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-provides-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Provides: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-requiredstart-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Required-Start: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-requiredstop-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Required-Stop: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-shouldstart-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Should-Start: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-shouldstop-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Should-Stop</tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-defaultstart-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Default-Start: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-defaultstop-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Default-Stop: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-shortdescription-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Short-Description: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-does-not-implement-lsb-description-header + Type: warning + Info: The <tt>/etc/init.d</tt> script has not a correct LSB header: <tt># Description: </tt>. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-has-complete-lsb-runtime-information + Type: info + Info: The <tt>/etc/init.d</tt> script has complete LSB runtime information. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. + + Tag: init.d-script-has-incomplete-lsb-runtime-information + Type: warning + Info: The <tt>/etc/init.d</tt> script has incomplete LSB runtime information. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. See the maintainers' guide for LSB compliance in <tt> http://wiki.debian.org/LSBInitScripts </tt> + + Tag: init.d-script-has-no-lsb-runtime-information + Type: error + Info: The <tt>/etc/init.d</tt> script has no LSB headers with runtime information. LSB headers provide run-time dependencies that are used to check the correct boot order and to allow parallel execution during boot. See the maintainers' guide for LSB compliance in <tt> http://wiki.debian.org/LSBInitScripts </tt> The complete files are available at http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/resources.html I'm using lintian version 1.23.22 cheers Carlos Villegas -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]