From 2c97eded50ed01d9ee43407dd91e33b624f74ecd Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Tue, 4 Jul 2017 14:59:06 +0800 Subject: [PATCH] fix routeop does not use xcatlib.sh for issue 3359 (#3377) * routeop does not use xcatlib.sh for issue 3359 * enhanced based on comments --- xCAT/postscripts/routeop | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop index f5687f6d0..4e5501592 100755 --- a/xCAT/postscripts/routeop +++ b/xCAT/postscripts/routeop @@ -23,10 +23,11 @@ #=cut #------------------------------------------------------------------------------- - if [ "$(uname -s|tr 'A-Z' 'a-z')" = "linux" ];then str_dir_name=`dirname $0` - . $str_dir_name/xcatlib.sh + ([ -f $str_dir_name/xcatlib.sh ] && . $str_dir_name/xcatlib.sh) || \ + ([ -f /install/postscripts/xcatlib.sh ] && . /install/postscripts/xcatlib.sh) || \ + ([ -f /xcatpost/xcatlib.sh ] && . /xcatpost/xcatlib.sh) fi op=$1