bondua@hotmail.
bonjour,
je suis un linuxien qui vient des distrib debian et mandriva
j'ai un logiciel d'antispam Brightmail de Symantec "SMSSMTP 5.0"
lorsque je lance l'install ./install sous ma debian 3.1
il me jette, il me dit redhat enterpriseAS/ES 3 only
Si je mets une fedora 5 est ce que cela va passer?
En gros est ce que les répertoires sont à la même place, même gestion des paquets...
merci d'avance
bondua@hotmail.
#!/bin/sh
#
# Copyright 2003-2006 Symantec Corporation. All Rights Reserved.
#
# This product is protected by U.S. and International Copyright and
# distributed under license restricting copying and distributing.
#
# ALL SOFTWARE, SERVICES, AND DOCUMENTATION PRODUCED FROM THIS CODE
# ARE BEING PROVIDED "AS IS". SYMANTEC CORPORATION (SYMANTEC) MAKES NO
# REPRESENTATION OR WARRANTY OF ANY KIND WHETHER EXPRESS OR IMPLIED
# (EITHER IN FACT OR BY OPERATION OF LAW) WITH RESPECT TO THE SOFTWARE
# GENERATED FROM THIS CODE. SYMANTEC EXPRESSLY DISCLAIMS ALL IMPLIED
# WARRANTIES, INCLUDING WITHOUT LIMITATION, THOSE OF NONINFRINGEMENT,
# MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. SYMANTEC DOES NOT
# WARRANT THAT THIS CODE WILL BE ERROR-FREE, SECURE, OR UNINTERRUPTED.
#
# File Name : install
# Description : wrapper script for java installer
# Original Author : Mark Lim
# Current Owner : Shari Brooks
# RCSID : $Id: install,v 1.21 2006/04/17 20:19:36 lim Exp $
#
#--- BASIC VARIABLES ----------------------------------------------------------
# what the user till choose to install.
MY_INSTALLER=
MY_2nd_INSTALLER=
# these variables control some UI.
MY_ACRO=
PLEASE_SELECT=1
# operating-system and installer compatibility.
UNSUPPORTED_OS=
REDHAT_RELEASE=/etc/redhat-release
SUSE_RELEASE=/etc/SuSE-release
OSYS=`uname -s`
ERROR=0
#--- SUBS ---------------------------------------------------------------------
# suppress echoing newlines
echo_nolf()
{
echostr=$1
shift
case $OSYS in
SunOS|solaris) echo "$echostr c" 1>&2;;
*) echo -n "$echostr " 1>&2;;
esac
}
# try to find the compat library in rpm. if it isn't there,
# let the user know they have to get it from their installation cd's.
detectCompatLib()
{
PACKAGE_NAME=compat-libstdc++
# echo_nolf "Detecting required compatibility library..."
rpm -q $PACKAGE_NAME 1> /dev/null
rv=$?
if [ "$OPTION1" = "-silent" -a $rv -ne 0 ]; then
echo "compat-libstdc++-7.3-2.96.122.i386.rpm is not on this machine" > ./error_log.txt
echo "Please install the compat-libstdc++ library before continuing." >> ./error_log.txt
exit 1
fi
if [ -f $REDHAT_RELEASE ]; then
if [ $rv -ne 0 ]; then
echo ""
echo "The compat-libstdc++ library is not on this machine."
echo "Would you like to install it at this time? [yn] (N)"
read answer
if [ "$answer" = y -o "$answer" = Y ]; then
# install compat-libstdc++
echo "installing compat-libstdc++"
rpm -Uvh ./tools/compat-libstdc++-7.3-2.96.122.i386.rpm
else
echo "Installer will exit now. Install compat-libstdc++ before"
echo "installing Symantec Mail Security for SMTP 5.0"
exit 0
fi
fi
# else there is a compatibility library. Redhat should be fine.
# if not Redhat release, check if libstdc++-libc6.2.2.so.3 is present
else
echo "checking for libstdc++-libc6.2.2.so.3"
./foo 2> /dev/null
if [ $? -ne 0 ]; then
echo "libstdc++-libc6.2.2.so needs to be installed for the"
echo "Installer to continue. Please install it before installing"
echo "Symantec Mail Security for SMTP 5.0."
fi
fi
}
#Check to see if rpm-build package is installed
detectRpmBuild()
{
PACKAGE_BUILD=rpm-build
rpm -q $PACKAGE_BUILD 1> /dev/null
rv=$?
if [ $rv -ne 0 -a "$OPTION1" = "-silent" ]; then
echo "Package rpm-build is not present on this machine. This will generate" > error_log.txt
echo "some warning messages in the installation log, install_log.txt, but" >>error_log.txt
echo "will not cause any issues with the installation itself." >>error_log.txt
echo "Since this is a silent installation, the installation will continue." >> error_log.txt
echo "" >> error_log.txt
fi
if [ $rv -ne 0 -a "$OPTION1" != "-silent" ]; then
echo ""
echo "Package rpm-build is not present on this machine. This will generate"
echo "some warning messages in the installation log, install_log.txt, but"
echo "will not cause any issues with the installation itself."
echo "Would you like to continue with the install at this time? [yn] (Y)"
read answer
if [ "$answer" = n -o "$answer" = N ]; then
echo "Installer will exit now."
exit 0
fi
fi
}
#Check to see if the options file is valid
validify()
{
optfile=$OPTION3
#strip the comments
internal_optfile=`cat $optfile | sed /^#/d`
#accept license must exist and be true
echo $internal_optfile | grep '-V LICENSE_ACCEPT_BUTTON="[Tt][Rr][Uu][Ee]"' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "LICENSE_ACCEPT_BUTTON must be true" >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
#reject license must exist and be false
echo $internal_optfile | grep '-V LICENSE_REJECT_BUTTON="[Ff][Aa][Ll][Ss][Ee]"' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "LICENSE_REJECT_BUTTON must be false" >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
#the path must exist and be absolute
echo $internal_optfile | egrep '-P installLocation="/.+"' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "Installation location must be absolute path." >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
#it must be a custom install when silent
#this options file line should never be touched
echo $internal_optfile | grep '-V IS_SELECTED_INSTALLATION_TYPE=custom' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "installation type must be custom. Don't touch that line." >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
#the installation options must exist and have values true or false
echo $internal_optfile | egrep '-P feature1.active=([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "feature1 must have a value of either true or false." >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
echo $internal_optfile | egrep '-P bean32.active=([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])' > /dev/null 2>&1
rv=$?
if [ $rv -ne 0 ]; then
echo "bean32 must have a value of either true or false." >> ./error_log.txt
echo "" >> ./error_log.txt
ERROR=1
fi
true
}
# promptUser "default-value" "Prompt string to present to user?"
#
promptUser()
{
default=$1
shift
echo_nolf "$*"
if [ -n "$default" ] ; then
echo_nolf "["$default"]"
fi
read var
if [ "$var" = "" ]; then
echo $default
else
echo $var
fi
}
# echo script usage
usage()
{
exitval=$1
echo "Usage: invoke as root: install [-silent -options options.txt]"
echo " where '-silent' will launch a silent installer"
echo " and the options file will specify the values."
echo " -silent and -options options have to be used in conjunction"
echo " -silent option will not work if -options with an option file is not specified"
echo ""
echo "Usage: invoke as root: install [-swing]"
echo " where '-swing' will launch a GUI installer"
echo ""
echo "If no arguments are specified, will launch a console installer."
echo ""
exit $exitval
}
#--- MAIN ---------------------------------------------------------------------
#
# the only acceptable commandline arguments are "-silent -options options.txt"
# which are passed into the zerog installer.
if [ $# -eq 1 ]; then
if [ "$1" != "-swing" ]; then
case "$1" in
-?|-h|-help|--help)
usage 0
;;
*)
usage 1
;;
esac
fi
elif [ $# -eq 2 ]; then
usage 1
elif [ $# -eq 3 ]; then
if [ "$1" != "-silent" ]; then
usage 1
elif [ "$2" != "-options" ]; then
usage 1
else
if [ ! -f "$3" ]; then
echo "$3 does not exist"
usage 1
else
if [ ! -r "$3" ]; then
echo "options file is not readable"
fi
fi
fi
elif [ $# -gt 3 ]; then
usage 1
fi
OPTION1=$1
# you must be root to run installer.
id | egrep "uid=0(" 1> /dev/null
if [ $? -ne 0 ]; then
echo "You must be root to run the Symantec Mail Security for SMTP 5.0 Installer."
exit 0
fi
# ascertain which installers are present, and if OS is supported.
case $OSYS in
Linux)
if [ -f $REDHAT_RELEASE ]; then
# check for AS 3 or ES 3
egrep -i -e "[AE]S release 3" $REDHAT_RELEASE 1> /dev/null ||
UNSUPPORTED_OS="[AE]S release 3"
elif [ -f $SUSE_RELEASE ]; then
egrep -e "8.|9." $SUSE_RELEASE 1> /dev/null ||
UNSUPPORTED_OS=`head -1 $SUSE_RELEASE | sed -e "s/(.*$//"`
else
UNSUPPORTED_OS="Linux other than Red Hat"
fi
SMSSMTP_INSTALLER=`ls smssmtp_install*.bin 2> /dev/null | grep -i ${OSYS}`;;
SunOS) OSYS="solaris"
pkginfo | grep SYMCsmtp 1> /dev/null
if [ $? -eq 0 ]; then
echo "You have Symantec Mail Security for SMTP 4.0 installed."
echo "Uninstall version 4.0 before installing version 5.0"
exit 0
fi
[ `uname -r | sed -e "s/^(.).*/1/"` -ne 5 ] && UNSUPPORTED_OS=`uname -s -r`
[ `uname -r | sed -e "s/[^.]*.([^.]*).*/1/"` -lt 9 ] && UNSUPPORTED_OS=`uname -s -r`
ARCH=`uname -p | sed -e "s/.*(86)/x1/g"`
SMSSMTP_INSTALLER=`ls smssmtp_install_*.bin 2> /dev/null | grep -i ${OSYS} | grep ${ARCH}`;;
esac
# if no approriate installer, or OS is not supported, exit
if [ $OSYS = "Linux" ]; then
if [ -n "${UNSUPPORTED_OS}" ]; then
echo "Redhat Enterprise Linux AS/ES 3 is the only supported"
echo "LINUX platform for Symantec Mail Security for SMTP."
exit 1
else
detectCompatLib
detectRpmBuild
fi
fi
if [ $OSYS = "solaris" ]; then
if [ -n "${UNSUPPORTED_OS}" ]; then
echo "Solaris 9 and Solaris 10 are the only supported"
echo "Solaris platforms for Symantec Mail Security for SMTP."
exit 1
fi
fi
if [ -z "${SMSSMTP_INSTALLER}" ]; then
echo "Cannot find a Symantec SMSSMTP Installer in current directory"
echo "for this OS/architecture; exiting."
exit 1
fi
# only one is present, that is the one to run.
if [ -n "${SMSSMTP_INSTALLER}" ]; then
MY_INSTALLER=${SMSSMTP_INSTALLER}
fi
if [ "$OPTION1" = "-silent" ]; then
OPTION3=$3
validify
if [ $ERROR -eq 1 ]; then
echo "Please fix the errors in the options file before installing SMS for SMTP 5.0." >> ./error_log.txt
exit 1
fi
fi
if [ $# -eq 0 ]; then
./$MY_INSTALLER
elif [ $# -eq 1 ]; then
./$MY_INSTALLER -swing
else
./$MY_INSTALLER $1 $2 $3
fi
bondua@hotmail.
Sinon, j'avais penser modifier le script pour qu'il fonctionne sur une debian (pas gagné)
je me suis donc dit que si j'installai une fedora le script aurait de schances de fonctionner.
Qu'en pensez vous?
slobberbone
salut,
à mon avis le mieux c'est d'essayer ...
installe une fedora sur ta debian avec Xen qemu ou encore vmware et ensuite regarde si ton logiciel s'installe...
bondua@hotmail.
J'ai enlevé
# if no approriate installer, or OS is not supported, exit
if [ $OSYS = "Linux" ]; then
if [ -n "${UNSUPPORTED_OS}" ]; then
echo "Redhat Enterprise Linux AS/ES 3 is the only supported"
echo "LINUX platform for Symantec Mail Security for SMTP."
exit 1
else
detectCompatLib
detectRpmBuild
fi
fi
et les deux fonctions:
detectRpmBuild()
detectCompatLib()
Comme cela il ne vérifie plus la version debian
mais lors de l'installattion il ne trouve pas mes utilisateurs et groupes que j'ai crée pour sms smtp.
et dans mon script je ne trouve pas l'endroit ou il recherche les users can you help me
bondua@hotmail.
c'est encore moi,
en fait ce script vérifie juste si les bon packages sont installé, l'os ...
Ma question premiere était
J'aimerai savoir si l'arborescence des fichiers, la gestion init, est ce que tout est vraiment comme sur une redhat avec une fedora?
slobberbone
Je pense que niveau de l'arborescence ca doit etre identique mais je n'en suis pas sûr ...
si tu veux avoir les plus grandes chances, utilises
CentOS, c'est exactement une red hat entreprise ...
C'est là que tu aurras le plus de chance de compatibilité ... sans trop t'embeter !?
celmir
comme Fedora sert de labo de test pour Redhat Enterprise Linux, on peut supposer que les arborescences sont très très proches 🙂
rscreation
VINDICATORs
Ce n'est pas au niveau de la compatibilité que ça joue, mais au niveau qu'a ton programme pour reconnaitre les distributions qui doit être limité à la RH! il suffirait sans doute de lui faire croire que tu a une RH entreprise pour le faire tourner!
C'est sans doute l'habitude de croire qu'il n'existe qu'une version d'un système d'exploitation... encore des restes de mindoms qui ont du mal à partire au lavage!
Par contre la RH entreprise ne doit pas avoir de grandes différence au niveau de l'arbo etc... c'est surtout plus fiabilisé avec des programmes supplémentaires à valeur ajouté et un support pro!
bondua@hotmail.
merci
j'ai réussi a court circuiter la vérif du noyau.
l'installateur démarre
j'accepte les licences
et paf lors de l'install, il me dit qu'il ne trouve pas mes users et group qui vont etre utilisées par symantec mail security for smtp 5.0.
Alors qu'ils sont bien crées
A votre avis pourquoi?
les users ne sont pas gérés de la même manière sur une redhat/fedora?
celmir
Il n'y a pas de différence fondamentale entre RHEL et FEDORA, mais donc cela de coté.
Ppose des marques dans ton script (un simple echo 'marquex') pour trouver l'endroit ou tu as ton problème.
eddy33
@celmir
+1
@bondua@hotmail.
Tu dois adapter ton script et "squeezer" les tests lies a RedHat...
++
remi
Pour les binaires en générals pas de problème, souvent à condition d'installer les bibliothèques de compatibilité car Fedora et trés en avance sur RHEL : RHEL3 proche de RH9/FC1, RHEL4 proche de FC3.
Le meilleur exemple est probablement Oracle.
Le problème vient souvent des programmes qui livrent des modules pré-compilés pour le noyaux...
A+