Matt,
sounds good! But I'd prefer to keep only one copy of the rc.* files. So
what about touching a single file in /etc/systemimager during the first
reboot and changing the script as following:
...
rebooted_state_file=/etc/systemimager/si_monitor.client.rebooted
rm -f $rebooted_state_file
cmd="[ ! -f $rebooted_state_file ] && touch $rebooted_state_file &&
(echo \"$send_msg\" | $netcat -w $TIMEOUT $MONITOR_SERVER $MONITOR_PORT)"
for f in /etc/rc.local /etc/rc.d/rc.local /etc/init.d/rc.local
/etc/init.d/after.local; do
echo $cmd >> $f
done
...
Thanks,
-Andrea
Matt Jamison wrote:
>
> On systems like rhel4, where more than one of these files is present
> (symlinks to be exact), this results in this status update happening
> multiple times. Also, since this status update command isn't being
> removed after it runs on boot up, it also posts back again any time the
> system is rebooted...
>
> I remember this being mentioned before, but it still appears to be
> broken in this way in trunk. How about changing this to be like:
>
> cmd="echo \"$send_msg\" | $netcat -w $TIMEOUT $MONITOR_SERVER $MONITOR_PORT"
> for f in /etc/rc.local /etc/rc.d/rc.local /etc/init.d/rc.local
> /etc/init.d/after.local; do
> if [ -f $f ] ; then
> cp -f $f $f.sibak
> cmd="$cmd;cp -f $f.sibak $f;rm -f $f.sibak"
> echo $cmd >> $f
> break
> fi
> done
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sisuite-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel