← Back to team overview

curtin-dev team mailing list archive

[Merge] ~mwhudson/curtin:chrootabletarget-non-root into curtin:master

 

Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:chrootabletarget-non-root into curtin:master.

Commit message:
have ChrootableTarget ignore allow_daemons when target == "/"

For one thing, disabling deamons in the root filesystem is almost
certainly never wanted and for another this allows ChrootableTarget to
be used with "/" as non-root (for example, allowing you to run
get_efibootmgr("/") as non-root when running subiquity integration
tests).



Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/446719
-- 
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:chrootabletarget-non-root into curtin:master.
diff --git a/curtin/util.py b/curtin/util.py
index 025b306..005a521 100644
--- a/curtin/util.py
+++ b/curtin/util.py
@@ -740,7 +740,7 @@ class ChrootableTarget(object):
             if do_mount(p, tpath, opts='--bind'):
                 self.umounts.append(tpath)
 
-        if not self.allow_daemons:
+        if self.target != "/" and not self.allow_daemons:
             self.disabled_daemons = disable_daemons_in_root(self.target)
 
         rconf = paths.target_path(self.target, "/etc/resolv.conf")

Follow ups