Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
resource-agents.13629
0001-Don-t-call-readlink-on-path-if-it-does-not...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Don-t-call-readlink-on-path-if-it-does-not-exist.patch of Package resource-agents.13629
From 48a7ebcea5ce0522021cf3079b62107a06b530b9 Mon Sep 17 00:00:00 2001 From: James Oakley <jfunk@funktronics.ca> Date: Thu, 8 Aug 2019 05:56:14 -0700 Subject: [PATCH] Don't call readlink on path if it does not exist --- heartbeat/Filesystem | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem index 4bbbc06d..738e3c08 100755 --- a/heartbeat/Filesystem +++ b/heartbeat/Filesystem @@ -858,10 +858,14 @@ if [ -z "$OCF_RESKEY_directory" ]; then else MOUNTPOINT=$(echo $OCF_RESKEY_directory | sed 's/\/*$//') : ${MOUNTPOINT:=/} - CANONICALIZED_MOUNTPOINT=$(readlink -f "$MOUNTPOINT") - if [ $? -ne 0 ]; then - ocf_exit_reason "Could not canonicalize $MOUNTPOINT because readlink failed" - exit $OCF_ERR_GENERIC + if [ -e "$MOUNTPOINT" ] ; then + CANONICALIZED_MOUNTPOINT=$(readlink -f "$MOUNTPOINT") + if [ $? -ne 0 ]; then + ocf_exit_reason "Could not canonicalize $MOUNTPOINT because readlink failed" + exit $OCF_ERR_GENERIC + fi + else + CANONICALIZED_MOUNTPOINT="$MOUNTPOINT" fi # At this stage, $MOUNTPOINT does not contain trailing "/" unless it is "/" # TODO: / mounted via Filesystem sounds dangerous. On stop, we'll -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor