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
- Checks to see if the Update Manager has been execute
- Update installation continues
- Update Manager closes after updates are installed
- 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
- Continue with software installation
- Check to see if Update manager has any updates
- 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
- enable the Medibuntu repository
- 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
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
Bookmarks