Results 1 to 1 of 1

Thread: Post Install Script 8.10 Help

  1. #1
    Join Date
    Mar 2007
    Beans
    109

    Lightbulb Post Install Script 8.10 Help

    Ubuntu 8.10 Post Install Script

    I'm fairly new to Ubuntu. I have been a user for almost two years; much of that time I have spent using 'the other OS'. I have started to concentrate on Ubuntu once again, and I have to say, this time around I love it. I guess you could say I'm just your average user. I have finally set my system up the way I like it. I have read several HowTo's on how to backup your system, most of which can be found here in the Forums. What I would like to do is automate some of the process of adding repositories, installing software and codecs. I'm aware because of legal reason, Ubuntu cannot be installed with some of this software, and codecs pre-packaged with the distribution.

    Some of the things I would like to accomplish are as follows:

    Create a script that will run immediatley after a fresh install

    - automatically run the Update Manager

    - check for updates and install updates if neccessary

    - 'enables' all the neccessary and/or required repositories (makes changes to the 'sources.lst' as required)

    - or, makes it easy to configure the script to be functional with a new release (When updating from 8.04 to 8.10, etc)

    - The script will install my software according to what is in the file from running:
    Code:
    dpkg --get-selections > installed-software

    I guess, in a nutshell, I need help in creating a script that will automate the process of re-installing my sytem software, codecs and keeping my sources.list intact. I have never used a programming language in my life, but from doing some reading it appears I can achieve this goal by creating a bash script. If anyone has any advice or suggestions I would greatly appreciate it. Any constructive critism is welcome as well

    Below is my 'newbie" attempt at outlining how I think the script should run.


    Installing Updates after initial install:

    Execute Post-Install-Script

    - Post-Install-Script runs the following:
    - Checks to see if Post-Install-Script has been previously executed
    - If no
    - Checks to see if the Update Manager has been execute
    - If no
    - Open Update Manager
    - Refresh list
    - Install Updates
    - Prompt for Password

    - Enter Password

    - Update installation continues
    - Update Manager closes after updates are installed
    - If Kernel was updated
    - Then system restarts
    - After restart Execute Post-Install-Script
    - If no restart required, continue with software installation
    - Checks if software in Post-Install-Script is installed on system
    - If yes
    - Exit
    - If no
    - Continue with software installation
    - If yes
    - Check to see if Update manager has any updates
    - If yes
    - Run Update Manager
    - If no
    - Continue with software installation
    - Continue with software installation


    This is the part where the script will automatically configure the sources.lst

    Configure Additional Repositories

    - edit /etc/apt/sources.list

    - enable the intrepid partner repository
    Code:
    deb http://archive.canonical.com/ubuntu intrepid partner
    deb-src http://archive.canonical.com/ubuntu intrepid partner
    - enable the Medibuntu repository
    Code:
    sudo wget http://www.medibuntu.org/sources.list.d /intrepid.list -O /etc/apt/sources.list.d/medibuntu.list
    sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
    - enable all repositories (including Universe and Multiverse repositories)
    Code:
    sudo sed -i -e "s/# deb/deb/g" /etc/apt/sources.list && sudo apt-get update
    - enable OpenOffice 3
    Code:
    echo 'deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main' >> 
    /etc/apt/sources.list.d/openoffice.sources.list && sudo apt-get update
    Install Additional Software

    - Enable Synaptic to install the additional applications (User preference)
    Code:
    sudo update-apt-xapian-index
    - Software Install
    - Software installed from 'installed-software' file
    Code:
    dpkg --get-selections > installed-software
    Last edited by tbuss; December 15th, 2008 at 01:27 AM.

Bookmarks

Posting Permissions

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