[Libguestfs] [PATCH v1] appliance: enable bash's Process Substitution feature

Olaf Hering olaf at aepfle.de
Wed Sep 15 10:20:42 UTC 2021

bash can read input from a spawned process, and even provide input to
such process. This feature relies on /dev/fd/ being present. In the
past udev silently created this symlink, so this bash feature worked
more or less by accident. With recent systemd versions, such as 246
which is included in Leap 15.3, the symlink is not created anymore. As
a result scripts, such as /sbin/dhclient-script, fail to work

This symlink should have been created in version 1 of this variant of /init.


Signed-off-by: Olaf Hering <olaf at aepfle.de>
 appliance/init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/appliance/init b/appliance/init
index b1c4d09ea..cdc39c3b9 100755
--- a/appliance/init
+++ b/appliance/init
@@ -72,6 +72,7 @@ fi
 # devtmpfs is required since udev 176
 mount -t devtmpfs /dev /dev
+ln -s /proc/self/fd /dev/fd
 mkdir -p /dev/pts
 mount -t devpts /dev/pts /dev/pts
 mkdir -p /dev/shm

More information about the Libguestfs mailing list