[isar-cip-core][PATCH 3/6] customizations: comment why we can not actually change home easily


Henning Schild <henning.schild@...>
 

usermod --move-home seems like the cleanest solution, or even putting
that into ksd and using USER_root[home] = "/home/root"
But that unfortunately does not work. Some sed on /etc/passwd is likely
a bad idea so leave it a symlink but add some more info as commit
message and comment.

Signed-off-by: Henning Schild <henning.schild@...>
---
recipes-core/customizations/files/postinst | 2 ++
1 file changed, 2 insertions(+)

diff --git a/recipes-core/customizations/files/postinst b/recipes-core/customizations/files/postinst
index 543a2e14d180..7a0b00d98680 100644
--- a/recipes-core/customizations/files/postinst
+++ b/recipes-core/customizations/files/postinst
@@ -24,6 +24,8 @@ echo "127.0.0.1 $HOSTNAME" >> /etc/hosts

# needed for read-only rootfs with writable /home
if [ ! -L /root ]; then
+ # usermod --move-home can not be used while the target user
+ # has running processes, also we keep a symlink here
mv /root /home/
ln -s /home/root /root
fi
--
2.37.4