#!/bin/sh # Dernière édition: 1er avril 2008 # VersionID: archSCRIPT v 0.3 (Ogry) # Info supplémentaire: Systhème de base seulement # archSCRIPT v0.3 - Un installateur automatique d'Arch Linux (version loins d'être terminé) # Copyright (C) 2008 Antoine Gervais (antogerva[a]gmail.com) # # ## # Tout d'abord, ceci est un logiciel libre et de ce fait vous pouvez # le configurer comme cela vous chante en accord avec les thermes de la # General Public License (GNU), tel que stipuler par la troisième version # de la Free Software Foundation ou encore a une version à venir. De plus # vous devrez avoir avoir une copie de la GNU General Public License qui # vient avec ce programme, si ce n'est pas le cas, vous pouvez l'obtenir # à cette page . ## # ######## # Note : Si ce programme est distribué sous license GPL... ce n'est pas # pour rien ! Je vous recommande grandement de regarder attentivement le # code source de ce script et d'y apporter vos propre # config/personalisation ;-) # # Ce sript est à la base optimiser pour les canadiens français, mais vous # pouvez faire une configuration propre à vous et le redistribuer sous # un autre nom en indiquant qu'il est basé sur celui-ci. # ########---------------------------------------------------------------######## ########---------------------------------------------------------------######## # -- Index -- # Configuration du vrai pacman.conf..................................ligne # Configurartion du fstab............................................ligne # Configuration du menu.lst (de grub)................................ligne # Configuration du rc.conf ########---------------------------------------------------------------######## # # # # # # ############ #Bonjour à vous, cher utilisateur de ce script, # # Donc, si vous lisez présentement ce texte, je peux lire en vous à peu près trois # de personnes, soit vous êtes le fameux guru du forums, qui ne rate jamais une # une occasions de s'instruire... ou vous encore un de ces nooby qui à poser une # question stupide l'autre.... ou encre un mélange des deux ;D # # Bref, quelques soit les raisons d'utilisation de ce scripte, sachez que chaque # partie du fichier est largement documenter, pour vous donner au moins une idée # de ce que fait tel commande. # # D'ailleur, si vous êtes nouveau depuis peu, dans le monde de Linux, il se peut # que vous trouvez cette méthode d'installaion par script un peu primitive... # mais détrompez-vous, non seulement vous obtiendrez un systhème aux # moins 4 fois plus rapide qu'Ubuntu ainsi que grandement simiaire à celle de # Gentoo, mais en plus, vous aurez un très bon avant goût de comment fonctionne # un systhème Linux et dite vous aussi, que dans l'univers de l'open-source ça # serait stupide de faire uniquement du clique bouton, alors que vous avez un # merveilleux a étudier devant vos yeux ;-) # # ########### # J'imagine que vos partitions et tout et tout son déjà aménager pour acceuillir # votre nouveau systhème # cfdisk function SETTINGS() { # c'est sur cette variable que tout votre systhème est installer... donc soyez vigilant ;) SOURCELOCATION="/mnt/arch" #### -- Information sur l'utilisateur -- #### UserName=BadPotato # Partition info ## Note : si vous mettez hda ou sda... ceci sera mit dans votre fstab. # D'abord la partition swap SWAPPART=sda5 # Maintenant la partition racinde, ainsi que son type FilesSystem=sda10 TypeFilesSystem=reiserfs # Maintenant la partition home... Home=$FilesSystem TypeHOME=$TypeFilesSystem ########---Experts---####### # BOOT=$FilesSystem #TypeBOOT=ext2 # # USR=$FilesSystem #TypeUSR= # # PROC=$FilesSystem #TypePROC= # # DEV=$FilesSystem #TypeDEV= # # SYS=$FilesSystem #TypeSYS= # # BIN=$FilesSystem #TypeBIN= # # SBIN=$FilesSystem #TypeSBIN= # # TMP=$FilesSystem #TypeTMP= # # OPT=$FilesSystem #TypeOPT= # # VAR=$FilesSystem #TypeVAR= # # MEDIA=$FilesSystem #TypeMEDIA= # # MNT= #TypeMNT= # ########################### # IMPORTANT ###=--=######=--=### ## # !Option du Grub! # ### ##### -------------- # ##### ################## ##### ####### GRUB_I="/dev/sda" # ########################### GRUB_R="hd0,9" ################################ GRUB_S="hd0" # ########################### ### ####### ################## ### ##### # # #### ###=--=######=--=### ## # Information Général ScriptName=archSCRIPT-0.1.sh # LInformaton sur localisation ZONEINFO=America/Montreal LOCALE=fr_CA HARDWARECLOCK=localtime TIMEZONE=America/Montreal KEYMAP=cf CONSOLEFONT=lat9w-16 CONSOLEMAP=8859-15 UTC=-4 # Networking info HOSTNAME=rorqual # C'est le nom de votre machine... soyez original! DOMAINNAME= FQDN= IPPREFIX=24 IPADRESS=192.168.1.169 GATEWAY=192.168.1.1 DNS1=192.168.1.1 DNS2=192.168.1.1 IPBROADCAST=192.168.1.255 ###### --------------- Configuration de X ------------ ######## # note: si vous connaissez pas les informations qui vont à ses endroits, vous pouvez les laissez vides KEYBOARD="ca(fr)" HORIZSYNC="28.0-96.0" #kHz VERTREFRESH="50.0-75.0" #Hz DRIVER="ati" RESOLUTION="1024x768" PROFONDEUR="24" # À venir, votre propre configuration du kernel # KERNELCONFIGMIRROR=http://www.mywebsite/kernel/.config ############---Configuration de vos Packages---############## # #Il vous suffit simplement de décommenter les lignes qui vous #intéresse, pour qu'elle soivent installer. GdmPackage="gdm" KdmPackage="kdm" WindowsManagerPackage="fluxbox fluxconf archlinux-xdg-menu" CompizPackage="" GnomePackage="" KdemodPackage="" Xfce4Package="" # PackageInternet="firefox" PackageMultimedia="" PackagePerso="xmoto" } SETTINGS ###############================================================================################## ###############================================================================################## # Création d'un nouveau pour Scipt pour passer le relais, une fois en chroot function NewArchScriptSuite() { cat > $SOURCELOCATION/root/archSCRIPT-0.1-suite.sh << "EOF" #!/bin/sh EOF function ConfigurationSystem() { # les locales locale-gen # user useradd -m -s /bin/bash $UserName usermod -G users,wheel,locate,audio,optical,floppy,storage,video $UserName # Configuration du .bashrc cat > /root/.bashrc < isntallation des driver et configuration du serveur X pacman --noconfirm -S hal #### Fixme pacman --noconfirm -S alsa-lib alsa-utils #alsaconf #alsamixer ## ce udev-rules devrait remplacer alsaconf au boot du systhème cat > /etc/udev/rules.d/20-alsa.rules << "FIN" # /etc/udev/rules.d/20-alsa.rules # When a sound device is detected, restore the volume settings KERNEL=="controlC[0-9]*", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n" FIN chmod -v 644 /etc/udev/rules.d/20-alsa.rules touch /etc/asound.state && alsactl store #===> trouver un moyen "d'automatiser" les choix par défaut et ne pas demander de confirmation au user # Outil de gestion de paquetage... pacman --noconfirm -Sy yaourt wget abs #### fixme #===> vérifier si les dépendances de yaourt on déjà le fakeroot, wget, etc... # abs pacman --noconfirm -S pkgconfig fakeroot groupadd abs usermod -G abs -a $UserName # Sudo... pacman --noconfirm -S sudo sudosisation() { (echo "# sudoers file." && echo "#" && echo "# Host alias specification" && echo "Host_Alias ICI = $HOSTNAME" && echo "Host_Alias LOCALNET = 192.168.1.*" && echo "" && echo "# User alias specification" && echo "User_Alias ROOT_FRIENDS = $UserName" && echo "" && echo "# Cmnd alias specification" && echo "Cmnd_Alias SOUND = /usr/bin/xmms" && echo "Cmnd_Alias SHUTDOWN = /sbin/shutdown, /sbin/halt, /sbin/reboot, /usr/lib/xfce4/xfsm-shutdown-helper" && echo "Cmnd_Alias PPPCMD = /etc/ppp/scripts/pppconnect, /etc/ppp/scripts/pppdisconnect" && echo "Cmnd_Alias PRINTINGCMDS = /usr/bin/lpq, /usr/bin/lprm" && echo "# Runas alias specification" && echo "# User privilege specification" && echo "# root peut tout !" && echo "root ALL=(ALL) ALL" && echo "# Les amis de root peuvent lancer les commandes" && echo "# du groupe SHUTDOWN" && echo "ROOT_FRIENDS ICI = NOPASSWD: SHUTDOWN" && echo "# ils peuvent aussi administrer l'imprimante (mais sous" && echo "# le compte de lpadmin, avec un mot de passe) :" && echo "ROOT_FRIENDS ICI = PRINTINGCMDS" && echo "# tout le monde peux lancer xmms avec les droit de root (pour le" && echo "# mode 'temps réel') en local" && echo "ALL ICI = NOPASSWD: SOUND" && echo "# tout le monde sur le réseau local peut demander l'établisement" && echo "# de la liaison internet" && echo "ALL LOCALNET = NOPASSWD: PPPCMD " && echo "" && echo "") > "/etc/sudoers" } sudosisation #### fixme #===> modifier le rc.conf en consquence... pacman --noconfirm -S $WindowsManagerPackage $CompizPackage $KdemodPackage $Xfce4Package $PackageInternet $PackageMultimedia $PackagePerso $GdmPackage pacman --noconfirm -S grub cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub function grubinstall() { ## On va mettre grub sur le mbr grub-install $GRUB_I grub --batch < basepackages.txt #programme_de_base=$(cat basepackages.txt) ## pacman() { (echo "# /etc/pacman.conf" && echo "#" && echo "# See the pacman manpage for option directives" && echo "#" && echo "# GENERAL OPTIONS" && echo "" && echo "[options]" && echo "# The following paths are commented out with their default values listed." && echo "# If you wish to use different paths, uncomment and update the paths." && echo "" && echo "#RootDir = /" && echo "DBPath = $SOURCELOCATION/var/lib/pacman/" && echo "CacheDir = $SOURCELOCATION/var/cache/pacman/pkg/" && echo "LogFile = $SOURCELOCATION/var/log/pacman.log" && echo "HoldPkg = pacman glibc" && echo "#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u" && echo "" && echo "" && echo "#" && echo "# REPOSITORIES" && echo "# - can be defined here or included from another file" && echo "# - pacman will search repositories in the order defined here" && echo "# - local/custom mirrors can be added here or in separate files" && echo "# - repositories listed first will take precedence when packages" && echo "# have identical names, regardless of version" && echo "" && echo "# Repository entries are of the format:" && echo "# [repo-name]" && echo "# Server = ServerName" && echo "# Include = IncludePath" && echo "" && echo "# The header [repo-name] is crucial - it must be present and" && echo "# uncommented to enable the repo." && echo "" && echo "" && echo "########################" && echo "" && echo "[current]" && echo "# Add your preferred servers here, they will be used first" && echo "#Include = /etc/pacman.d/current" && echo "Server = ftp://ftp.archlinux.org/current/os/i686" && echo "" && echo "" && echo "[core]" && echo "# Add your preferred servers here, they will be used first" && echo "Server = ftp://ftp.archlinux.org/core/os/i686" && echo "" && echo "[extra]" && echo "# Add your preferred servers here, they will be used first" && echo "#Include = /etc/pacman.d/extra" && echo "Server = ftp://ftp.archlinux.org/extra/os/i686" && echo "" && echo "" && echo "[community]" && echo "# Add your preferred servers here, they will be used first" && echo "#Include = /etc/pacman.d/community" && echo "Server = ftp://ftp.archlinux.org/community/os/i686" && echo "" && echo "" && echo "[kdemod]" && echo "Server = http://kdemod.ath.cx/repo/current/i686" && echo "" && echo "" && echo "[archlinuxfr]" && echo "Server = http://repo.archlinux.fr/i686" && echo "" && echo "" && echo "#[unstable]" && echo "# Add your preferred servers here, they will be used first" && echo "#Include = /etc/pacman.d/unstable" && echo "# An example of a custom package repository. See the pacman manpage for" && echo "# tips on creating your own repositories." && echo "#[custom]" && echo "#Server = file:///home/custompkgs" && echo "" && echo "# End /etc/pacman.conf" && echo "" && echo "") > "$SOURCELOCATION/tmp/etc/pacman.conf" } pacman rconfig() { (echo "# /etc/rc.conf - Main Configuration for Arch Linux" && echo "" && echo "" && echo "" && echo "" && echo "# -----------------------------------------------------------------------" && echo "# LOCALIZATION" && echo "# -----------------------------------------------------------------------" && echo "" && echo "" && echo "" && echo "# LOCALE: available languages can be listed with the "locale -a" command" && echo "# HARDWARECLOCK: set to "UTC" or "localtime"" && echo "# TIMEZONE: timezones are found in /usr/share/zoneinfo" && echo "# KEYMAP: keymaps are found in /usr/share/kbd/keymaps" && echo "# CONSOLEFONT: found in /usr/share/kbd/consolefonts" && echo "# CONSOLEMAP: found in /usr/share/kbd/consoletrans" && echo "# USECOLOR: use ANSI color sequences in startup messages" && echo "" && echo "" && echo "" && echo "LOCALE="$LOCALE.utf8"" && echo "HARDWARECLOCK="$HARDWARECLOCK"" && echo "TIMEZONE="$TIMEZONE"" && echo "KEYMAP="$KEYMAP"" && echo "CONSOLEFONT="lat9w-16"" && echo "CONSOLEMAP="8859-15"" && echo "USECOLOR="yes"" && echo "" && echo "# -----------------------------------------------------------------------" && echo "# HARDWARE" && echo "# -----------------------------------------------------------------------" && echo "" && echo "" && echo "# Module Blacklist - modules in this list will never be loaded by udev" && echo "" && echo "MOD_AUTOLOAD="yes"" && echo "# Module Blacklist - modules in this list will never be loaded by udev" && echo "# Example: MOD_BLACKLIST=(fglrx)" && echo "MOD_BLACKLIST=()" && echo "# Modules to load at boot-up (in this order)" && echo "# - prefix a module with a ! to blacklist it" && echo "# Example: MODULES=(fuse reiserfs ipw2200 battery fan svgalib radeon)" && echo "MODULES=()" && echo "" && echo "" && echo "# Scan for LVM volume groups at startup, required if you use LVM" && echo "USELVM="no"" && echo "" && echo "# -----------------------------------------------------------------------" && echo "# NETWORKING" && echo "# -----------------------------------------------------------------------" && echo "" && echo "" && echo "HOSTNAME="rorqual"" && echo "# Use "ifconfig -a" or "ls /sys/class/net/" to see all available" && echo "# interfaces." && echo "" && echo "# Interfaces to start at boot-up (in this order)" && echo "# Declare each interface then list in INTERFACES" && echo "" && echo "# - prefix an entry in INTERFACES with a ! to disable it" && echo "# - no hyphens in your interface names - Bash doesn't like it" && echo "" && echo "# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")" && echo "# Don't use this for wireless interfaces, see network profiles below" && echo "" && echo "eth0="dhcp"" && echo "INTERFACES=(eth0 eth1 !wlan0)" && echo "lo="lo 127.0.0.1"" && echo "" && echo "" && echo "#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"" && echo "#wlan0="dhcp"" && echo "#wlan_wlan0="wlan0 mode auto key s:xxxxxxxxxxxxxxxxxxx essid myessid"" && echo "#eth1="dhcp"" && echo "" && echo "" && echo "" && echo "# Routes to start at boot-up (in this order)" && echo "# Declare each route then list in ROUTES" && echo "# - prefix an entry in ROUTES with a ! to disable it" && echo "#" && echo "# gateway="default gw 192.168.0.1"" && echo "# ROUTES=(!gateway)" && echo "" && echo "# Enable these network profiles at boot-up. These are only useful" && echo "# if you happen to need multiple network configurations(ie, laptop users)" && echo "# - set to menu to present a menu during boot-up(dialog package required)" && echo "# - prefix an entry with a ! to disable it" && echo "" && echo "# Network profiles are found in /etc/network-profiles" && echo "" && echo "# NET_PROFILES=(config_wpa maison)" && echo "" && echo "" && echo "" && echo "# -----------------------------------------------------------------------" && echo "# DAEMONS" && echo "# -----------------------------------------------------------------------" && echo "" && echo "# Daemons to start at boot-up (in this order)" && echo "# - prefix a daemon with a ! to disable it" && echo "# - prefix a daemon with a @ to start it up in the background" && echo "" && echo "DAEMONS=(@syslog-ng @network dbus gpm @crond @hal @alsa fam esd stbd)" && echo "" && echo "" && echo "# End of file" && echo "" && echo "") > $SOURCELOCATION/etc/rc.conf } mkdir -pv "$SOURCELOCATION/var/lib/pacman/" mkdir -pv "$SOURCELOCATION/root" mkdir -pv "$SOURCELOCATION/boot/grub" mkdir -pv "$SOURCELOCATION/etc/X11/" # Installation de la base de arch avec notre pacman temporaire... $SOURCELOCATION/tmp/usr/bin/pacman.static --dbpath "$SOURCELOCATION/var/lib/pacman/" --root "$SOURCELOCATION" --config "$SOURCELOCATION/tmp/etc/pacman.conf" --noconfirm -Sy base ### $programme_de_base <== (intutille pour le moment) # Fixme cat /etc/resolv.conf > "$SOURCELOCATION"/etc/resolv.conf cat /etc/X11/xorg.conf > "$SOURCELOCATION"/etc/X11/xorg.conf # Note: peut être utiliser les udev rules(30) pour configurer xorg.conf ####===> trouver une façon plus intelligente d'intégrer ces fichier de configuration... function fstabconfig() { (echo "# Begin /etc/fstab" && echo " " && echo "# " && echo "# " && echo "/dev/$SWAPPART swap swap defaults 0 0 " && echo "/dev/$FilesSystem / $TypeFilesSystem defaults 0 1 " && echo "/dev/$Home /home $TypeHOME defaults 0 0 " && echo "# " && echo "#/dev/$BOOT /boot $TypeBOOT defaults 0 0 " && echo "# " && echo "#none /proc proc defaults 0 0 " && echo "#none /sys sysfs defaults 0 0 " && echo "# " && echo "# " && echo "# Grâce à /dev/pts on facillite pas mal plus la vie à Xterm & Cie... " && echo "# " && echo "none /dev/pts devpts gid=5,mode=666 0 0 " && echo "/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0 " && echo "/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0 " && echo "# " && echo "# " && echo "# End /etc/fstab") > $SOURCELOCATION/etc/fstab } function grubconfig() { (echo "# Begin /boot/grub/menu.lst" && echo "" && echo "# numlockx ## (à vérifier si c'est bien cela.... pas sur)" && echo "" && echo "# By default boot the first menu entry." && echo "default 0" && echo "" && echo "# Allow 30 seconds before booting the default." && echo "timeout 10" && echo "" && echo "# Use prettier colors." && echo "color light-blue/black light-cyan/blue" && echo "" && echo "# (1) Entrée pour Arch Linux" && echo "title Arch Linux" && echo "root ($GRUB_ROOT)" && echo "kernel /boot/vmlinuz26 root=/dev/$FilesSystem vga=790 ro" && echo "initrd /boot/kernel26.img" && echo "" && echo "" && echo "" && echo "" && echo "" && echo "" && echo "") > $SOURCELOCATION/boot/grub/menu.lst } configurationXORG() { (echo " " && echo "Section "Module" " && echo " Load "i2c" " && echo " Load "glx" " && echo " Load "dbe" " && echo " Load "ddc" " && echo " Load "dri" " && echo " Load "bitmap" # bitmap-fonts " && echo " Load "extmod" " && echo " Load "type1" " && echo " Load "freetype" " && echo " Load "int10" " && echo " Load "record" " && echo " Load "vbe" " && echo "# Load "synaptics" " && echo "#SubSection "extmod" " && echo "# Option "omit xfree86-dga" # don't initialise the DGA extension " && echo "#EndSubSection " && echo " " && echo "EndSection " && echo "################ " && echo "Section "Files" " && echo " " && echo "# The location of the RGB database. Note, this is the name of the " && echo "# file minus the extension (like ".txt" or ".db"). There is normally " && echo "# no need to change the default. " && echo " " && echo " RgbPath "/usr/share/X11/rgb" " && echo " " && echo "# Multiple FontPath entries are allowed (which are concatenated together), " && echo "# as well as specifying multiple comma-separated entries in one FontPath " && echo "# command (or a combination of both methods) " && echo "# " && echo "# " && echo " " && echo " FontPath "/usr/share/fonts/misc" " && echo " FontPath "/usr/share/fonts/100dpi:unscaled" " && echo " FontPath "/usr/share/fonts/75dpi:unscaled" " && echo " FontPath "/usr/share/fonts/TTF" " && echo " FontPath "/usr/share/fonts/Type1" " && echo "# FontPath "/usr/lib/X11/fonts/local/" " && echo "# FontPath "/usr/lib/X11/fonts/misc/" " && echo "# FontPath "/usr/lib/X11/fonts/75dpi/:unscaled" " && echo "# FontPath "/usr/lib/X11/fonts/100dpi/:unscaled" " && echo "# FontPath "/usr/lib/X11/fonts/Speedo/" " && echo "# FontPath "/usr/lib/X11/fonts/Type1/" " && echo "# FontPath "/usr/lib/X11/fonts/TrueType/" " && echo "# FontPath "/usr/lib/X11/fonts/freefont/" " && echo "# FontPath "/usr/lib/X11/fonts/75dpi/" " && echo "# FontPath "/usr/lib/X11/fonts/100dpi/" " && echo " " && echo "# The module search path. The default path is shown here. " && echo " " && echo "# ModulePath "/usr/lib/modules" " && echo " " && echo "EndSection " && echo " " && echo "############################ " && echo " " && echo "Section "ServerFlags" " && echo " " && echo "######################### " && echo "# Option "AIGLX" "off" " && echo "######################### " && echo " " && echo "EndSection " && echo "############################ " && echo " " && echo "# Uncomment to see nice shadows and make the panel semi-transparent " && echo " " && echo "########### " && echo " " && echo "#Section "InputDevice" " && echo "#Identifier "Synaptics Touchpad" " && echo "#Driver "synaptics" " && echo "#Option "SendCoreEvents" "true" " && echo "#Option "Device" "/dev/psaux" " && echo "#Option "Protocol" "auto-dev" " && echo "#Option "HorizScrollDelta" "0" " && echo "#Option "SHMConfig" "on" " && echo "#EndSection " && echo " " && echo "Section "InputDevice" " && echo " Identifier "Generic Keyboard" " && echo " Driver "kbd" " && echo " Option "CoreKeyboard" " && echo " Option "XkbRules" "xorg" " && echo " Option "XkbModel" "pc105" " && echo " Option "XkbLayout" "$KEYBOARD" " && echo " Option "XkbOptions" "grp:alt_shift_toggle,compose:menu,grp_led:scroll" " && echo "EndSection " && echo " " && echo "####################### " && echo "####################### " && echo " " && echo " " && echo " " && echo " " && echo "#######################------------------##################### " && echo "#######################------------------##################### " && echo " " && echo " " && echo "Section "InputDevice" " && echo " Identifier "Generic Mouse" " && echo " Option "CorePointer" " && echo " Option "Device" "/dev/input/mice" " && echo "### Mouse-specific options, comment out if using a touchpad " && echo " Driver "mouse" " && echo " Option "Protocol" "ExplorerPS/2" " && echo "# Option "Protocol" "usb" " && echo " Option "Emulate3Buttons" "true" " && echo "### Touchpad specific options " && echo "# Driver "synaptics" " && echo "# Option "Protocol" "auto-dev" " && echo "EndSection " && echo " " && echo "#######################==================###################### " && echo "#######################==================###################### " && echo "#######################==================###################### " && echo " " && echo " " && echo "Section "Device" " && echo " Identifier "Generic Video Card" " && echo " Driver "vesa" " && echo "# Driver "$DRIVER" " && echo " " && echo "EndSection " && echo " " && echo "Section "Monitor" " && echo " Identifier "Generic Monitor" " && echo " Option "DPMS" " && echo "EndSection " && echo " " && echo "Section "Screen" " && echo " Identifier "Default Screen" " && echo " Device "Generic Video Card" " && echo " Monitor "Generic Monitor" " && echo " DefaultDepth $PROFONDEUR " && echo " SubSection "Display" " && echo " Depth 8 " && echo " EndSubSection " && echo " SubSection "Display" " && echo " Depth 15 " && echo " EndSubSection " && echo " SubSection "Display" " && echo " Depth 16 " && echo " EndSubSection " && echo " SubSection "Display" " && echo " Depth 24 " && echo " Modes "$RESOLUTION" " && echo " EndSubSection " && echo "EndSection " && echo " " && echo "########################## " && echo " " && echo "########################## " && echo "Section "ServerLayout" " && echo " Identifier "Default Layout" " && echo " Screen "Default Screen" " && echo " InputDevice "Generic Keyboard" " && echo " InputDevice "Generic Mouse" " && echo "# InputDevice "Synaptics Touchpad" " && echo "# InputDevice "Mouse[1]" "CorePointer" " && echo "# InputDevice "Mouse[1]" "AlwaysCore" " && echo "EndSection " && echo " " && echo "######################### " && echo " " && echo "######################### " && echo " " && echo "#Section "Extensions" " && echo "# Option "Composite" "enable" " && echo "# Option "RENDER" "enable" " && echo "#EndSection " && echo " " && echo " " && echo "Section "DRI" " && echo "# Group 0 " && echo " Mode 0666 " && echo "EndSection " && echo " " && echo " " && echo " " && echo " " && echo " " && echo "") > "$SOURCELOCATION/etc/X11/xorg.conf" } # Avec les commandes qui suivent, notre rc.conf, fstab, xorg.conf et notre menu.lst vont se créer. rconfig fstabconfig grubconfig configurationXORG # nouveau /etc/pacman.conf ==> configurer le comme vous le vouler :) cat > $SOURCELOCATION/etc/pacman.conf << "EOF" # /etc/pacman.conf # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # See the pacman manpage for option directives # # GENERAL OPTIONS # [options] # The following paths are commented out with their default values listed. # If you wish to use different paths, uncomment and update the paths. #RootDir = / #DBPath = /var/lib/pacman/ #CacheDir = /var/cache/pacman/pkg/ #LogFile = /var/log/pacman.log HoldPkg = pacman glibc #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u # # REPOSITORIES # - can be defined here or included from another file # - pacman will search repositories in the order defined here # - local/custom mirrors can be added here or in separate files # - repositories listed first will take precedence when packages # have identical names, regardless of version number # # Repository entries are of the format: # [repo-name] # Server = ServerName # Include = IncludePath # # The header [repo-name] is crucial - it must be present and # uncommented to enable the repo. # [current] # Add your preferred servers here, they will be used first #Include = /etc/pacman.d/current Server = ftp://ftp.archlinux.org/current/os/i686 [core] Server = ftp://ftp.archlinux.org/core/os/i686 [extra] # Add your preferred servers here, they will be used first #Include = /etc/pacman.d/extra Server = ftp://ftp.archlinux.org/extra/os/i686 [community] # Add your preferred servers here, they will be used first #Include = /etc/pacman.d/community Server = ftp://ftp.archlinux.org/community/os/i686 [kdemod] Server = http://kdemod.ath.cx/repo/current/i686 [archlinuxfr] Server = http://repo.archlinux.fr/i686 [svn] Server = http://cvs.archlinux.org #[compiz-fusion] #Server = http://arch.nesl247.org/compiz-fusion/i686 #[unstable] # Add your preferred servers here, they will be used first #Include = /etc/pacman.d/unstable # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] #Server = file:///home/custompkgs # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Fin du /etc/pacman.conf EOF # on va modifier notre locale.gen sed -e "s/#$LOCALE/$LOCALE/" $SOURCELOCATION/etc/locale.gen > $SOURCELOCATION/etc/locale.gen2 mv $SOURCELOCATION/etc/locale.gen $SOURCELOCATION/etc/locale.gen.old mv $SOURCELOCATION/etc/locale.gen2 $SOURCELOCATION/etc/locale.gen ############################################################################ # la voie semble être libre... chrootons! function chrooting() { mount -t proc none $SOURCELOCATION/proc mount -o bind /dev $SOURCELOCATION/dev chroot "$SOURCELOCATION" /usr/bin/env -i \ UserName="$UserName" \ \ WindowsManagerPackage="$WindowsManagerPackage" \ CompizPackage="$CompizPackage" \ KdemodPackage="$KdemodPackage" \ Xfce4Package="$Xfce4Package" \ PackageInternet="$PackageInternet" \ PackageMultimedia="$PackageMultimedia" \ PackagePerso="$PackagePerso" \ \ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/opt/bin \ HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \ \ GRUB_R="$GRUB_R" \ GRUB_S="$GRUB_S" \ GRUB_I="$GRUB_I" \ \ /bin/bash --login +h /root/archSCRIPT-0.1-suite.sh } NewArchScriptSuite chrooting