[Gllug] mepis (now Ubuntu) wireless error

co at byintelligentdesign.co.uk co at byintelligentdesign.co.uk
Fri Feb 16 13:22:18 UTC 2007


Ok, losing the will to live now. Latest error is:

./install_rt61_rt73.sh: line 158: make: command not found

this is lines 158 and 159:

if [ $variant = 73 ]
then

This is ./install_rt61_rt73.sh:

#!/bin/bash

prepare_for_debian() {
     # make sure we have the tools we need to build kernel modules...
     # apt-get install build-essential
     kern=`uname -r`
     apt-get install linux-headers-$kern
}

complete_debian_installation() {
   VAR=$1
   if [ $VAR = 61 ]
     then
       device=ra0
     else
       device=rausb0
   fi
   text="#\niface $device inet dhcp\n#\n"
   grep -q $device /etc/network/interfaces
   if [ $? != 0 ]
     then
       echo -e "$text" >>/etc/network/interfaces
   fi
}

prepare_for_non_debian() {
     # check that we have the tools we need to build kernel modules...
     which make >/dev/null 2>&1
     make_result=$?
     which gcc >/dev/null 2>&1
     gcc_result=$?
     if [ $make_result != 0 -o $gcc_result != 0 ]
       then
         echo "You need to have installed both make and gcc, aborting..."
         exit 1
     fi
}

complete_redhat_installation() {
   VAR=$1
   if [ $VAR = 61 ]
     then
       device=ra0
       text="# RaLink RT2761/RT73 802.11g  
USB\nDEVICE=ra0\nONBOOT=no\nBOOTPROTO=dhcp\n#  
HWADDR=00:00:00:00:00:00\nTYPE=Wireless\nUSERCTL=yes\n"
     else
       device=rausb0
       text="# RaLink RT2561/RT61 802.11g  
PCI\nDEVICE=ra0\nONBOOT=no\nBOOTPROTO=dhcp\n#  
HWADDR=00:00:00:00:00:00\nTYPE=Wireless\nUSERCTL=yes\n"
   fi
   cfg_file=/etc/sysconfig/network-scripts/ifcfg-$device
   if [ ! -f $cfg_file ]
     then
       echo -e "$text" >$cfg_file
       ln -f $cfg_file /etc/sysconfig/networking/devices
       ln -f $cfg_file /etc/sysconfig/networking/profiles/default
   fi
   grep -q 'NOZEROCONF' /etc/sysconfig/network
   if [ $? != 0 ]
     then
       echo "NOZEROCONF=yes" >>/etc/sysconfig/network
   fi
}

complete_suse_installation() {
   VAR=$1
   # avoid persistent interface naming on ra[..] interfaces
   edfile=/lib/udev/rename_netiface
   cp $edfile /tmp/edfile.$$
   sed -e "s/|ra|/|/" /tmp/edfile.$$ >$edfile
   rm -f /tmp/edfile.$$
   #
   if [ $VAR = 61 ]
     then
       bad_module=rt2500pci
     else
       bad_module=rt2500usb
   fi
   grep -q 'blacklist $bad_module' /etc/modprobe.d/blacklist
   if [ $? != 0 ]
     then
       echo "blacklist $bad_module" >>/etc/modprobe.d/blacklist
   fi
   if [ -f start_wifi ]
     then
       cp start_wifi /usr/local/bin
       chmod 700 /usr/local/bin/start_wifi
       chown root: /usr/local/bin/start_wifi
   fi
}

platform=unknown
if [ -f /etc/debian_version ]
   then
     platform=debian
     prepare_for_debian;
fi

if [ -f /etc/redhat-release ]
   then
     platform=redhat
     prepare_for_non_debian;
fi

if [ -f /etc/SuSE-release ]
   then
     platform=suse
     prepare_for_non_debian;
fi

if [ $platform = unknown ]
   then
     echo "We don't appear to know what platform we're running on. aborting..."
     exit 1
fi

while true
   do
     echo -e "Choose Ralink driver to install:

	1. RT61 - for PCI and PCMCIA cards
	2. RT73 - for USB dongles

	Choose 1 or 2 (q quits) \c"
     read reply
     echo
     case x$reply in
       xq | xQ ) exit 0
                 ;;
            x1 ) variant=61
                 break
                 ;;
            x2 ) variant=73
                 break
                 ;;
             * ) echo "Please choose 1, 2 or q"
                 ;;
     esac
   done

set -e

export variant
case $variant in
   61 ) tarfile=rt61-1.1.0-b1.tar.gz
        srcdir=rt61-1.1.0-b1/Module
        ;;
   73 ) tarfile=rt73-cvs-2006123101.tar.gz
        srcdir=rt73-cvs-2006123101/Module
        ;;
    * ) echo "variant must be 61 or 73"
        exit 1
        ;;
esac

currdir=`pwd`
tar xvzf $tarfile
cd $srcdir

make clean; rm -f Modules.symvers *.ko rt${variant}.mod.c
make
mkdir -p /etc/Wireless/RT${variant}STA
make install
cp -f *.bin /etc/Wireless/RT${variant}STA
if [ ! -f /etc/Wireless/RT${variant}STA/rt${variant}sta.dat ]
   then
     cp -f rt${variant}sta.dat /etc/Wireless/RT${variant}STA
fi

cd $currdir
set +e

if [ $variant = 73 ]
   then
     bad_module=rt73usb
   else
     bad_module=rt61pci
fi

grep -q 'blacklist $bad_module' /etc/modprobe.d/blacklist
if [ $? != 0 ]
   then
     echo "blacklist $bad_module" >>/etc/modprobe.d/blacklist
fi

cp ./set_essid.py /usr/local/bin
chmod 700 /usr/local/bin/set_essid.py
chown root: /usr/local/bin/set_essid.py
/usr/local/bin/set_essid.py

case $platform in
   debian ) complete_debian_installation $variant
            ;;
   redhat ) complete_redhat_installation $variant
            ;;
     suse ) complete_suse_installation $variant
            ;;
esac



-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list