Hi Brian,
   Fell free to do whatever you want with it! 

    Ghe Rivero


--- Brian Elliott Finley <[EMAIL PROTECTED]>
escribió: > Ghe,
> 
> Very interesting.  I'd like to include your init
> script in the
> "unofficial contributions" area, and would like to
> include your
> "touchimage" command in the upstream source.  Sound
> good?
> 
> A clever solution.
> 
> Thanks!
> 
> -Brian
> 
> 
> Thus spake Ghe Rivero ([EMAIL PROTECTED]):
> >Hi people,
> >     i'm the administrator of several computers labs
> with around 300
> >computers with dual boot and i needed to
> "autoupdate" them frequently.
> >     With the inclusion of the "IMAGE_RETRIEVAL_TIME"
> recently in the CVS
> >version os systemimager, i managed to create a
> little script to do this
> >action really easy.
> >     Apart of this, i usually modified the images via
> chroot, so the
> >IMAGE_RETRIEVAL_TIME is not update (only via
> getimage), that's why i
> >created a new command, touchimage to do that.
> >     Some work is still necesary and the inclusion of a
> IMAGE_SERVER file in
> >the client images will be really useful.
> >     
> >     Anyway, i included my work here. MAybe is not so
> good to include it in
> >the official release, but someone can have the same
> problem and we can
> >improved a littel more.
> >     Comments are really welcomed.
> >
> >     Ghe Rivero
> 
> >diff -urN --exclude CVS
> systemimager/etc/default/si-client
> systemimager.local/etc/default/si-client
> >--- systemimager/etc/default/si-client       1970-01-01
> 01:00:00.000000000 +0100
> >+++ systemimager.local/etc/default/si-client
> 2004-06-26 00:59:29.000000000 +0200
> >@@ -0,0 +1,7 @@
> >+## SystemImager client update
> >+
> >+# Change to 1 to enable 
> >+ENABLED=0
> >+
> >+# ImageServer to use
> >+SERVER=
> >diff -urN --exclude CVS
>
systemimager/etc/init.d/systemimager-client-updateimage
>
systemimager.local/etc/init.d/systemimager-client-updateimage
> >---
>
systemimager/etc/init.d/systemimager-client-updateimage
> 1970-01-01 01:00:00.000000000 +0100
> >+++
>
systemimager.local/etc/init.d/systemimager-client-updateimage
> 2004-06-26 00:54:41.000000000 +0200
> >@@ -0,0 +1,82 @@
> >+#! /bin/sh
> >+#
> >+#   Written 
> >+#       by Ghe Rivero <[EMAIL PROTECTED]>.
> >+#
> >+#   $Id: systemimager-client-update,v 0.1
> 2004/06/25 03:03:32 Ghe Rivero Exp $
> >+#
> >+# description: Updates the client with the last
> SystemImager image available
> >+#
> >+# Support for LSB compliant init system:
> >+### BEGIN INIT INFO
> >+# Provides: systemimager
> >+# Required-Start: $network $syslog
> >+# Required-Stop:
> >+# Default-Start:  3 5
> >+# Default-Stop:   0 1 2 6
> >+# Short-Description: Updates the client with the
> last SystemImager image
> >+# Description: connects to the SystemImager server
> and look for
> >+#                                           a new image to retrive it.
> >+#
> >+### END INIT INFO
> >+
> >+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
> >+DESC="SystemImager update client system"
> >+
> >+TMPDIR=`mktemp -d /tmp/si-client.XXXXXX` || exit 1
> >+
> >+test -f /etc/default/si-client && .
> /etc/default/si-client
> >+
> >+test "$ENABLED" != "0" || exit 0
> >+
> >+set -e
> >+
> >+case "$1" in
> >+  start)
> >+    echo  -n "Starting $DESC: "
> >+    
> >+    test -f /etc/systemimager/IMAGE_RETRIEVAL_TIME &&
> LAST_RETRIEVAL_TIME=`cat
> /etc/systemimager/IMAGE_RETRIEVAL_TIME`
> >+    
> >+    if [ -f /etc/systemimager/IMAGE_LAST_SYNCED_TO ]
> >+    then
> >+            IMAGE=`cat
> /etc/systemimager/IMAGE_LAST_SYNCED_TO`
> >+    else
> >+            echo 
> "/etc/systemimager/IMAGE_LAST_SYNCED_TO not found"
> >+            exit 1;
> >+    fi
> >+    
> >+    rsync
>
$SERVER:$IMAGE//etc/systemimager/IMAGE_RETRIEVAL_TIME
> $TMPDIR/IMAGE_RETRIEVAL_TIME --timeout=5 -c
> >+    
> >+    test -f $TMPDIR/IMAGE_RETRIEVAL_TIME &&
> NEW_RETRIEVAL_TIME=`cat
> $TMPDIR/IMAGE_RETRIEVAL_TIME`
> >+
> >+    if [ -z "$NEW_RETRIEVAL_TIME" ]
> >+    then 
> >+            echo "No update available"
> >+    fi
> >+    
> >+    if [  "$LAST_RETRIEVAL_TIME" -ne
> "$NEW_RETRIEVAL_TIME" ]
> >+    then
> >+            updateclient -server $SERVER -image $IMAGE
> >+    else
> >+            echo "Already updated"
> >+    fi
> >+    ;;
> >+
> >+  stop)
> >+    echo "Stopping $DESC: "
> >+    ;;
> >+
> >+  restart|force-reload)
> >+    $0 stop
> >+    sleep 1
> >+    $1 start
> >+    
> >+    ;;
> >+
> >+  *)
> >+    echo "Usage: $1 {start|stop|restart|orce-reload}"
> >&2
> >+    exit 1
> >+    ;;
> >+esac
> >+
> >+exit 0
> >Los ficheros
>
systemimager/etc/init.d/.systemimager-client-updateimage.swp
> y
>
systemimager.local/etc/init.d/.systemimager-client-updateimage.swp
> son distintos
> >diff -urN --exclude CVS
> systemimager/lib/SystemImager/Options.pm
> systemimager.local/lib/SystemImager/Options.pm
> >--- systemimager/lib/SystemImager/Options.pm
> 2004-06-26 00:51:12.000000000 +0200
> >+++ systemimager.local/lib/SystemImager/Options.pm
> 2004-06-26 00:55:41.000000000 +0200
> >@@ -27,6 +27,8 @@
> > #   pushupdate_options_header
> > #   updateclient_options_body
> > #   updateclient_options_header
> >+#   touchimage_options_body
> >+#   touchimage_options_header
> > #
> >
>
################################################################################
> > 
> >@@ -433,6 +435,38 @@
> > EOF
> > }
> > 
> >+#
> >+# Usage:
> >+#
> >+#   $help = $help .
> SystemImager::Options->touchimage_options_header();
> >+#
> >+sub touchimage_options_header {
> >+
> 
=== message truncated === 


                
______________________________________________
Yahoo! lanza su nueva tecnología de búsquedas
¿te atreves a comparar?
http://busquedas.yahoo.es


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Sisuite-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to