I'm fine with the idea, but have modified the message a bit, and have
reduced the number of ping attempts to seven.  I figure, if we're not
actually going to fail, but are going to proceed anyway, it's just an
informative thing to give someone a "happy it's working" feeling, so if
it hasn't succeeded in 7 pings, let's not delay the install any longer.


Here's the fresh code snippet:

    while [ "$PING_EXIT_STATUS" != "0" ]
    do
        echo "PING ATTEMPT $PING_COUNT: "
        ping -c 1 $IMAGESERVER; PING_EXIT_STATUS=$?; PING_COUNT=$(( $PING_COUNT + 1 ))
        if [ "$PING_COUNT" = "7" ]; then
            echo
            echo "  WARNING:  Cannot ping the image server \"$IMAGESERVER\""
            echo "            Despite this seemingly depressing result, I will attempt"
            echo "            to proceed with the install.  Your imageserver may be"
            echo "            configured to not respond to pings, but it wouldn't hurt"
            echo "            to double check that your networking equipment is"
            echo "            working properly!"
            echo
            sleep 5
        fi
    done

    if [ "$PING_EXIT_STATUS" = "0" ]; then
        echo
        echo "  We have connectivity to the Image Server!"
    fi


Cheers, -Brian



Thus spake Dann Frazier ([EMAIL PROTECTED]):
> On Tue, Aug 26, 2003 at 07:26:50PM +0100, Dan wrote:
> > Having a slight suspicion that shouting at them won't help the situation (and
> > expecting the decision not to be reversed) I would be very grateful for a
> > pointer on how to modify the installation CD in order to remove the requirement
> > to ping the image server prior to installation (if this is possible).
> 
> actually... it would make sense to me if the client code just went ahead
> and tried the install, even if the ping failed.  the reason we added
> the ping was to make some switches aware of our existance, iirc.
> 
> i just committed this patch - Brian: feel free to revert if you
> disagree.
> 
> --- functions 19 Aug 2003 22:23:25 -0000      1.32
> +++ functions 28 Aug 2003 06:43:17 -0000
> @@ -658,11 +658,10 @@ ping_test() {
>          ping -c 1 $IMAGESERVER; PING_EXIT_STATUS=$?; PING_COUNT=$(( $PING_COUNT + 1 
> ))
>          if [ "$PING_COUNT" = "21" ]; then
>              echo
> -            echo "  FATAL:  Cannot ping the image server \"$IMAGESERVER\""
> -            echo "          Be sure that your networking equipment is"
> -            echo "          working properly!"
> +            echo "  WARNING:  Cannot ping the image server \"$IMAGESERVER\""
> +            echo "            Be sure that your networking equipment is"
> +            echo "            working properly!"
>              echo
> -            shellout
>          fi
>      done
>  
> 
> Dan: anyway, this code is in /etc/init.d/functions, in the
> initrd.img file.  you need to crack it open, copy the contents elsewhere, 
> make your change & regen a new initrd.img.
> 
> something like this:
> 
> cd /usr/share/systemimager/boot/i386/standard
> cp initrd.img initrd.img.bak
> gunzip < initrd.img > initrd
> mkdir /mnt/tmp
> mount initrd /mnt/tmp -o loop
> mkdir /tmp/initrd
> cp -a /mnt/tmp/* /tmp/initrd
> cd /tmp/initrd
> <make your changes in this tree>
> mkinitrd /tmp/initrd /tmp/initrd.img
> cd -
> mv /tmp/initrd.img .
> 

-- 
---------------------------------------------------------
 Brian Elliott Finley                Phone: 630.803.8183
 GPG: 3FF8 D096 0E0C D3F3 29B7  6518 D20B 1931 10F8 EE52
---------------------------------------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Sisuite-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to