From dd953a1d17413ebff366fe0980f5c2ae9b492cd1 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 10 Apr 2012 04:52:26 +0000 Subject: [PATCH] fix bug 3513481. There was no command 'getent' in AIX. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12169 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/rcons | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons index bc47ce3b6..e16813268 100755 --- a/xCAT-client/bin/rcons +++ b/xCAT-client/bin/rcons @@ -1,6 +1,10 @@ #!/bin/sh -HOME=`getent passwd $(whoami)|cut -d: -f 6` -export HOME +os=`uname` +if [ "$os" == "Linux" ]; then + HOME=`getent passwd $(whoami)|cut -d: -f 6` + export HOME +fi + if [ -z "$1" ] || [ "$1" = "-h" ]; then echo "rcons - remotely accesses the serial console of a node" echo "rcons [conserver] [-f]"