From 130408f0d142d13b4a9b7d3b96634cda85846ec4 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 17 Feb 2014 13:42:36 +0000 Subject: #616: Corregir errata en función {{{ogGetCaller}}} para evitar error al lanzar un script desde terminal del cliente, eliminando carácter de guión inicial. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@4151 a21b9725-9963-47de-94b9-378ad31fedc9 --- client/engine/System.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/engine/System.lib') diff --git a/client/engine/System.lib b/client/engine/System.lib index bf26e66b..86ff27ca 100755 --- a/client/engine/System.lib +++ b/client/engine/System.lib @@ -118,8 +118,8 @@ return $CODE function ogGetCaller () { # Obtener el nombre del programa o del script que ha llamado al proceso actual. -basename $(ps hlp $PPID | awk '{if ($13~/bash/ && $14!="") print $14; - else print $13;}') +basename "$(ps hlp $PPID | awk '{if ($13~/bash/ && $14!="") print $14; + else { sub(/^-/,"",$13); print $13; } }')" } -- cgit v1.2.3-18-g5258