Greg Padgett has uploaded a new change for review.

Change subject: tools: notifier startup script startup directory
......................................................................

tools: notifier startup script startup directory

The notification daemon startup script attempts to change to the ovirt
user home directory to avoid permissions errors.  This directory doesn't
always exist, so it will now use / as a fallback.

Change-Id: Iba8b163881bd31eeb970da82003dd184ffcad9b9
Bug-Url: https://bugzilla.redhat.com/949975
Signed-off-by: Greg Padgett <gpadg...@redhat.com>
---
M backend/manager/tools/src/main/shell/engine-notifier-service.sh
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/13959/1

diff --git a/backend/manager/tools/src/main/shell/engine-notifier-service.sh 
b/backend/manager/tools/src/main/shell/engine-notifier-service.sh
index c453ceb..2f72b88 100755
--- a/backend/manager/tools/src/main/shell/engine-notifier-service.sh
+++ b/backend/manager/tools/src/main/shell/engine-notifier-service.sh
@@ -23,7 +23,12 @@
 # Path to the engine-notifier launch script
 NOTIFIER_SCRIPT=/usr/share/ovirt-engine/bin/engine-notifier.sh
 
-cd $(getent passwd $ENGINE_USER | cut -d: -f6)
+startup_dir="$(getent passwd $ENGINE_USER | cut -d: -f6)"
+if [ -d "$startup_dir" ]; then
+    cd "$startup_dir"
+else
+    cd /
+fi
 
 if [ -z "$SHUTDOWN_WAIT" ]; then
     SHUTDOWN_WAIT=10


--
To view, visit http://gerrit.ovirt.org/13959
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba8b163881bd31eeb970da82003dd184ffcad9b9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadg...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to