Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4
Date: Fri, 23 Oct 2020 04:50:28
Message-Id: 20201023045018.567245-4-mattst88@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation by Matt Turner
1 It was confusing to understand that /etc/resolv.conf was *kept* in
2 stage4 because its set_cleanables() contained everything except it.
3
4 This will simplify things if we want to add more common items to the
5 cleanables list.
6
7 Signed-off-by: Matt Turner <mattst88@g.o>
8 ---
9 catalyst/targets/stage4.py | 6 +++++-
10 1 file changed, 5 insertions(+), 1 deletion(-)
11
12 diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
13 index a9b3c936..346c0845 100644
14 --- a/catalyst/targets/stage4.py
15 +++ b/catalyst/targets/stage4.py
16 @@ -32,7 +32,11 @@ class stage4(StageBase):
17 StageBase.__init__(self, spec, addlargs)
18
19 def set_cleanables(self):
20 - self.settings["cleanables"] = ["/var/tmp/*", "/tmp/*"]
21 + StageBase.set_cleanables(self)
22 +
23 + # We want to allow stage4's fsscript to generate a default
24 + # /etc/resolv.conf
25 + self.settings["cleanables"].remove('/etc/resolv.conf')
26
27 def set_action_sequence(self):
28 self.settings['action_sequence'] = [
29 --
30 2.26.2