home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!bu.edu!decwrl!pa.dec.com!math.sunysb.edu!scott
- From: scott@math.sunysb.edu (Scott Sutherland)
- Newsgroups: comp.unix.admin
- Subject: multiple machine distribution architecture
- Message-ID: <9209101906.AA24571@math.sunysb.edu>
- Date: 10 Sep 92 19:06:27 GMT
- Lines: 70
- X-Received: by usenet.pa.dec.com; id AA17768; Thu, 10 Sep 92 12:06:36 -0700
- X-Received: by inet-gw-1.pa.dec.com; id AA01816; Thu, 10 Sep 92 12:06:35 -0700
- X-Received: by math.sunysb.edu (4.1/SMI-4.0)id AA24571; Thu, 10 Sep 92 15:06:27 EDT
- X-To: leisner.henr801c@xerox.com
- X-Cc: amd-workers@acl.lanl.gov, comp.unix.admin.usenet,
-
- X- sunsystem.all_areas@xerox.com
- X-In-Reply-To: Marty Leisner 311/? x?'s message of Thu, 10 Sep 1992 09:15:01 PDT <9209101615.AA01679@louvre.wbst147.xerox.com>
-
- ml> Date: Thu, 10 Sep 1992 09:15:01 PDT
- ml> From: leisner@eso.mc.xerox.com (Marty Leisner 311/? x?)
- ml> Organization: Xerox
- ml> Reply-To: leisner.henr801c@xerox.com
- ml> Sender: <owner-amd-workers@acl.lanl.gov>
- ml>
- ml>
- ml> I'm looking for a good way to put binary versions on a known good
- ml> machine, and then distribute what was updated or is new via cron??
- ml>
- ml> I supposed the best way is to do a make install on packages on the
- ml> primary servers, where the mount point is a link file system (so I'm
- ml> guaranteed to get this file system). [I'm using amd, I have no idea
- ml> how to do this in automounter]
- ml>
- ml> Then some type of cron script to copy what is new/changed to the
- ml> other redundant machines...
- ml> [ ... ]
- ml> Marty leisner.henr801c@xerox.com
-
- Yes, this is easily done that way. A little script that just runs find can
- do it for you. Something like the following should work for you:
-
- #!/bin/sh
- targetdir=`pwd` # probably breaks with amd/automounter; set
- # explicitly and do a cd $targetdir first
- timestamp=".timestamp"
- targetmachines="host1 host2 host3" #hosts to copy to
-
- if [ ! -f $timestamp ]; then
- files=`find . -print`
- else
- files=`find . -newer $timestamp -print`
- fi
- touch $timestamp
-
- if [ $files ]; then
- echo updating the following files on $targetmachines:
- ls -l $files
- for host in $targetmachines; do
- echo -n $host " "
- rcp $files $host:$targetdir
- echo "."
- done
- fi
-
- exit 0
-
- Note that I haven't tested this and just wrote it; you should do that first.
- Also, there's a little bug in that if a file changes while the find is
- running, it may get missed (since timestamp is set AFTER the find finishes).
- Also, if the rcp fails for a particular machine, if will be missed next time
- around. And of course you have to be able to rcp to the machines in
- question. These can all be worked around if you want, but....
-
- Another way to do it us like the above, but use GNU tar to build and pack
- the list of files (it has a -newer option too), and then unpack that on each
- machine.
-
- Rdist is really designed to do this sort of thing, but as you said, you had
- trouble doing it. There's usually about 10 ways to solve a given problem,
- anyway.
-
-
- Scott Sutherland
- scott@math.sunysb.edu
- Stony Brook Institute for Mathematical Sciences
-