Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I am wondering if there is a way to automate the following things with a single bash file. //edit sudo gedit /etc/apt/sources.list deb http://download.skype.com/linux/repos/debian/ stable non-free sudo wget ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    2,003

    Automate Install?


    Hi All,

    I am wondering if there is a way to automate the following things with a single bash file.

    //edit
    sudo gedit /etc/apt/sources.list
    deb http://download.skype.com/linux/repos/debian/ stable non-free
    sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list
    sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

    //restricted drivers
    nvidia

    //apt get
    sudo apt-get install ubuntu-restricted-extras skype avant-window-navigator startupmanager amarok vlc conky emerald compizconfig-settings-manager thunderbird gparted libdvdcss2 kmymoney2 bittornado-gui wine seamonkey galeon acidrip curl xautomation


    //ndis
    $ sudo gedit /etc/modprobe.d/blacklist
    password:

    then add:

    blacklist b43 (you can put it under blacklist bcm43xx

    save and quit gedit.

    The second step is to install ndiswrapper
    From Applications - Add/Remove
    search for ndiswrapper

    It will automatically install ndiswrapper with its dependency

    Third: copy the bcmwl5.inf and bcmwl5.sys to your home folder and fire up terminal/konsole

    change to the directory where you put the two files:
    $ cd bcm43
    $ sudo ndiswrapper -i bcmwl5.inf

    check if the driver is installed by giving command:
    $ sudo ndiswrapper -l
    bcmwl5 : driver installed
    device (14E4:4311) present (alternate driver: bcm43xx)

    Fourth: Edit rc.local

    $ sudo gedit /etc/rc.local
    add the following lines:

    modprobe -r b44
    modprobe -r ssb
    modprobe -r ndiswrapper
    modprobe ndiswrapper
    modprobe ssb
    modprobe b44

    Fifth : Reboot your computer and setup your wireless network


    I reinstall Ubuntu frequently (I like testing things out often and sometimes it leads downhill). I currently just have the above in a text file and than manually copy paste that stuff to get it set up but would love for an auto process. Thanks!

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Copy the bcmwl5.inf and bcmwl5.sys to your home folder before executing this script.
    Code:
    #!/bin/bash
    
    echo " Editing up sources.list file "
    echo
    sudo echo "deb http://download.skype.com/linux/repos/debian/ stable" non-free >> /etc/apt/sources.list
    sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d
    sudo apt-get install medibuntu-keyring && sudo apt-get update
    
    echo "Installing Restricted drivers and other stuff"
    echo
    sudo apt-get install ubuntu-restricted-extras skype avant-window-navigator startupmanager amarok vlc conky emerald compizconfig-settings-manager thunderbird gparted libdvdcss2 kmymoney2 bittornado-gui wine seamonkey galeon acidrip curl xautomation
    
    echo " :: Editing /etc/modprobe.d/blacklist  ::"
    echo
    sudo echo "blacklist b43" >> /etc/modprobe.d/blacklist
    
    echo " :: Installing ndiswrapper :: "
    echo
    sudo apt-get install ndiswrapper
    cd bcm43
    sudo ndiswrapper -i bcmwl5.inf
    
    echo "Checking if driver installed correctly :: "
    echo
    sudo ndiswrapper -l
    
    echo "Editing /etc/rc.local file ::"
    echo
    echo "modprobe -r b44" >> /etc/rc.local
    echo "modprobe -r ssb" >> /etc/rc.local
    echo "modprobe -r ndiswrapper" >> /etc/rc.local
    echo "modprobe ndiswrapper" >> /etc/rc.local
    echo "modprobe ssb" >> /etc/rc.local
    echo "modprobe b44" >> /etc/rc.local
    
    echo "Its done, Reboot machine now ::"
    This is a rough script. You can modify it, add echo commands, a few checks/contorls to abort execution if anything goes wrong.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •