ora è sottocarica,ma domani devo installarlo,però ho un problema con dei cavi:
nella confezione ho trovato il cavo per alimentatre il gruppo già è in uso.
un cavo per il fax o altro a me non serve.
un cavo che dovrebbe essere " cavo seriale rs232 " che se non sbaglio va dalla scheda madre al gruppo.
e un cavo che è identico a quello per alimentare il pc normalmente.
Però a parte il fatto che non saprei se questi ultimi 2 cavi (in rosso) forse hanno la stessa funzione, il gruppo ha solo un'uscita 220 v dove io dovrei ,o collegare il monitor
o il cavo che è simile a quello che alimenta il pc.
Nel libretto sta solo scritto :
connettere il cavo seriale alle porte rs232 del pc e dell'ups (opzionale per alcuni modelli).
In parole povere dalla scheda madre al gruppo,allora è questo cavo che alimenta il pc quando va via la corrente?
Se così fosse allora posso collegare il cavo di alimentazione del monitor all'uscita 220 del gruppo,che fra l'altro è l'unica.
poi ho trovato un cd che contiene diversi file,ma quello che interessa dovrebbe essere
install ,da propietà vedo: tipo Script shell (application/x-shellscript)
che se provo ad eseguire sia da terminale o con esegui ,nemmeno funziona forse perchè il cd non è inserito,però io ho copiato dal cd alla scrivania tutto il pacchetto che riguardava linux.
comunque l'ho aperto con gedit,e lo copio qui magari qualcuno nota qualche problema.
Codice: Seleziona tutto
#!/bin/sh
#
#
PROG=rupsd
INSTALL_DIR=`pwd`
PROGRAM_DIR=/etc/rups
VERSION=3.0
#Make sure which one module to be install according to current OS version
RUPSOFFMODULE="rupsoff"
KERNEL=$(uname -r)
KERNELVER=$KERNEL
KERNEL=${KERNEL%%-*}
KERNEL=${KERNEL%.*}
KERNEL=$((${KERNEL%%.*}*10+${KERNEL##*.}))
if [ $KERNEL -ge 23 ]
then
RUPSOFFMODULE=${RUPSOFFMODULE}24.o
else
if [ "${KERNELVER%*smp}" = "${KERNELVER}" ]; then
RUPSOFFMODULE="rupsoffup"
else
RUPSOFFMODULE="rupsoffsmp"
fi
RUPSOFFMODULE=${RUPSOFFMODULE}22.o
fi
echo $RUPSOFFMODULE
echo "Linux 2.x INSTALL FOR RUPS"
#
# Must run this script as root
#
uid=`id | sed 's/^uid=\([0-9][0-9]*\).*$/\1/'`
if [ $uid -ne 0 ]; then
echo "Not running as root -- Installation terminated."
exit 1
fi
#
# Check source files
#
if [ ! -s $INSTALL_DIR/rupsd ];then
echo "Missing File Error: $INSTALL_DIR/rupsd does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/rupsc ];then
echo "Missing File Error: $INSTALL_DIR/rupsc does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/rups.ini ];then
echo "Missing File Error: $INSTALL_DIR/rups.ini does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/shutdown.ini ];then
echo "Missing File Error: $INSTALL_DIR/shutdown.ini does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/preshut.bat ];then
echo "Missing File Error: $INSTALL_DIR/preshut.bat does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/startup.add ];then
echo "Missing File Error: $INSTALL_DIR/startup.add does not exist."
exit 2
fi
#if [ ! -f $INSTALL_DIR/readme.doc ];then
# echo "Missing File Warning: $INSTALL_DIR/readme.doc does not exist."
#fi
if [ ! -s $INSTALL_DIR/snmp.mib ];then
echo "Missing File Error: $INSTALL_DIR/snmp.mib does not exist."
exit 2
fi
if [ ! -s $INSTALL_DIR/$RUPSOFFMODULE ];then
echo "Missing File Error: $INSTALL_DIR/$RUPSOFFMODULE does not exist."
exit 2
fi
#
# Figure out what sort of unix this is
#
UNAME=""
if [ -f /usr/bin/uname ]; then
UNAME=`/usr/bin/uname`
fi
if [ -f /bin/uname ]; then
UNAME=`/bin/uname`
fi
#
#
if [ $UNAME = "Linux" ]; then
echo ""
else
echo "OS ERROR: The detected OS is $UNAME, these programs need to run under Linux."
exit 1
fi
#
# Check and backup previous installation if exists.
#
echo "RUPS version $VERSION will be installed to the directory $PROGRAM_DIR."
answer=""
if [ -s /etc/rups/rupsd ] || [ -s /etc/rups/rupsc ] || [ -s /etc/rups/readme.doc ] || [ -s /etc/rups/rups.ini ] || [ -s /etc/rups/shutdown.ini ]; then
echo "Found an exiting installation of rups!"
while true
do
echo -n " Do you want to backup them?(y)es, (n)o, (c)ancel. [y] "
read answer
if [ $answer ]; then
echo ""
else
answer="y"
fi
if [ $answer = "y" ] || [ $answer = "Y" ]; then
echo "The previous installation /etc/rups is moved to /etc/rups.old"
\rm -rf /etc/rups.old 2> /dev/null
mv -f /etc/rups /etc/rups.old
break
elif [ $answer = "n" ] || [ $answer = "N" ]; then
break
elif [ $answer = "c" ] || [ $answer = "C" ]; then
exit 0
else
echo "Invalid input."
fi
done
fi
#
#
#
echo ""
echo "Installing $PROG ..."
{
if [ ! -d $PROGRAM_DIR ]; then
echo ""
echo "Create $PROGRAM_DIR directory..."
mkdir $PROGRAM_DIR
fi
cd $PROGRAM_DIR
echo ""
echo -n "Moving files from $INSTALL_DIR to $PROGRAM_DIR "
cp $INSTALL_DIR/rupsd $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/rupsc $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/rups.ini $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/shutdown.ini $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/preshut.bat $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/snmp.mib $PROGRAM_DIR 2> /dev/null
echo -n "."
cp $INSTALL_DIR/$RUPSOFFMODULE $PROGRAM_DIR/rupsoff.o 2> /dev/null
echo -n "."
echo "OK."
chmod 544 $PROGRAM_DIR/rupsd 2> /dev/null
chmod 555 $PROGRAM_DIR/rupsc 2> /dev/null
chmod 544 $PROGRAM_DIR/rups.ini 2> /dev/null
chmod 544 $PROGRAM_DIR/shutdown.ini 2> /dev/null
chmod 544 $PROGRAM_DIR/preshut.bat 2> /dev/null
chmod 544 $PROGRAM_DIR/snmp.mib 2> /dev/null
chmod 544 $PROGRAM_DIR/rupsoff.o 2> /dev/null
}
{
echo ""
STARTUP=/etc/rc.d/rc.local
STARTUP_ADD=${INSTALL_DIR}/startup.add
echo "Adding entries in $STARTUP ...."
rm $INSTALL_DIR/startup.tmp 2> /dev/null
diff $STARTUP $STARTUP_ADD | egrep '^<' | sed 's/^< //' > startup.tmp
difference=""
#difference=`diff $STARTUP startup.tmp | sed 1q`
difference=`grep '/etc/rups/rupsd' ${STARTUP} | awk '{print $1}'`
if [ $difference ]; then
echo "Found an old version for rups installation in $STARTUP startup file."
answer=""
while true
do
echo -n "Would you like to see them? [n] "
read answer
if [ $answer ]; then
if [ $answer = "y" ] || [ $answer = "Y" ]; then
echo "The following contain in 1 is the old installation:"
cat $STARTUP_ADD
break
elif [ $answer != "n" ] && [ $answer != "N" ]; then
echo "Invalid Input"
else
break
fi
else
break
fi
done
echo ""
echo "Backup $STARTUP to ${STARTUP}.old.rups."
cp $STARTUP ${STARTUP}.old.rups
cp startup.tmp $STARTUP
chmod 744 $STARTUP
else
echo ""
echo "Backup $STARTUP to ${STARTUP}.old.rups"
cp $STARTUP ${STARTUP}.old.rups
fi
echo "Adding startup command to $STARTUP startup file."
cat $STARTUP_ADD >> $STARTUP
echo "OK."
sleep 2
}
#make a char device to swap data
rm -rf /dev/Mega_UPS
mknod /dev/Mega_UPS c 231 64
# Start rupsd.
{
echo ""
echo "Configure the parameter."
sleep 1
/etc/rups/rupsc config
sleep 2
echo ""
echo "Start rupsd background process... "
/sbin/insmod -f /etc/rups/rupsoff.o
/etc/rups/rupsc start
}
cd $INSTALL_DIR
sleep 1
echo "Done."
exit 0
