]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
fixed detection of invoke-rc.d's existence, closes: #218530
authorManoj Srivastava <srivasta@debian.org>
Thu, 16 Jun 2005 05:43:21 +0000 (05:43 +0000)
committerManoj Srivastava <srivasta@debian.org>
Thu, 16 Jun 2005 05:43:21 +0000 (05:43 +0000)
Author: joy
Date: 2003/11/02 13:11:30
fixed detection of invoke-rc.d's existence, closes: #218530

git-archimport-id: srivasta@debian.org--etch/debian-policy--devel--3.0--patch-258

policy.sgml

index cd600ad0f2f2158e23c25229a435560b49e8e924..b0decfb8f7dbafa4f0cd08c9349772d45afe8c69 100644 (file)
@@ -5583,11 +5583,11 @@ test -f <var>program-executed-later-in-script</var> || exit 0
              &lt;action&gt;</example> in their <prgn>postinst</prgn>
              and <prgn>prerm</prgn> scripts to:
              <example compact="compact">
-          if [ -x /usr/sbin/invoke-rc.d ] ; then
+       if command -v invoke-rc.d >/dev/null 2>&1; then
                invoke-rc.d <var>package</var> &lt;action&gt;
-          else
-             /etc/init.d/<var>package</var> &lt;action&gt;
-          fi
+       else
+               /etc/init.d/<var>package</var> &lt;action&gt;
+       fi
              </example>
            </p>