blackbinary wrote:
This sounds awesome. Could you post a quick guide perhaps for people who may want to do it themselves? Of course even just posting your script would be helpful smile.
Here is my script. You can do what you want with it, but won't be able to run it "as it", because it has been made for my personal use.
[quote]#!/bin/sh
# Un script bash perso pour compléter une Ubuntu-9.04 "CLI" 64 bits.
# Lancez le script en root (sudo ~/agaric-9.04.sh)
# Test des droits sudo
if [ "`id -u`" -eq 0 ]; then
# si root
echo "Lancement de \"agaric-9.04.sh\""
else
# si simple utilisateur
echo "Le script doit être lancé en \"root\"..."
exit 1
fi
# Débuter l'installation
clear
echo "Bienvenue dans l'installeur \"agaric\""
echo ""
echo -n "Débuter l'installation? (O|n) > "
read a
if [ "$a" = "o" ] || [ "$a" = "O" ] || \
[ "$a" = "" ]; then
# Modification du sources.list
clear
echo ""
echo "Modification du sources.list..."
echo ""
sleep 1s
mv /etc/apt/sources.list /etc/apt/sources.old
echo ""
sleep 1s
cp /media/cdrom0/sources.list /etc/apt
echo ""
echo "[OK]"
echo ""
sleep 1s
# Configuration des dépots
echo ""
echo "Configuration des dépots: \"wine\", \"medibuntu\", \"tint2\"..."
echo ""
sleep 1s
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | apt-key add -
echo ""
sleep 1s
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | apt-key add -
echo ""
sleep 1s
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C4412AEB3B1D5F58E8149B7DD9DAAF25C26CCF8E
echo ""
echo "[OK]"
echo ""
sleep 1s
# Mise à jour des dépots
echo ""
echo "Mise à jour des dépots..."
echo ""
sleep 1s
apt-get update
echo ""
echo "[OK]"
echo ""
sleep 1s
# Installation des paquets
clear
echo ""
echo "Installation des paquets..."
echo ""
echo "Cela va prendre du temps. Va t'en rouler une..."
echo ""
sleep 2s
apt-get install alsa-base alsa-utils aspell-fr brasero claws-mail claws-mail-extra-plugins cdrdao deluge-torrent dontzap dvd95 dvd+rw-tools envyng-core evince ffmpeg ffmpegthumbnailer file-roller firefox gcolor2 gedit gedit-plugins gcalctool gdm gnome-games gnome-system-tools googleearth gparted gstreamer0.10-alsa gufw hardinfo hicolor-icon-theme hplip-gui htop isomaster language-pack-fr language-pack-gnome-fr language-support-writing-fr language-support-translations-fr libdvdcss2 lxappearance lxsession-lite mirage mozilla-plugin-vlc mtpaint nitrogen non-free-codecs numlockx openbox openbox-themes obconf obmenu python-fuse scrot serpentine soundconverter sound-juicer stellarium synaptic terminator thunar thunar-archive-plugin thunar-thumbnailers thunar-volman tint2 totem totem-plugins-extra ubuntu-restricted-extras usplash vlc w64codecs wicd wine xcompmgr xsane xscreensaver xscreensaver-data-extra xscreensaver-gl-extra xorg
echo ""
echo "[OK]"
echo ""
sleep 1s
# installation des .deb
clear
echo ""
echo "Installation des \".deb\"..."
echo ""
sleep 1s
# Installation de Disk-manager
dpkg -i /media/cdrom0/debs/disk-manager_1.0.1-2_all.deb
apt-get --assume-yes -f install
echo ""
sleep 1s
# Installation de Oblogout
dpkg -i /media/cdrom0/debs/oblogout_0.2-1-0ubuntu2_all.deb
apt-get --assume-yes -f install
echo ""
sleep 1s
# Installation de la visionneuse Powerpoint
dpkg -i /media/cdrom0/debs/pptview_2003.1_all.deb
apt-get --assume-yes -f install
echo ""
sleep 1s
# Installation du thème sonore
dpkg -i /media/cdrom0/debs/ubuntu-sounds_0.10-1crunchbang1_all.deb
apt-get --assume-yes -f install
echo ""
echo "[OK]"
echo ""
sleep 1s
# Activation du pavé numérique au login
echo ""
echo "Activation du pavé numérique au login..."
echo ""
mv /etc/gdm/Init/Default /etc/gdm/Init/Default.old
echo ""
sleep 1s
cp /media/cdrom0/Default /etc/gdm/Init/
echo ""
sleep 1s
echo ""
chmod +x /etc/gdm/Init/Default
echo ""
echo "[OK]"
echo ""
sleep 1s
# Configuration de la souris
echo ""
echo "Configuration de la souris..."
echo ""
sleep 1s
cp -r /media/cdrom0/Obsidian /usr/share/icons
echo ""
cp -r /media/cdrom0/default/ /usr/share/icons
echo ""
echo "[OK]"
echo ""
sleep 1s
# Configuration de Xscreensaver
echo ""
echo "Configuration de xscreensaver..."
echo ""
sleep 1s
mkdir /usr/share/backgrounds
echo ""
echo "[OK]"
echo ""
sleep 1s
# DésInstallation de pulse-audio
echo ""
echo "Désinstallation de pulse-audio..."
echo ""
sleep 1s
apt-get --purge remove pulseaudio* libpulse*
echo ""
echo "[OK]"
echo ""
sleep 1s
# installation du pilote Nvidia
echo ""
echo "Installation du pilote Nvidia..."
echo ""
echo "ATTENTION! Afin de poursuivre l'exécution du script,"
echo "ne pas redémarrer le système."
echo ""
sleep 1s
envyng -t
echo ""
echo "Configuration de \"X.org\"..."
echo ""
sleep 1s
nvidia-xconfig
echo ""
echo "[OK]"
echo ""
sleep 1s
# Rétablissement de la conbinaison des touches "ctrl+alt+backspace"
echo ""
echo "Rétablissement de la conbinaison des touches \"ctrl+alt+backspace\"..."
echo ""
sleep 1s
dontzap --disable
echo ""
echo "[OK]"
echo ""
sleep 1s
# Nettoyage des paquets téléchargés
clear
echo "Nettoyage. Un certain nombre de paquets ont été téléchargés durant"
echo "la routine d'installation. Ces paquets ne sont plus nécessaires."
echo "Choisissez si vous désirez les conserver ou les supprimer."
echo ""
sleep 1s
echo ""
echo "\"apt-get clean\"..."
echo ""
apt-get clean
echo ""
echo "[OK]"
echo ""
echo "\"apt-get autoclean\"..."
echo ""
apt-get autoclean
echo ""
echo "[OK]"
echo ""
echo "\"apt-get auto-remove\"..."
echo ""
apt-get auto-remove
echo ""
echo "[OK]"
echo ""
sleep 1s
# Prompt pour le redémarrage
clear
echo "Installation terminée."
echo "Vous pouvez redémarrer votre système."
echo ""
echo -n "Redémarrer maintenant? (O|n) > "
read a
if [ "$a" = "o" ] || [ "$a" = "O" ] || \
[ "$a" = "" ]; then
echo "Tchao. A+"
echo "Redémarrage..."
sleep 2s
reboot now
exit
else
echo "Utiliser la commande suivante pour redémarrer:"
echo ""
echo "\$ sudo reboot now"
echo ""
echo "Tchao. A+"
fi
fi
exit[/quote]
1) The beginning of the script is for testing the sudo rights and to let you the choice of running it or not.
2) After I modify the "sources.list".
3) here are the keys for some extras repositories.
4) "apt-get update"
5) The installation of my choice of packages.
6) the installation of some ".debs"
7) the numpad activation since login
8) installation of my favorite "mouse cursor theme"
9) the needed configuration of "xscreensaver"
10) removing "pulse-audio"
11) installation and configuration of the "Nvidia driver"
12) activation of "ctrl+alt+backspace"
13) Cleaning the system.
14) The choice for rebooting or not.
This is not the best script, but it does what I want : the automatization of a lot of tasks needed after a "CLI" install".
Hope this help you. Do not hesitate to tell me what you think of this script; I'm interested by any comment
.
It's a good thing to share such scripts.
Omns said:
If it helps here is a copy of one that I put together for a mod of Crunchang 9.04 that I developed sometime ago. It is based on the Crunchbang 9.04.01 installer script.
your script is interesting. I'm going to copy it for learning
. Thanks to you.
A+ Francis.
PS Shame on me! Some parts of this script are directly inspired by the work of corenominal
.
Thanks again and again Philip for your good job and your kindness.
Last edited by astrocisco (2009-07-05 13:38:13)