:: Antesis :: Apinc :: Archilinux :: Distrowatch :: Fro4nix :: Knoppix :: Lea-Linux :: LinuxFR :: Purée de Linux :: "Mémoire Grise Libérée" ::

Knoppix-fr.org

Knoppix, on n'a jamais vu autant de fonctionnalités sur un CD !

Forums Knoppix-fr

Forum français officiel Knoppix LiveCD

Vous n'êtes pas identifié.

#1 28-10-2003 13:19:45

JoDaY
Modérateur
Lieu: Caen - Normandie - France
Date d'inscription: 30-01-2003
Messages: 5808
Site web

Script pour localisation & sources.list

Bonjour,

Un petit menu vous propose l'action à réaliser. Je me sers de ce script pour les nouvelles installations mais pourrait etre utile pour une remasterisation.

Vous pouvez le copier/coller dans un fichier texte.
Et l'executer (en root):
sh nom_du_fichier_texte

Capture:
http://joday.free.fr/images/capture/script/script.png

Code:

#!/bin/sh

while :
do
echo "********************************************";
echo "Choisir une action: ";
echo "********************************************";
echo "[1] Modifications des fichiers: ";
echo "/etc/locale.gen /etc/alias /etc/environnement";
echo "[2]Regeneration des locales:";
echo "commande [dpkg-reconfigure locales]";
echo "[3]Simplifier le /etc/apt/sources.list";
echo "[4]Mise à jour de la liste des paquets (apt-get update)"
echo "[q] pour quitter";
echo "********************************************";
echo -n "Entrer votre choix:";
read action
case $action in
1)
echo "______Sauvegarde: /etc/locale.gen________________________";

#Sauvegarde /etc/locale.gen
mv /etc/locale.gen /etc/locale.gen.orig

echo "______Modification: /etc/locale.gen________________________";

echo "# This file lists locales that you wish to have built. You can find a list
# of valid supported locales at /usr/share/i18n/SUPPORTED. Other
# combinations are possible, but may not be well tested. If you change
# this file, you need to rerun locale-gen.
#
# XXX GENERATED XXX
#
# NOTE!!! If you change this file by hand, and want to continue
# maintaining manually, remove the above line. Otherwise, use the command
# "dpkg-reconfigure locales" to manipulate this file. You can manually
# change this file without affecting the use of debconf, however, since it
# does read in your changes.

fr_FR@euro ISO-8859-15
fr_FR ISO-8859-1
fr_FR.UTF-8 UTF-8" > /etc/locale.gen

echo "_________Fin des Modifications: /etc/locale.gen________________";


echo "______Sauvegarde: /etc/locale.alias________________________";
mv /etc/locale.alias /etc/locale.alias.orig

echo "_________Modification: /etc/locale.alias________________"
echo "# Locale name alias data base.
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# The format of this file is the same as for the corresponding file of
# the X Window System, which normally can be found in
#  /usr/lib/X11/locale/locale.alias
# A single line contains two fields: an alias and a substitution value.
# All entries are case independent.

# Note: This file is far from being complete.  If you have a value for
# your own site which you think might be useful for others too, share
# it with the rest of us.  Send it using the glibcbug script to
# bugs@gnu.org.
bokmal    no_NO.ISO-8859-1
bokmål    no_NO.ISO-8859-1
catalan    ca_ES.ISO-8859-1
croatian  hr_HR.ISO-8859-2
czech    cs_CZ.ISO-8859-2
danish          da_DK.ISO-8859-1
dansk    da_DK.ISO-8859-1
deutsch    de_DE.ISO-8859-15
dutch    nl_NL.ISO-8859-1
eesti    et_EE.ISO-8859-1
estonian  et_EE.ISO-8859-1
finnish         fi_FI.ISO-8859-1
français  fr_FR.ISO-8859-15
french    fr_FR.ISO-8859-15
galego    gl_ES.ISO-8859-1
galician  gl_ES.ISO-8859-1
german    de_DE.ISO-8859-1
greek           el_GR.ISO-8859-7
hebrew          he_IL.ISO-8859-8
hrvatski  hr_HR.ISO-8859-2
hungarian       hu_HU.ISO-8859-2
icelandic       is_IS.ISO-8859-1
italian         it_IT.ISO-8859-1
japanese  ja_JP.eucJP
japanese.euc  ja_JP.eucJP
ja_JP    ja_JP.eucJP
ja_JP.ujis  ja_JP.eucJP
japanese.sjis  ja_JP.SJIS
korean    ko_KR.eucKR
korean.euc   ko_KR.eucKR
ko_KR    ko_KR.eucKR
lithuanian      lt_LT.ISO-8859-13
nb_NO    no_NO.ISO-8859-1
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
norwegian       no_NO.ISO-8859-1
nynorsk    nn_NO.ISO-8859-1
polish          pl_PL.ISO-8859-2
portuguese      pt_PT.ISO-8859-1
romanian        ro_RO.ISO-8859-2
russian         ru_RU.KOI8-R
slovak          sk_SK.ISO-8859-2
slovene         sl_SI.ISO-8859-2
slovenian       sl_SI.ISO-8859-2
spanish         es_ES.ISO-8859-1
swedish         sv_SE.ISO-8859-1
thai    th_TH.TIS-620
turkish         tr_TR.ISO-8859-9" > /etc/locale.alias;

echo "____________Sauvegarde: /etc/environment____________";
mv /etc/environment /etc/environment.orig

echo "____________Modification: /etc/environment____________";
echo "LANG=fr_FR@euro" > /etc/environment;

echo "[____________Ok -> fichiers modifiés__________________]";
;;

2)
echo "____________Regeneration des locales:________________";
dpkg-reconfigure locales;
;;
3)
echo "______Simplification /etc/apt/sources.list:________________";

#Sauvegarde sources.list:
mv /etc/apt/sources.list /etc/apt/sources.list.orig

#Trois adresses, vous pouvez en rajouter au besoin
echo "deb http://security.debian.org testing/updates main contrib non-free
deb http://ftp.fr.debian.org/debian unstable main contrib non-free
deb http://ftp.fr.debian.org/debian-non-US unstable/non-US main" > /etc/apt/sources.list;
;;

4)
echo "__MaJ de la liste des paquets a partir de /etc/apt/sources.list:___";
apt-get update
;;
q)
echo "____________Au revoir ! ____________";
exit 0 ;;
esac
done

[Centre de Documentation],
Membre de Linucie.net (s'occupe de la gestion de knoppix-fr tongue)
Mes bouines

Hors ligne

 

Pied de page des forums

Propuls� par PunBB
© Copyright 2002–2008 PunBB
Traduction par punbb.fr

[ Remonter en haut de page ! ]