Skip to contentSkip to conversation

matrix-gui: update init scripts to execute /etc/profile.d/*.sh only when they exist

PATCH Superseded Hongmei Gou 2 participants 2 messages Aug 18, 2017 – Aug 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 matrix-gui: update init scripts to execute /etc/profile.d/*.sh only when they exist

---
v2 change: simplify the check as suggested by Denys

 meta-arago-extras/recipes-core/matrix/matrix-gui/init       | 7 ++-----
 meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs | 7 ++-----
 meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb     | 2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)
meta-arago-extras/recipes-core/matrix/matrix-gui/init +2 -5
index 3ec0a55..5124c38 100644
@@ -5,11 +5,8 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
 PIDFILE="/var/run/matrix-gui-2.0.pid"
 
 # Important System Environment Variables
-SCRIPTS=/etc/profile.d/*.sh
-
-for f in $SCRIPTS
-do
-    source $f
+for sh in /etc/profile.d/*.sh ; do
+    [ -r "$sh" ] && . "$sh"
 done
 
 test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs +2 -5
index 213f859..df07c05 100644
@@ -5,11 +5,8 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
 PIDFILE="/var/run/matrix-gui-2.0.pid"
 
 # Important System Environment Variables
-SCRIPTS=/etc/profile.d/*.sh
-
-for f in $SCRIPTS
-do
-    source $f
+for sh in /etc/profile.d/*.sh ; do
+    [ -r "$sh" ] && . "$sh"
 done
 
 test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb +1 -1
index aecc3be..507a98c 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
 
 SECTION = "multimedia"
 
-PR = "r31"
+PR = "r32"
 
 INITSCRIPT_NAME = "matrix-gui-2.0"
 INITSCRIPT_PARAMS = "defaults 97"
Signature · 1 line
1.9.1
#1 lore raw

Thanks, merged.

Quoted 65 lines · Hongmei Gou

---
v2 change: simplify the check as suggested by Denys

 meta-arago-extras/recipes-core/matrix/matrix-gui/init       | 7 ++-----
 meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs | 7 ++-----
 meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb     | 2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)
meta-arago-extras/recipes-core/matrix/matrix-gui/init +2 -5
index 3ec0a55..5124c38 100644
@@ -5,11 +5,8 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
 PIDFILE="/var/run/matrix-gui-2.0.pid"
 
 # Important System Environment Variables
-SCRIPTS=/etc/profile.d/*.sh
-
-for f in $SCRIPTS
-do
-    source $f
+for sh in /etc/profile.d/*.sh ; do
+    [ -r "$sh" ] && . "$sh"
 done
 
 test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs +2 -5
index 213f859..df07c05 100644
@@ -5,11 +5,8 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
 PIDFILE="/var/run/matrix-gui-2.0.pid"
 
 # Important System Environment Variables
-SCRIPTS=/etc/profile.d/*.sh
-
-for f in $SCRIPTS
-do
-    source $f
+for sh in /etc/profile.d/*.sh ; do
+    [ -r "$sh" ] && . "$sh"
 done
 
 test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb +1 -1
index aecc3be..507a98c 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
 
 SECTION = "multimedia"
 
-PR = "r31"
+PR = "r32"
 
 INITSCRIPT_NAME = "matrix-gui-2.0"
 INITSCRIPT_PARAMS = "defaults 97"
Signature · 6 lines
1.9.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago