diff mbox series

wic: swap partitions are not added to fstab

Message ID 20221028100509.32171-1-ciaran.courtney@activeenergy.ie
State Accepted, archived
Commit f1243572ad6b6303fe562e4eb7a9826fd51ea3c3
Headers show
Series wic: swap partitions are not added to fstab | expand

Commit Message

ciaran.courtney@activeenergy.ie Oct. 28, 2022, 10:05 a.m. UTC
From: ciarancourtney <ciaran.courtney@activeenergy.ie>

- Regression in 7aa678ce804c21dc1dc51b9be442671bc33c4041

Signed-off-by: ciarancourtney <ciaran.courtney@activeenergy.ie>
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergey Zhmylev Oct. 28, 2022, 12:18 p.m. UTC | #1
Hi Ciaran,

Thank you for the patch!
What for do you need swap in fstab?
It works perfectly out of the box without fstab entry:


root@genericx86-64<mailto:root@genericx86-64>:~# grep swap /etc/fstab

root@genericx86-64<mailto:root@genericx86-64>:~# cat /proc/swaps

Filename                                Type            Size            Used            Priority

/dev/vda3                               partition       45052           0               -2


--

With best wishes,
[cid:0ffef82130c00293042be5d146c47e92e7c19b2b.camel@yadro.com-0]        Sergei Zhmylev
Engineering consultant
OS development department







В Пт, 28/10/2022 в 11:05 +0100, ciaran.courtney@activeenergy.ie пишет:
«Внимание! Данное письмо от внешнего адресата!»

From: ciarancourtney <ciaran.courtney@activeenergy.ie<mailto:ciaran.courtney@activeenergy.ie>>

- Regression in 7aa678ce804c21dc1dc51b9be442671bc33c4041

Signed-off-by: ciarancourtney <ciaran.courtney@activeenergy.ie<mailto:ciaran.courtney@activeenergy.ie>>
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 58965b75da..dfaa901567 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 part.mountpoint == "/" or not (part.mountpoint.startswith('/') or part.mountpoint == "swap"):
                 continue

             if part.use_uuid:
--
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#172244): https://lists.openembedded.org/g/openembedded-core/message/172244
Mute This Topic: https://lists.openembedded.org/mt/94623104/7220546
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core+owner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [s.zhmylev@yadro.com<mailto:s.zhmylev@yadro.com>]
-=-=-=-=-=-=-=-=-=-=-=-
Michael Opdenacker Oct. 28, 2022, 12:18 p.m. UTC | #2
Hi Ciaran,

On 10/28/22 12:05, ciaran.courtney@activeenergy.ie wrote:
> From: ciarancourtney <ciaran.courtney@activeenergy.ie>
>
> - Regression in 7aa678ce804c21dc1dc51b9be442671bc33c4041
>
> Signed-off-by: ciarancourtney <ciaran.courtney@activeenergy.ie>


Many thanks for the patch!

However, your "Signed-off-by" information doesn't properly list your 
first and last names, and this will cause trouble generating the release 
notes.

Could you run:

git config --global user.name "Ciaran Courtney"

(if I'm not mistaken), and regenerate your patch, please?

Thanks in advance
Cheers
Michael.
ciaran.courtney@activeenergy.ie Oct. 28, 2022, 12:30 p.m. UTC | #3
I believe its common practice to add swap to fstab in order for it to be mounted, and that would have been the case before 7aa678ce804c21dc1dc51b9be442671bc33c4041 .

I'm developing a systemd based distro, which parses fstab at boot for disks to mount. I'm not sure what the non-systemd practice is.
diff mbox series

Patch

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 58965b75da..dfaa901567 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 part.mountpoint == "/" or not (part.mountpoint.startswith('/') or part.mountpoint == "swap"):
                 continue
 
             if part.use_uuid: