matrix-gui: update init scripts to execute /etc/profile.d/*.sh only when they exist
PATCH 1/1 matrix-gui: update init scripts to execute /etc/profile.d/*.sh only when they exist
Signed-off-by Hongmei Gou <[email protected]>
--- meta-arago-extras/recipes-core/matrix/matrix-gui/init | 16 ++++++++++------ .../recipes-core/matrix/matrix-gui/init.eglfs | 14 +++++++++----- meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-)
meta-arago-extras/recipes-core/matrix/matrix-gui/init +10 -6
@@ -5,12 +5,16 @@ 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 -done +DIR=/etc/profile.d +SCRIPTS=$DIR/*.sh + +if [ "$(ls -A $DIR)" ]; +then + for f in $SCRIPTS + do + source $f + done +fi test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs +9 -5
@@ -5,12 +5,16 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__" PIDFILE="/var/run/matrix-gui-2.0.pid" # Important System Environment Variables -SCRIPTS=/etc/profile.d/*.sh +DIR=/etc/profile.d +SCRIPTS=$DIR/*.sh -for f in $SCRIPTS -do - source $f -done +if [ "$(ls -A $DIR)" ]; +then + for f in $SCRIPTS + do + source $f + done +fi test -x "$matrixgui" || exit 0
meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb +1 -1
@@ -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
Quoted 21 lines · Hongmei Gou
Signed-off-by Hongmei Gou <[email protected]>--- meta-arago-extras/recipes-core/matrix/matrix-gui/init | 16 ++++++++++------ .../recipes-core/matrix/matrix-gui/init.eglfs | 14 +++++++++----- meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-)meta-arago-extras/recipes-core/matrix/matrix-gui/init +0
-6@@ -5,12 +5,16 @@ 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 -done
meta-arago-extras/recipes-core/matrix/matrix-gui/init GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__" · line 17
Quoted 10 lines
meta-arago-extras/recipes-core/matrix/matrix-gui/init +10
-0+DIR=/etc/profile.d +SCRIPTS=$DIR/*.sh + +if [ "$(ls -A $DIR)" ]; +then + for f in $SCRIPTS + do + source $f + done +fi
Why not simply this:
for sh in /etc/profile.d/*.sh ; do
[ -r "$sh" ] && . "$sh"
done
That's what other distros are doing and it works fine.
Quoted 48 lines
meta-arago-extras/recipes-core/matrix/matrix-gui/init +0
-0test -x "$matrixgui" || exit 0meta-arago-extras/recipes-core/matrix/matrix-gui/init.eglfs +9
-5@@ -5,12 +5,16 @@ GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__" PIDFILE="/var/run/matrix-gui-2.0.pid" # Important System Environment Variables -SCRIPTS=/etc/profile.d/*.sh +DIR=/etc/profile.d +SCRIPTS=$DIR/*.sh -for f in $SCRIPTS -do - source $f -done +if [ "$(ls -A $DIR)" ]; +then + for f in $SCRIPTS + do + source $f + done +fi test -x "$matrixgui" || exit 0meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb +1
-1@@ -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