Catégories: "Informatique"
Les packages debian avec dotdeb
Juillet 21st, 2005J'avais écris un petit truc pour expliquer comment forcer debian à utiliser des packages spécifiques. Mais comme Gui ne tagge (release) plus ses packages , j'ai du changer les informations dans /etc/apt/preferences pour :
# En global Package: * Pin: origin packages.dotdeb.org Pin-Priority: 990 # Pour un package spécifique Package: php4 Pin: origin packages.dotdeb.org Pin-Priority: 990 Package: php4-common Pin: origin packages.dotdeb.org Pin-Priority: 990 Package: libapache-mod-php4 Pin: origin packages.dotdeb.org Pin-Priority: 990 [...]
X Drive III from Memup under Linux (2.6)
July 8th, 2005Just a quick memo for me and other who will get this external harddrive/card reader.
This box contains a 60 go (in fact 56) and can read a few memory card : CF I and II, MS, MS Pro, SD, MMC, IBM MicroDrive, RS-MMC, mini-SD, MS Duo and MS Pro Duo.
As I don't want to reboot under Windows each time I want to use it, here is the procedure to have it working under Linux.
You need a few modules :
- SCSI disk support (BLK_DEV_SD) -> Device Drivers -> SCSI device support -> SCSI device support (SCSI [=y]) -> SCSI disk support - Qlogic QLA 1240/1x80/1x160 SCSI support (SCSI_QLOGIC_1280) -> Device Drivers -> SCSI device support -> SCSI device support (SCSI [=y]) -> SCSI low-level drivers -> Qlogic QLA 1240/1x80/1x160 SCSI support - USB Mass Storage support (USB_STORAGE) -> Device Drivers -> USB support -> Support for Host-side USB (USB [=y]) -> USB Mass Storage support
It should be enough. Recompile kernel/modules. Reboot
Plug the two USB connectors (DON'T forget to plugin both if it is not working with only one because of the lack of energy provided by my laptop).
If you try the command lsusb, you should see that :
Bus 001 Device 008: ID 0d7d:1470 Phison Electronics Corp.
And in /var/log/kern.org, you should get messages :
Jul 8 16:34:18 zoidberg kernel: usb-storage: scsi cmd done, result=0x0 Jul 8 16:34:18 zoidberg kernel: usb-storage: *** thread sleeping. Jul 8 16:34:18 zoidberg kernel: SCSI device sda: 117210240 512-byte hdwr sectors (60012 MB) Jul 8 16:34:18 zoidberg kernel: sda: assuming drive cache: write through
Then, you should be able to mount the /dev/sdXX (sda1 for me) partition where you want with the command :
mount -t vfat /dev/sda1 /mnt/external
Or add in the /etc/fstab this line :
/dev/sda1 /mnt/external vfat rw,user
Edit : comments are closed. Thank your spammer.
Mass DNS Test
July 3rd, 2005Imagine that you are dirty with your DNS server. You make some modifications very often and you are not sure when your DNS server is up, RFC and running. Here is a little script which will automatically test some domains and send emails in case of error.
In order to test domains validity, I use DNSdoctor (http://www.dnsdoctor.org/), a fork from Zonecheck (http://www.afnic.fr/outils/zonecheck), a tool developed to perform verifications on the quality of the configuration (it is mandatory with a .fr to have the domain correctly configured). DNSdoctor exists with a few GUI :
- the web interface - http://demo.dnsdoctor.org/
- a classical application using GTK
- a command line application
Of course, I am using the last one to perform the automatic testing system.
As DNSdoctor has been made using Ruby, I made this script with this language (I don't want to have to install python for this script). It will call the DNSdoctor with the appropriate parameters. If an error is detected, it will send an email associated to the domain in the configuration.
If an error occurs, this kind of email will be sent :
ZONE : ledru.info. NS <= : akira.ecranbleu.org. [195.137.249.60] NS : radium.meaweb.com. [83.217.68.103] NS : trunks.ecranbleu.org. [195.137.249.61] [> ICMP answer w> Host doesn't reply to ICMP requests (firewall?) => radium.meaweb.com./83.217.68.103 => akira.ecranbleu.org./195.137.249.60 => trunks.ecranbleu.org./195.137.249.61 [> UDP connectivity f> Server doesn't listen/answer on port 53 for UDP protocol | Ref: IETF RFC1035 (p.32 4.2. Transport) | The DNS assumes that messages will be transmitted as datagrams or in | a byte stream carried by a virtual circuit. While virtual circuits can | be used for any DNS activity, datagrams are preferred for queries due | to their lower overhead and better performance. `----- -- -- - - - => radium.meaweb.com./83.217.68.103 ==> FAILURE (and 3 warning(s))
#!/usr/bin/ruby require 'net/smtp' ###########" Parameters ############### pathCommand="export LANG=en_EN; /usr/bin/dnsdoctor" paramCommand="-q -vn,d,x,-c " logFile="/tmp/massDNS.log" subject="DNS error" from="tech@linesurf.com" testDNS= [ {'domain'=>'ecranbleu.org', 'email'=>'email@domain.com'}, {'domain'=>'ledru.info', 'email'=>'email@mondomaine.com'} ] def sendmail(from,to,content) # --- Send using class methods msg = [ "Subject: Test\n", "\n", content ] Net::SMTP.start('localhost') do |server| server.sendmail( msg, from , [ to ] ) end end ######### Don't edit under ############# command="#{pathCommand} #{paramCommand} " for domain in testDNS puts "Processing of #{domain['domain']}" commandLine=command + domain['domain'] system(commandLine +' > '+ logFile +' 2>&1') if ($? != 0) content="" IO.foreach(logFile) { |line| content+=line } sendmail(from,domain['email'],content) puts "Erreur" end File.delete(logFile) end
Edit : comments are closed. Thank you spammer.
Nouveau menu fvwm
Juin 14th, 2005Un ami testant mon interface graphique chez lui, il s'est mis dans la tête de faire la même chose avec mac au niveau du menu (à savoir les icones qui grossissent quand la souris passe dessus).
Connaissant relativement bien Fvwm, je l'ai donc aidé. Après quelques recompilations de Fvwm avec les quelques patchs de rigueur (fvwm-2.5.9-translucent-menus.diff pour les menus transparents et fvwm-2.5.10-fvwmbuttonshover.diff pour le mouseOver) et un changement de tous les icones pour des plus récents, voila le résultat de la manipulation.
Menu Fvwm
Pas à dire, bien tunné, FVWM explose beaucoup d'interfaces graphiques même celles développées par des boites de Seattle.
Les icones viennent de deux thèmes d'icones : aCurve & Etiquette.
Argument list too long
Mai 3rd, 2005I have to compile a big software for work. It is using the opencascade toolkit to develop and compile.
It compiles everything itself (nice but tricky).
However, I don't have too much control on the compilation directives and as it is automatic, it produces sometimes some huge command line to compile one lib (I have a gcc command line of 1300 lines ...). And the kernel refuses a command of that size with a nice :
/usr/bin/g++: Argument list too long. or /usr/bin/g++: Liste d'arguments trop longue. in French
As I don't want to hack Opencascade, the only "clean" solution I found is to recompile the kernel :
Edit the file /usr/src/linux/include/linux/binfmts.h Here is the crappy trick ! |