Re: Intend to code: update-cluster-machine
Viral <viral@debian.org> immo vero scripsit
> I think it would be nice to have a modular architecture, where modules
for
> other packages can be easily added.
This is what I have come up with.
It creates an XML-type configuration file, and you can create your hooks.
It should work in such a way that for example, mpich package would
provide the /usr/lib/update-cluster/mpich.updatelist
[update-cluster-add starts]
#!/bin/bash
# update-cluster-add script, coded by Junichi Uekawa
# 27 Jul 2001.
# Copyright 2001 Junichi Uekawa
# Licensed under GPL version 2 or later.
CLUSTERXML=cluster.xml
while test -n "$1"; do
case "$1" in
--ip)
IP=$2;
shift; shift;
;;
--hostname)
HOSTNAME=$2;
shift; shift;
;;
--mac)
MAC=$2;
shift; shift;
;;
*)
echo "WRONG OPTION [$1] GIVEN"
exit 1
;;
esac;
done
test -f $CLUSTERXML || cat > $CLUSTERXML << EOF
<?xml version="1.0"?>
<cluster>
</cluster>
EOF
sed "s!</cluster>! <host><ip>$IP</ip><mac>$MAC</mac><hostname>$HOSTNAME</hostname></host></cluster>!" < $CLUSTERXML > $CLUSTERXML.tmp && \mv $CLUSTERXML.tmp $CLUSTERXML
# update the config files..
for SCRIPTS in $(ls /usr/lib/update-cluster/*.updatelist); do
test -x $SCRIPTS && $SCRIPTS ;
done ;
[update-cluster-add ends]
>
> Supporting spong and other network monitoring packages such as bigsister
> etc. would also be a good idea.
Yes. This is a good idea.
>
> On an unrelated note, how come no network monitoring packages are
included
> in task-parallel-computing-* ? When are the task entries updated ?
Task entries are updated by the ftpmasters, AFAIK.
--
dancer@debian.org http://www.netfort.gr.jp/~dancer
Reply to: