https://github.com/hpcsi/losf
Tip revision: 54a6e257d1e79c07f94d88b5b9153c081f0a45fc authored by Karl W. Schulz on 17 June 2014, 10:41:29 UTC
prep for 0.46.0 release
prep for 0.46.0 release
Tip revision: 54a6e25
update_hosts
#!/bin/bash
#-----------------------------------------------------------------------bl-
#--------------------------------------------------------------------------
#
# LosF - a Linux operating system Framework for HPC clusters
#
# Copyright (C) 2007-2014 Karl W. Schulz <losf@koomie.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Version 2 GNU General
# Public License as published by the Free Software Foundation.
#
# These programs are distributed in the hope that they will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc. 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
#-----------------------------------------------------------------------el-
# Shell wrapper for updating local host file
#--------------------------------------------------------------------------
if [ -h $0 ];then
export TOP_DIR=`dirname $(readlink -f ${0})`
else
export TOP_DIR=`echo $( (cd -P $(dirname $0) && pwd) )`
fi
if [ -z $PERL5LIB ];then
export PERL5LIB=$TOP_DIR/utils
else
export PERL5LIB=$TOP_DIR/utils:$PERL5LIB
fi
if [ ! -e $TOP_DIR/utils/update_hosts.pl ]; then
echo "[Error]: unable to locate update_hosts.pl"]
exit 1
fi
$TOP_DIR/utils/update_hosts.pl