]> code.ossystems Code Review - openembedded-core.git/commitdiff
psplash: Avoid mount the psplash tmpfs twice
authorKevin Hao <kexin.hao@windriver.com>
Mon, 19 Aug 2019 09:27:15 +0000 (17:27 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Aug 2019 12:21:46 +0000 (13:21 +0100)
The /etc/init.d/psplash.sh will be invoked both in boot and
shutdown/reboot. And the psplash tmpfs will be mounted twice. This
will trigger a bug in umount and let the system hang when
shutdown/reboot. I already made a patch [1] to fix the issue in
umount, but there is no reason for the psplash to do the twice mount.
So also fix it.

[Yocto 13461]

[1] https://lore.kernel.org/util-linux/20190819083022.12289-1-kexin.hao@windriver.com/T/#u

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/psplash/files/psplash-init

index fee23e681cfb34bee0684d35f16a6c2536bc5277..dcb751907f4170065f16c0dd47c6dfc6aff9c04a 100755 (executable)
@@ -25,7 +25,9 @@ done
 
 export TMPDIR=/mnt/.psplash
 [ -d $TMPDIR ] || mkdir -p $TMPDIR
-mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+if [ ! mountpoint -q $TMPDIR ]; then
+       mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+fi
 
 rotation=0
 if [ -e /etc/rotation ]; then