diff mbox series

[isar-cip-core] make postinst script report all potential errors

Message ID 20230329082426.355870-1-srinuvasan_a@mentor.com (mailing list archive)
State Superseded
Headers show
Series [isar-cip-core] make postinst script report all potential errors | expand

Commit Message

Srinuvasan Arjunan March 29, 2023, 8:24 a.m. UTC
From: Srinuvasan A <srinuvasan.a@siemens.com>

Let us try and make sure that all bits we have are executed as expected.

Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
---
 recipes-core/home-fs/files/postinst                 | 2 ++
 recipes-core/security-customizations/files/postinst | 2 ++
 recipes-core/tmp-fs/files/postinst                  | 2 ++
 3 files changed, 6 insertions(+)

Comments

Jan Kiszka April 3, 2023, 7:19 a.m. UTC | #1
On 29.03.23 10:24, Srinuvasan Arjunan wrote:
> From: Srinuvasan A <srinuvasan.a@siemens.com>
> 
> Let us try and make sure that all bits we have are executed as expected.
> 
> Signed-off-by: Srinuvasan A <srinuvasan.a@siemens.com>
> ---
>  recipes-core/home-fs/files/postinst                 | 2 ++
>  recipes-core/security-customizations/files/postinst | 2 ++
>  recipes-core/tmp-fs/files/postinst                  | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/recipes-core/home-fs/files/postinst b/recipes-core/home-fs/files/postinst
> index f6184d6..ab0db84 100755
> --- a/recipes-core/home-fs/files/postinst
> +++ b/recipes-core/home-fs/files/postinst
> @@ -1,3 +1,5 @@
>  #!/bin/sh
>  
> +set -e
> +
>  deb-systemd-helper enable home.mount  || true
> diff --git a/recipes-core/security-customizations/files/postinst b/recipes-core/security-customizations/files/postinst
> index 167bab1..77a2713 100644
> --- a/recipes-core/security-customizations/files/postinst
> +++ b/recipes-core/security-customizations/files/postinst
> @@ -4,6 +4,8 @@
>  # Security Package configurations
>  #
>  
> +set -e
> +
>  echo "CIP Core Security Image (login: root/Cipsecurity@123)" > /etc/issue
>  
>  HOSTNAME=demo
> diff --git a/recipes-core/tmp-fs/files/postinst b/recipes-core/tmp-fs/files/postinst
> index da41046..39067f1 100755
> --- a/recipes-core/tmp-fs/files/postinst
> +++ b/recipes-core/tmp-fs/files/postinst
> @@ -1,5 +1,7 @@
>  #!/bin/sh
>  
> +set -e
> +
>  if [ ! -e /etc/systemd/system/tmp.mount ]; then
>      cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
>  fi

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/recipes-core/home-fs/files/postinst b/recipes-core/home-fs/files/postinst
index f6184d6..ab0db84 100755
--- a/recipes-core/home-fs/files/postinst
+++ b/recipes-core/home-fs/files/postinst
@@ -1,3 +1,5 @@ 
 #!/bin/sh
 
+set -e
+
 deb-systemd-helper enable home.mount  || true
diff --git a/recipes-core/security-customizations/files/postinst b/recipes-core/security-customizations/files/postinst
index 167bab1..77a2713 100644
--- a/recipes-core/security-customizations/files/postinst
+++ b/recipes-core/security-customizations/files/postinst
@@ -4,6 +4,8 @@ 
 # Security Package configurations
 #
 
+set -e
+
 echo "CIP Core Security Image (login: root/Cipsecurity@123)" > /etc/issue
 
 HOSTNAME=demo
diff --git a/recipes-core/tmp-fs/files/postinst b/recipes-core/tmp-fs/files/postinst
index da41046..39067f1 100755
--- a/recipes-core/tmp-fs/files/postinst
+++ b/recipes-core/tmp-fs/files/postinst
@@ -1,5 +1,7 @@ 
 #!/bin/sh
 
+set -e
+
 if [ ! -e /etc/systemd/system/tmp.mount ]; then
     cp /usr/share/systemd/tmp.mount /etc/systemd/system/tmp.mount
 fi