Forum Linux.suse modification autorun

Posté par . Licence CC By‐SA.
Étiquettes : aucune
0
4
nov.
2019

Bonjour,

j'ai actuellement un suse entreprise server 15.1 qui tourne et je souhaite installer dessus un logiciel (IPBX virtuel).
ce logiciel vérifie au démarrage ma version de suse et ne veut pas se lancer (logiciel fait pour suse server 12)
d'aprés ce que je comprend la vérification se fait au niveau de l'autorun du soft
comment modifier cet autorun pour que mon logiciel s'installe ??

ci dessous l'autorun ... (pas génial le copier coller)

merci

#!/bin/sh
Script_DATE="2011-08-18"
run_level=`/sbin/runlevel | cut -d " " -f 2`
UserId=`id -u`
ThisDir=$(dirname "0ドル") 2>> /dev/null
DvdDir=$(readlink -e "$ThisDir") 2>> /dev/null
SLES_VERSION=`cat /etc/SuSE-release | grep "VERSION = 12"`
# check whether client is allowed to access X server DISPLAY
xdpyinfo > /dev/null 2>&1
XDISP=$?
if [ ! -e /etc/SuSE-release ]
then
 if [ -n "$WINDOWID" ]
 then
 echo "Invalid operating system detected."
 echo "SuSE Linux Enterprise Server 11 SP1 is required."
 else
 xterm -geometry 48x6+0+0 -fa helv -fs 11 -title "Error" -e "echo \"Invalid operating system detected.\";\
 echo -e \"SuSE Linux Enterprise Server 11 SP1 is required.\n\";\
 echo -e \"(This window will close automatically.)\";\
 sleep 5"
 fi
 exit 1
fi
if [ $run_level -eq 5 ] && [ "0" == "${XDISP}" ]
then
 [ -d /tmp/installation ] && rm -r /tmp/installation 2> /dev/null # delete directory of former installation
 mkdir -p /tmp/installation
 if [ -d /tmp/installation ]
 then
 cp "${DvdDir}/installation/install.sh" /tmp/installation 2> /dev/null
 if [ -z "$SLES_VERSION" ] 2> /dev/zero
 then
 cp -r "${DvdDir}/installation/bin" /tmp/installation 2> /dev/null
 else
 cp -r "${DvdDir}/installation/bin/64bit" /tmp/installation/64bit 2> /dev/null
 fi 
 cd /tmp
 else
 if [ -n "$WINDOWID" ]
 then
 echo "Can not open temporary directory /tmp."
 echo -e "Abort of the installation.\n"
 else
 xterm -geometry 48x6+0+0 -fa helv -fs 11 -title "Error" -e "echo \"Can not open temporary directory /tmp.\";\
 echo -e \"Abort of the installation.\n\";\
 echo -e \"(This window will close automatically.)\";\
 sleep 5"
 fi
 exit 2
 fi
 PARM=""
 /tmp/installation/bin/CheckGtk 2>> /dev/null
 if [ $? -eq 1 ]
 then
 PARM="-iconic"
 fi
 if [ $UserId -ne 0 ]
 then
 xterm -geometry 100x28+0+0 -fa helv -fs 11 -title "UC Installation" -e "echo -n 'root ' ;\
 su -c \"/tmp/installation/install.sh '$DvdDir'\"" &
 else
 xterm $PARM -geometry 100x28+0+0 -fa helv -fs 11 -title "UC Installation" -e "/tmp/installation/install.sh '$DvdDir'" &
 fi
else
 echo -e "\nPlease start the setup with install.sh (in the installation directory).\n"
fi
exit 0
  • # À vue de pif...

    Posté par . Évalué à 1.

    Comme ça, à vue de nez, je ferais une copie du script dans un coin, au cas où puis, je virerais tout ça du script. Ça devrait le faire

    if [ ! -e /etc/SuSE-release ]
    then
    if [ -n "$WINDOWID" ]
    then
    echo "Invalid operating system detected."
    echo "SuSE Linux Enterprise Server 11 SP1 is required."
    else
    xterm -geometry 48x6+0+0 -fa helv -fs 11 -title "Error" -e "echo \"Invalid operating system detected.\";\
    echo -e \"SuSE Linux Enterprise Server 11 SP1 is required.\n\";\
    echo -e \"(This window will close automatically.)\";\
    sleep 5"
    fi
    exit 1
    fi

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.