[v3] sysvinit-inittab_2.88dsf.bb: only run serial checks at boot if we have items to check

Submitted by Matthew McClintock on Sept. 11, 2012, 5:56 p.m.

Details

Message ID 1347386213-6215-1-git-send-email-msm@freescale.com
State Accepted
Commit 019a95a5e01bd3fefaaab0a27029ed8b26ee3c79
Headers show

Commit Message

Matthew McClintock Sept. 11, 2012, 5:56 p.m.
Right now, we delay running the serial console checks to we boot up. This causes
issues for read only file systems. So, if have not configured any serial ports to
check via SERIAL_CONSOLES_CHECK we can skip the check at boot. This fixes any
issues with read only file systems and ipk packaging.

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
v2: bump PR
v3: change a == bashism to =

 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 1089edb..5b79caf 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -2,7 +2,7 @@  DESCRIPTION = "Inittab for sysvinit"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-PR = "r7"
+PR = "r8"
 
 SRC_URI = "file://inittab"
 
@@ -54,7 +54,7 @@  EOF
 
 pkg_postinst_${PN} () {
 # run this on the target
-if [ "x$D" == "x" ]; then
+if [ "x$D" = "x" ]; then
 	tmp="${SERIAL_CONSOLES_CHECK}"
 	for i in $tmp
 	do
@@ -65,7 +65,11 @@  if [ "x$D" == "x" ]; then
 	done
 	kill -HUP 1
 else
-	exit 1
+	if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
+		exit 0
+	else
+		exit 1
+	fi
 fi
 }
 

Comments

Phil Blundell Sept. 11, 2012, 6 p.m.
On Tue, 2012-09-11 at 12:56 -0500, Matthew McClintock wrote:
> Right now, we delay running the serial console checks to we boot up. This causes
> issues for read only file systems. So, if have not configured any serial ports to
> check via SERIAL_CONSOLES_CHECK we can skip the check at boot. This fixes any
> issues with read only file systems and ipk packaging.
> 
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: bump PR
> v3: change a == bashism to =

Looks good.  Thanks.

p.
Saul Wold Sept. 12, 2012, 5:17 p.m.
On 09/11/2012 10:56 AM, Matthew McClintock wrote:
> Right now, we delay running the serial console checks to we boot up. This causes
> issues for read only file systems. So, if have not configured any serial ports to
> check via SERIAL_CONSOLES_CHECK we can skip the check at boot. This fixes any
> issues with read only file systems and ipk packaging.
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: bump PR
> v3: change a == bashism to =
>
>   .../sysvinit/sysvinit-inittab_2.88dsf.bb           |   10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> index 1089edb..5b79caf 100644
> --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> @@ -2,7 +2,7 @@ DESCRIPTION = "Inittab for sysvinit"
>   LICENSE = "GPLv2"
>   LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
>
> -PR = "r7"
> +PR = "r8"
>
>   SRC_URI = "file://inittab"
>
> @@ -54,7 +54,7 @@ EOF
>
>   pkg_postinst_${PN} () {
>   # run this on the target
> -if [ "x$D" == "x" ]; then
> +if [ "x$D" = "x" ]; then
>   	tmp="${SERIAL_CONSOLES_CHECK}"
>   	for i in $tmp
>   	do
> @@ -65,7 +65,11 @@ if [ "x$D" == "x" ]; then
>   	done
>   	kill -HUP 1
>   else
> -	exit 1
> +	if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
> +		exit 0
> +	else
> +		exit 1
> +	fi
>   fi
>   }
>
>

Merged to OE-Core

Thanks
	Sau!