#!/bin/sh ######################### ATTENTION !!! ############################## # # # Cette bibliothèque est Copyright (C) Centre de Ressources # # Informatiques - AED - Conseil Général de la Haute Savoie # # Ce programme est Copyright (C) Fabien Salvi # # # # Cette bibliothèque est distribuée sous la Licence 2 GNU GPL # # Cette bibliothèque est distribuée car potentiellement utile mais # # SANS AUCUNE GARANTIE, ni explicite, ni implicite, y compris les # # garanties de commercialisation ou d'adaptation dans un but # # spécifique. Reportez vous à la Licence Publique Générale GNU pour # # plus de détails. # # # ###################################################################### ############################ WARNING !!! ############################# # # # This Library is Copyright (C) Centre de Ressources Informatiques # # - AED - Conseil Général de la Haute Savoie # # This program is Copyright (C) Fabien Salvi # # # # This Library is distributed under GNU GPL License 2. # # This Libray is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # See the GPL.txt file for more information about the license. # # # ###################################################################### ###################################################################### # Prog: aptgetli # # $@PROG@-@Version@$: 1.00 # # Created By: fabien@cri74.org # # Date: 21/07/1999 # # Last modification: 01/02/2000 # # Description: installation script for PingOO distribution # ###################################################################### error_exit () { echo "" echo "==============================" echo "Process is stopped, problem..." if [ "$INSTALL_SUPPORT" = cdrom ] then sleep 4 umount /cdrom [ $? -ne 0 ] && error_exit echo "cd-rom unmounted..." fi exit 1 } echo "Installing the PingOO system..." HOSTNAME=`grep "^HOSTNAME" /etc/PingOO/PingOO.conf |awk -F ' = ' '{print $2}'` INSTALL_SUPPORT=`grep "^INSTALL_SUPPORT" /etc/PingOO/PingOO.conf |awk -F ' = ' '{print $2}'` INSTALL_ADDRESS_1=`grep "^INSTALL_ADDRESS_1" /etc/PingOO/PingOO.conf |awk -F ' = ' '{print $2}'` INSTALL_ADDRESS_2=`grep "^INSTALL_ADDRESS_2" /etc/PingOO/PingOO.conf |awk -F ' = ' '{print $2}'` INSTALL_ADDRESS_3=`grep "^INSTALL_ADDRESS_3" /etc/PingOO/PingOO.conf |awk -F ' = ' '{print $2}'` echo "Installation support : $INSTALL_SUPPORT " if [ "$INSTALL_SUPPORT" = cdrom ] then echo "Put the PingOO cdrom in the drive and press Enter : " read tmp mount -t iso9660 /dev/cdrom /cdrom [ $? -ne 0 ] && error_exit echo "OK..." fi echo "write the sources.list for apt-get" if [ -z "$INSTALL_ADDRESS_1" ] then echo "Problem with your PingOO.conf at install section" echo "Installation aborted" exit 1 else echo "deb $INSTALL_ADDRESS_1" > /etc/apt/sources.list fi if [ ! -z "$INSTALL_ADDRESS_2" ] then echo "deb $INSTALL_ADDRESS_2" >> /etc/apt/sources.list fi if [ ! -z "$INSTALL_ADDRESS_3" ] then echo "deb $INSTALL_ADDRESS_3" >> /etc/apt/sources.list fi echo "Start installation from :" cat /etc/apt/sources.list echo "---------------------------------------------------------" apt-get -y update [ $? -ne 0 ] && error_exit ### here is the install for the packages from perl-base to sympa... echo "" for pkg_to_install in `cat /root/PingOO/listpkgs` do echo "installing $pkg_to_install ..." apt-get -y install $pkg_to_install [ $? -ne 0 ] && error_exit echo "$pkg_to_install installed !" echo "" done ########################## ## PCMCIA purge ######### echo "removing pcmcia ..." dpkg --purge pcmcia-cs ################## ### kbd modification ###### echo "installing patch-kbd ..." apt-get -y install patch-kbd [ $? -ne 0 ] && error_exit echo "patch-kbd installed !" ############## # install the new kernel echo "installing the new linux kernel" apt-get install -y kernel-image-2.2.16 [ $? -ne 0 ] && error_exit echo "linux kernel installed !" ########### # install pingoorouter-base echo "installing pingoorouter-base ..." apt-get -y install pingoorouter-base [ $? -ne 0 ] && error_exit echo "pingoorouter-base installed !" ################ # ISDN configuration # package isdnutils # package isdnconfig # package ibod echo "installing ibod ..." apt-get -y install ibod [ $? -ne 0 ] && error_exit echo "ibod installed !" echo "installing isdnutils ..." apt-get -y install isdnutils [ $? -ne 0 ] && error_exit echo "isdnutils installed !" echo "installing isdnconfig ..." apt-get -y install isdnconfig [ $? -ne 0 ] && error_exit echo "isdnconfig installed !" ############### # network configuration # - /etc/init.d/network # - /etc/resolv.conf # just before reboot !! # echo "installing ipconfig ..." apt-get -y install ipconfig [ $? -ne 0 ] && error_exit echo "ipconfig installed !" echo "removing /etc/resolv.conf" rm -f /etc/resolv.conf ############## apt-get clean if [ "$INSTALL_SUPPORT" = cdrom ] then sleep 4 umount /cdrom [ $? -ne 0 ] && error_exit echo "cd-rom unmounted..." fi echo "Remove cd-rom and floppy-disk and press Enter : " read tmp2 echo "Installation finished !!!!" echo "****************************" echo "You must reboot the machine now !!"