[v2,1/2] wic/plugins/images/direct: Allow changes in fstab on rootfs

Message ID 20220525122527.765791-2-tobiasschmidl@siemens.com
State Accepted, archived
Commit 20d43a2599d7622b96e2fb0da87a886da1a3794a
Headers show
Series wic/plugins/images/direct: Allow changes in fstab on rootfs | expand

Commit Message

Tobias Schmidl May 25, 2022, 12:25 p.m. UTC
Allow wic to also manipulate the rootfs entry in fstab, which it
currently refuses to write. Reasons one might want to do that include
using systemd-growfs via --fsoptions on /
With this change / is now handled exactly the same as other
mountpoints, the former exception seemingly was not even documented.

Signed-off-by: Tobias Schmidl <tobiasschmidl@siemens.com>
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index da483daed5..c44159b235 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: