]> code.ossystems Code Review - openembedded-core.git/commitdiff
run-postinsts: Replace pi_dir variable test
authorNiko Mauno <niko.mauno@iki.fi>
Sat, 14 Apr 2018 06:54:56 +0000 (09:54 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Apr 2018 17:48:20 +0000 (18:48 +0100)
Since commit 5159ddcb62682e1b7e63a20a9218ea96e3fe10a2 string length test
performed against pi_dir has effectively never been able to succeed.

Change this to rather test if pi_dir is not an existing directory. By
doing we remove the chance of seeing the following console error message
during first boot to a pristine rootfs:

  'ls: /etc/ipk-postinsts: No such file or directory'

Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb

index 50c0a1afeaee62db4d89e42b4d83f3cb48e83662..307feb71879e21aab0a8b521fe3326558064f8f5 100755 (executable)
@@ -43,7 +43,7 @@ remove_rcsd_link () {
        fi
 }
 
-if [ -z "$pi_dir" ]; then
+if ! [ -d $pi_dir ]; then
        remove_rcsd_link
        exit 0
 fi
index 31c98ec99c1ae37034776211d7df247754607009..85b3fc867e3d24097fa9932b92ee15c6c945204b 100644 (file)
@@ -1,6 +1,6 @@
 SUMMARY = "Runs postinstall scripts on first boot of the target device"
 SECTION = "devel"
-PR = "r9"
+PR = "r10"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"