~ubuntu-branches/ubuntu/oneiric/insserv/oneiric-proposed

« back to all changes in this revision

Viewing changes to debian/patches/41_debiandefault.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2008-01-16 23:29:09 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080116232909-5v6j752kg141eouw
Tags: 1.10.0-5
* 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).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
runlevel 016.
6
6
 
7
7
@DPATCH@
8
 
--- insserv-1.08.0.orig/insserv.c
9
 
+++ insserv-1.08.0/insserv.c
10
 
@@ -34,6 +34,14 @@
11
 
 static const int map_runlevel_to_lvl (const int runlevel) __attribute__ ((unused));
12
 
 static const int map_runlevel_to_seek(const int runlevel) __attribute__ ((unused));
 
8
diff -urNad insserv~/insserv.c insserv/insserv.c
 
9
--- insserv~/insserv.c  2008-01-07 18:45:21.000000000 +0100
 
10
+++ insserv/insserv.c   2008-01-07 18:46:03.000000000 +0100
 
11
@@ -39,6 +39,15 @@
 
12
 static const int map_runlevel_to_seek(const int runlevel);
 
13
 #endif /* not SUSE */
13
14
 
14
15
+#ifdef SUSE
15
16
+#define DEFAULT_START_LVL "3 5"
17
18
+/* for Debian*/
18
19
+#define DEFAULT_START_LVL "2 3 4 5"
19
20
+#define DEFAULT_STOP_LVL  "0 1 6"
 
21
+#define DEFAULT_DEPENDENCY "$remote_fs $syslog"
20
22
+#endif
21
23
+
22
24
 #ifndef  INITDIR
23
25
 # define INITDIR       "/etc/init.d"
24
26
 #endif
25
 
@@ -1940,7 +1948,7 @@
 
27
@@ -1435,6 +1444,14 @@
 
28
            if (!script_inf.provides || script_inf.provides == empty)
 
29
                script_inf.provides = xstrdup(ptr);
 
30
 
 
31
+#ifndef SUSE
 
32
+           if (!lsb) {
 
33
+               script_inf.required_start = xstrdup(DEFAULT_DEPENDENCY);
 
34
+               script_inf.required_stop = xstrdup(DEFAULT_DEPENDENCY);
 
35
+               script_inf.default_start = xstrdup(DEFAULT_START_LVL);
 
36
+               script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
 
37
+           }
 
38
+#endif /* not SUSE */
 
39
 
 
40
            begin = script_inf.provides;
 
41
            while ((token = strsep(&script_inf.provides, delimeter)) && *token) {
 
42
@@ -2040,6 +2057,15 @@
 
43
        }
 
44
 #endif /* SUSE */
 
45
 
 
46
+#ifndef SUSE
 
47
+       if (!lsb) {
 
48
+           script_inf.required_start = xstrdup(DEFAULT_DEPENDENCY);
 
49
+           script_inf.required_stop = xstrdup(DEFAULT_DEPENDENCY);
 
50
+           script_inf.default_start = xstrdup(DEFAULT_START_LVL);
 
51
+           script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
 
52
+       }
 
53
+#endif /* not SUSE */
 
54
+
 
55
        /*
 
56
         * Oops, no comment found, guess one
 
57
         */
 
58
@@ -2247,7 +2273,7 @@
26
59
                            /*
27
60
                             * Ahh ... set default multiuser with network
28
61
                             */
31
64
                    }
32
65
 #ifndef SUSE
33
66
                    /*
34
 
@@ -1986,15 +1995,12 @@
 
67
@@ -2293,15 +2319,12 @@
35
68
            free(begin);
36
69
        }
37
70