#! /bin/sh #---------------------------------------------------------------------------- # /etc/init.d/hostname - set hostname # # Copyright (c) 2001-2007 The Eisfair Team, c/o Frank Meyer, frank(at)eisfair(dot)org # # Creation : 2001-10-15 fm # Last Update: $Id: hostname,v 1.1 2004/06/26 17:35:16 jed Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /etc/config.d/base if [ "${HOSTNAME_DO_DEBUG}" = "yes" ] then set -x fi case $1 in start) /usr/local/bin/colecho "setting up hostname ..." gn hostname ${HOSTNAME} { echo "127.0.0.1 localhost" echo "${IP_ETH_1_IPADDR} ${HOSTNAME}.${DOMAIN_NAME} ${HOSTNAME}" } >/etc/hosts ;; stop) ;; esac set +x