[Initscripts-ng-commits] r445 - in /trunk/src/insserv/debian: changelog patches/21_overrides.dpatch

pere at users.alioth.debian.org pere at users.alioth.debian.org
Sat Jan 5 08:35:48 UTC 2008


Author: pere
Date: Sat Jan  5 08:35:48 2008
New Revision: 445

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=445
Log:
  * Changed patch 21_overrides to speed up processing by only reading
    override default files if the script is lacking an LSB header.

Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/patches/21_overrides.dpatch

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=445&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sat Jan  5 08:35:48 2008
@@ -4,7 +4,8 @@
 
   * 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 if the script is lacking an LSB header.
   * Moved default dependency values from patch 21_overrides to
     41_debiandefault where it belong.
 

Modified: trunk/src/insserv/debian/patches/21_overrides.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/21_overrides.dpatch?rev=445&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/21_overrides.dpatch (original)
+++ trunk/src/insserv/debian/patches/21_overrides.dpatch Sat Jan  5 08:35:48 2008
@@ -7,8 +7,8 @@
 
 @DPATCH@
 diff -urNad insserv~/insserv.c insserv/insserv.c
---- insserv~/insserv.c	2008-01-04 16:43:37.000000000 +0100
-+++ insserv/insserv.c	2008-01-04 16:45:30.000000000 +0100
+--- insserv~/insserv.c	2008-01-05 00:29:39.000000000 +0100
++++ insserv/insserv.c	2008-01-05 00:30:56.000000000 +0100
 @@ -23,6 +23,7 @@
  #include <fcntl.h>
  #include <sys/stat.h>
@@ -82,7 +82,7 @@
  
  	if (!provides       && regexecutor(&reg.prov,      COMMON_ARGS) == true) {
  	    if (val->rm_so < val->rm_eo) {
-@@ -1169,7 +1182,94 @@
+@@ -1169,7 +1180,96 @@
  #undef default_start
  #undef default_stop
  #undef description
@@ -133,7 +133,7 @@
 +
 +    free(script);
 +    script = xstrdup(basename(linkbuf));
- 
++
 +    return script;
 +}
 +
@@ -141,7 +141,7 @@
 +			      const char *const name)
 +{
 +    boolean ret = 0;
-+
+ 
 +    char fullpath[PATH_MAX+1];
 +    snprintf(fullpath, sizeof(fullpath), "%s/%s", dir, name);
 +    struct stat statbuf;
@@ -163,11 +163,13 @@
 +    /* Reset old results */
 +    scan_script_reset();
 +
-+    /* Load values if the override file exist */
-+    ret |= load_overrides("/usr/share/insserv/overrides", name);
-+
 +    /* Replace with headers from the script itself */
 +    ret |= scan_lsb_headers(path);
++
++    if (!ret)
++	/* Load values if the override file exist */
++	ret |= load_overrides("/usr/share/insserv/overrides", name);
++
 +
 +    /* Allow host-specific overrides to replace the content in the
 +       init.d scripts */




More information about the Initscripts-ng-commits mailing list