Add support for running rcons via sudo on aix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12555 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
7f995d604a
commit
95db581fae
@ -1,9 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Provide serial console access to nodes
|
||||
|
||||
# To handle cases like running this via sudo, get the home dir properly
|
||||
os=`uname`
|
||||
if [ "$os" == "Linux" ]; then
|
||||
HOME=`getent passwd $(whoami)|cut -d: -f 6`
|
||||
export HOME
|
||||
fi
|
||||
if [ "$os" == "AIX" ]; then
|
||||
HOME=`lsuser -a home $(whoami)|cut -d= -f 2`
|
||||
export HOME
|
||||
fi
|
||||
|
||||
if [ -z "$1" ] || [ "$1" = "-h" ]; then
|
||||
echo "rcons - remotely accesses the serial console of a node"
|
||||
|
Loading…
Reference in New Issue
Block a user