One Script more

· 0 Comentarios

The computers in my work (around 800 GNU/Linux ofcourse) something doesn't detect the network configuration when te Operative System start, so we need to go to fix that, that's not problem, the problem is betwen 50 and 60 computers everyday lost the configuration and we need to fix it manualy, the problem is when i'm reading or studyng some manual, so here i leave one script to do it automatic, only edited crontab to execute all the day on intervals of one hour.
#!/bin/bash
#================================================
# Author: ll!z0 lliz0.lliz0@gmail.com
# Name: Restart_Net_Configuration.sh
# Date: Sat Jun 16 23:12:37 2007
# Description: Script to restart Network Config
# Use whith crontab
#================================================

#rm /tmp/ping*

a=4 b=0 c=3

ping -c3 127.0.1.1 > /tmp/ping.dat

sizefile=$(ls -s /tmp/ping.dat > /tmp/pingsize.dat  awk '{print$1}' /tmp/pingsize.dat)

if [ "$sizefile" -eq "$b" ]
then
echo "Size of ping.dat: $sizefile restarted net configuration">> /tmp/RND.log
/etc/init.d/network restart
fi

cat /tmp/ping.dat  grep receive > /tmp/package.dat
paqsend=$(cat /tmp/package.dat  awk '{getline; print(substr($4,1,2))}')

if [ "$paqsend" -eq "$b" ]
then
echo `date` " restarted net configuration -$paqsend-" >> /tmp/RND.log
/etc/init.d/network restart
fi

if [ "$paqsend" -eq "$c" ]
then
echo `date` " net configuration is correct -$paqsend-" >> /tmp/RND.log
fi 

Read VS Read

· 0 Comentarios

Sometimes my boss make me a question what is the diference between read and read?, there is not difference, i answered him, the only difference is if you understand what you read... And this stupid text so that? I was looking for how pass a directory whith ssh
# scp file root@host:/root
there is no problem with a file "el pedo" it was pass a directory, i read and read manuals without to find the answer, here this the important "the difference is if you understand what you read..." the problem was solved whit the parameter "-R"
# scp -R directory root@host:/root

Writing on NTFS Partitions

· 0 Comentarios

Support for NTFS in GNU/Linux was for a few years, read only, but in the actuality we can write on this, so here i leave a litle guide, how i gave support to write in partition NTSF under openSUSE 10.2.

Install NTFS write support We need add this repositorie or search and download the packages of internet.
In order we will install the following packages:

* fuse * ntfs-3g

Mount NTFS partition

Now edit the file /etc/fstab and add an entry, the filesystem will be mounted automatically at boot, now define the mount point directory (i.e. /mnt/C)

/dev/sda1 /mnt/C ntfs-3g user,users,gid=users,umask=0002 0 0

if you want mount a NTFS partition manually, we will use the ntfs-3g command especifying the disk partition as NTFS

Cameron:# ntfs-3g -o ro,gid=users,umask=0002 /dev/sda1 /mnt/C

If you can't find the ntfs-3g package in the repositories, try search and download the source from web site

* FUSE http://sourceforge.net/projects/fuse

* NTFS-3G http://www.ntfs-3g.org/

The Strokes

· 4 Comentarios

Last days i was listening music of The Strokes, so here l leave some videos of The Strokes, this rock band was founded 1998, but jump the fame in 2000,
A discography:
  * The Modern Age (EP)
  * Is This It
  * Room on Fire
  * First Impressions of Earth
So without more "preambulos y Jaladas" :-)
Heart In a Cage Reptilia Juicebox

Repositorio Local

· 0 Comentarios

Resulta ser que para no estar metiendo y sacando el DVD cada vez que quiera instalar software en mi openSUSE, solo saque una iso del DVD (gracias a "dd") y la agregue como repositorio desde YAST :-), ahora ,me di a la tarea de hacerlo con debian, ya que el equipo que tome no tiene grandes prestaciones ademas carece de unidad de DVD y NO se le dejara una, puesto que solo se usara para pruebas y una aplicación web, así­ pues me dispuse a googlear y encontré lo que buscaba aqui, aunque yo lo hice así:
dd if=/dev/cdrom of=/mnt/debian-31r1-i386.iso
echo "/root/debian-31r1-i386.iso iso9660 ro,loop 0 0" >>
 /etc/fstab
echo "deb file:///root/debian-31r1-i386.iso/ sarge main" >>
 /etc/apt/sources.list

­ agredesco al autor de esta guía por compartirla :-)

About Me

Mi foto
Soy Un Wey Aliviniado, prefiero tener cuates que amigos OGT con los OGT's

Labels