#! /bin/bash # # issue-reset set ipaddr in /etc/issue # # chkconfig: 2345 90 60 # description: this will echo the ip address to /etc/issue for display # Source function library. . /etc/init.d/functions RETVAL=0 # See how we were called. prog="issue-reset" start() { #change /etc/issue to display ip address echo "SugarCRM Appliance 4.2.0d" > /etc/issue echo "Powered by rPath Linux" >> /etc/issue /sbin/ifconfig | grep "inet addr" >> /etc/issue RETVAL=$? echo [ $RETVAL -eq 0 ] return $RETVAL } case "$1" in start) start ;; *) echo $"Usage: $0 {start}" exit 1 esac exit $?