checking sdcore or free5gc directory exist in a image

tested these changes on aiab setup with all sdcore images/free5gc images.
All pods are up and running, registration call flow is fine with gnbsim

Change-Id: I8a0fdab559cf3cb524cf159ae1d7b201acfd05f3
diff --git a/5g-control-plane/templates/bin/_amf-run.sh.tpl b/5g-control-plane/templates/bin/_amf-run.sh.tpl
index ce0d310..cdc0377 100644
--- a/5g-control-plane/templates/bin/_amf-run.sh.tpl
+++ b/5g-control-plane/templates/bin/_amf-run.sh.tpl
@@ -6,12 +6,21 @@
 
 set -xe
 
-IMGPATH={{ .Values.config.imagePath }}
+DIR=""
+if [ -d "/free5gc/amf" ]; then
+  DIR="/free5gc"
+  echo "free5gc directory exist" 
+fi
+if [ -d "/sdcore/amf" ]; then
+  DIR="/sdcore"
+  echo "sdcore directory exist" 
+fi 
+
 {{- if .Values.config.coreDump.enabled }}
-cp $IMGPATH/amf/amf /tmp/coredump/
+cp $DIR/amf/amf /tmp/coredump/
 {{- end }}
 
-cd $IMGPATH
+cd $DIR
 cat config/amfcfg.conf
 
 GOTRACEBACK=crash ./amf/amf -amfcfg config/amfcfg.conf