Debian Codegraph @

contrib/cfengine/cfengine-2.2.10/0006-Move-cf.preconf-call-to-before-classes-are-configured.patch

raw
1 From e97a615d419908a5e557c667d05f5ced1e3fd624 Mon Sep 17 00:00:00 2001
2 From: Mark A. Grondona <[email protected]>
3 Date: Thu, 31 Jan 2013 15:11:30 -0800
4 Subject: [PATCH] Move cf.preconf call to before classes are configured
5
6 In cases where the actions of cf.preconf or other pre-script can affect
7 the establishment of hard classes (e.g. move a genders file into place
8 or establish new NIS groups), it would be better to run the preconf script
9 before these classes are initialized in cfagent.
10
11 There does not appear to be a good reason for the current practice of
12 running the cf.preconf script *after* hard classes are already established,
13 so this change moves that call a few lines up.
14
15 Fixes TOSS-1912.
16 ---
17 src/cfagent.c | 2 +-
18 1 files changed, 1 insertions(+), 1 deletions(-)
19
20 diff --git a/src/cfagent.c b/src/cfagent.c
21 index d4fc8fd..e3a45ac 100644
22 --- a/src/cfagent.c
23 +++ b/src/cfagent.c
24 @@ -142,6 +142,7 @@ signal (SIGUSR2,HandleSignal);
25 Initialize(argc,argv);
26 SetReferenceTime(true);
27 SetStartTime(false);
28 +PreNetConfig();
29
30 if (! NOHARDCLASSES)
31 {
32 @@ -151,7 +152,6 @@ if (! NOHARDCLASSES)
33 GetEnvironment();
34 }
35
36 -PreNetConfig();
37 ReadRCFile(); /* Should come before parsing so that it can be overridden */
38
39 if (IsPrivileged() && !MINUSF && !PRSCHEDULE)
40 --
41 1.5.4.5
42