apt-mirror et translation i18

Il faut modifier /usr/bin/apt-mirror pour gérer les translations ligne 355 pour wheezy ligne 363 pour squeeze il vous faut trouver ces lignes de codes foreach (@components) { add_url_to_download($url . $_ . « /binary- » . $arch . « /Release »); add_url_to_download($url . $_ . « /binary- » . $arch . « /Packages.gz »); add_url_to_download($url . $_ . « /binary- » . $arch . « /Packages.bz2 »); et […]

Splitter un dump mysql avec Bash, en 1 dump par table

#!/bin/bash file=$1 # the input file directory= »$file-splitted » # the output directory output= »$directory/header » # the first file containing the header GREP= »DROP TABLE » # what we are looking for mkdir $directory # create the output directory while read line do # if the current line contains the wanted statement if [ $(echo « $line » | grep -c « $GREP ») […]

Collectd, monitorer mysql

coté collectd Host « localhost » User « collectd » Password « Secrets of the Universe with Philo » Database « mysql » # MasterStats true coté Ligne de commande mysql -u root mysql> CREATE USER ‘collectd’@’localhost’ IDENTIFIED BY ‘password’; mysql> GRANT SELECT, PROCESS, SHOW DATABASES, SUPER ON *.* TO ‘collectd’@’localhost’; mysql> FLUSH PRIVILEGES;

Envoyer des emails avec piece jointe en ligne de commande sous Linux

Envoi d’un email + pièce jointeecho "Ci-joint la photo de ma voiture" | mutt -s "Ma voiture" -a voiture.jpg — toto@toto.comLa même chose sans texte d’explication :echo | mutt -s "Ma voiture" -a voiture.jpg — toto@toto.comoumutt -s "Ma voiture" -a voiture.jpg — toto@toto.com < /dev/nullEnvoi d’un email avec plusieurs pièces jointes :echo | mutt -s […]

Onduleur XP 500VA Infosec

Debian Lenny – nut / Onduleur – Z3 Zenergy 700 VA (INFOSEC) Publié le Février 23, 2011 Configuration de nut pour l’onduleur Z3 Zenergy 700 – USB de INFOSEC System : Gnu/Linux Debian 5 – Lenny kernel : 2.6.26-2-486 Nut : 2.2.2-6.5 Vous avez acquis un onduleur. Malheureusement, celui-ci est partiellement supporté par nut (voir […]

Emulating a high latency network connection using Linux and TC

Often it is necessary for testing purposes to recreate the networking conditions found in a high latency network, such as a satellite link. Firstly create a network bridge that can be placed inbetween the test network and its router. To increase network latency use the following command: tc qdisc add dev eth0 root netem delay […]

Emulating a network connection with packet drop

IP packet drop can be easily emulated on any section of network using a Linux Bridge and a single iptables command: iptables -t mangle -A FORWARD -m statistic –mode random –probability 0.01 -j DROP (where probability is expressed as a value between 0 and 1) If the intention is to emulate packet drop to the […]

ShrimpWorks » Change your console resolution and colour depth

Pour la console système kernel : vga= Colors ( depth) 640×480 800×600 1024×768 1280×1024 1600×1200 —————+——-+——-+——–+———+——— 256 ( 8 bit)| 769 771 773 775 796 32,768 (15 bit)| 784 787 790 793 797 65,536 (16 bit)| 785 788 791 794 798 16.8M (24 bit)| 786 789 792 795 799 viaShrimpWorks » Change your console resolution […]

Chroot SSH et PTY allocation avec Debian Lenny Pour mettre en place des serveurs de backup, j’utilise un script chroot-ssh.sh qui permet la construction d’un chroot minimal pour faire tourner un serveur SSH et faire du rsync. Avec la mise-à-jour vers Lenny, l’allocation PTY réalisée par SSHD change : il ne semble plus possible de […]

Sonde IPMI sous Collectd et CGP

Sous /etc/rc.local modprobe ipmi_devintf modprobe ipmi_msghandler modprobe ipmi_si sous /etc/collectd/collectd/collectd.conf LoadPlugin ipmi plugin sensor.php devient ipmi.php