On Thu, 2022-09-29 at 14:57 +0200, Markus Volk wrote: > Remove the hardcoded root device entry from fstab when updating to > avoid duplicate entries. > > Signed-off-by: Markus Volk <f_...@t-online.de> > --- > scripts/lib/wic/plugins/imager/direct.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/scripts/lib/wic/plugins/imager/direct.py > b/scripts/lib/wic/plugins/imager/direct.py > index da483daed5..fd86a094d9 100644 > --- a/scripts/lib/wic/plugins/imager/direct.py > +++ b/scripts/lib/wic/plugins/imager/direct.py > @@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin): > updated = False > for part in self.parts: > if not part.realnum or not part.mountpoint \ > - or part.mountpoint == "/" or not > part.mountpoint.startswith('/'): > + or not part.mountpoint.startswith('/'): > continue > > if part.use_uuid: > @@ -145,6 +145,11 @@ class DirectPlugin(ImagerPlugin): > fstab_lines.append(line) > updated = True > > + for line in fstab_lines: > + if '/dev/root' in line: > + fstab_lines.remove(line) > + updated = True > +
Do we need to worry here about whether we're actually adding a new root entry? Is there a case it does need to be preserved? Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#171192): https://lists.openembedded.org/g/openembedded-core/message/171192 Mute This Topic: https://lists.openembedded.org/mt/93993381/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-