From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E2C19138359 for ; Fri, 23 Oct 2020 04:50:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27CB4E091A; Fri, 23 Oct 2020 04:50:28 +0000 (UTC) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20FB4E091A for ; Fri, 23 Oct 2020 04:50:28 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id 19so236151pge.12 for ; Thu, 22 Oct 2020 21:50:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ypnEe5KHH+Rp9b/9nLrbK7LyfXmoVPjOOc0M0etSzKY=; b=cCB4SbXJ/8pOsBA96FaZMKOrICuivb33vW/76L3rOgVnNj7CIoDVthP69ujmgIQPU9 aAys23gdoEWAqoByXH8AzxwRwR2wPsMGlvNJ81mgYerS4CHBAKKOPn7Pl47OpkwJX+ha pUrCXjCGMu5ZwsH32TT4KeJoyzdzM5wUtU13jIgMrUtOFTEjJkPb/XpfiMpr/UKpscle ncvcBsRhEb3oas11SOtprNuZ7oXX0NpBhSsBNUMcxkkELYUP+obwHqASSUATATDwE5f4 UBgBMzuw222gyk7Keg8hjpgfTrwFf1kt7yqX1Lt/kpGncrSoIqiSgUlRzYHG/hpiNkFm 5dTA== X-Gm-Message-State: AOAM532ZqYgecTe8gZpbBJGn4FFEROVuD2exzTlNwoR4GJJ5qFkoPC7X odkrb5R4sAgzEqj2jVVYDc9+6HAhTJBHFg== X-Google-Smtp-Source: ABdhPJxgsx347Fpz+v1kCv+T6hGGtgibDSpQKsnDKYMDHhcasV1ixxIfd2CHVtJI3OJsCXi5Rt/Alg== X-Received: by 2002:a63:ef51:: with SMTP id c17mr645536pgk.36.1603428626959; Thu, 22 Oct 2020 21:50:26 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id w74sm383263pff.200.2020.10.22.21.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 21:50:26 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4 Date: Thu, 22 Oct 2020 21:50:17 -0700 Message-Id: <20201023045018.567245-4-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201023045018.567245-1-mattst88@gentoo.org> References: <20201023045018.567245-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 3094ce18-51b2-4fd7-8bb1-f55ba0c85eac X-Archives-Hash: 4e7e549fac94ac130de639dbca9fba73 It was confusing to understand that /etc/resolv.conf was *kept* in stage4 because its set_cleanables() contained everything except it. This will simplify things if we want to add more common items to the cleanables list. Signed-off-by: Matt Turner --- catalyst/targets/stage4.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py index a9b3c936..346c0845 100644 --- a/catalyst/targets/stage4.py +++ b/catalyst/targets/stage4.py @@ -32,7 +32,11 @@ class stage4(StageBase): StageBase.__init__(self, spec, addlargs) def set_cleanables(self): - self.settings["cleanables"] = ["/var/tmp/*", "/tmp/*"] + StageBase.set_cleanables(self) + + # We want to allow stage4's fsscript to generate a default + # /etc/resolv.conf + self.settings["cleanables"].remove('/etc/resolv.conf') def set_action_sequence(self): self.settings['action_sequence'] = [ -- 2.26.2