#!/bin/bash
# (c) 2002-2003 Newisys, Inc.  All rights reserved.
#
# Example shell script to load the entire configuration from one Service Processor to
# a set of other Service Processors.
#
# Requires: 
#    sp-ips.txt file with list of IP addresses for each target Service Processor. 
#    To be run from SSH client. 
# See documentation for more information about commands.
#
source_sp=10.10.30.206
echo "Loading settings using $source_sp"
for ip in `cat sp-ips.txt` ; do
   echo "Processing IP: $ip";
   ssh $ip sp load settings --sp $source_sp
    if [ $? != 0 ]; then
      echo Error loading settings for SP $ip 
    fi   
done
