Your Acme board has two clocks:
date is the Linux command to manage the systems clock.
To read the currently System Clock type:
~# date Fri Oct 8 17:44:42 CEST 2010
To set it type:
~# date -s "8 OCT 2010 18:45:00" Fri Oct 8 18:45:00 CEST 2010
This time is active until the main power supply board is on. When off the system clock is lost.
To read the Hardware Clock type:
~# hwclock -r Fri Oct 8 17:46:43 2010 -0.004115 seconds
To set the Hardware Clock using the System Clock current time type:
~# hwclock -w
Now check it typing:
~# date Fri Oct 8 18:49:02 CEST 2010 ~# hwclock -r Fri Oct 8 18:49:10 2010 -0.004076 seconds
~# dpkg-reconfigure keyboard-configuration ~# invoke-rc.d keyboard-setup start
To change the Ethernet parms on the fly type this command:
~# mii-tool [-F mode] eth0 ...
Where mode can be:
The setting will be valid until the next system reboot.
Edit the /etc/network/interfaces file and the bold line if you are using the dchp:
auto eth0 iface eth0 inet dhcp up mii-tool -F 10baseT-HD eth0
or this line if you are using a static IP configuration:
auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 up mii-tool -F 10baseT-HD eth0
the reboot or type:
~# ifdown eth0 ... ~# ifup eth0 ...
This article explains how to automount an USB stick when inserted and unmount it automatically when unplugged
The automounter facility is managed by autofs. Autofs controls the operation of the automount daemons. The automount daemons automatically mount filesystems when they are used and unmount them after a period of inactivity. This is done based on a set of pre-configured maps.
To install autofs type:
~# apt-get update ~# apt-get install autofs
Insert an USB stick and check on which device it appears by typing:
usb 1-2: new full speed USB device using at91_ohci and address 2 scsi0 : usb-storage 1-2:1.0 scsi 0:0:0:0: Direct-Access UDISK PDU01-8G 8AH2.0 0.00 PQ: 0 ANSI: 2 sd 0:0:0:0: [sda] 15794176 512-byte logical blocks: (8.08 GB/7.53 GiB) ... sd 8:0:0:0: [sda] Assuming drive cache: write through sda: ...
In this case the device is /dev/sda. If your USB stick has more than one partition you will see sda1, sda2, etc. for each partition.
Edit the file /etc/auto.master adding this line:
/var/autofs/removable /etc/auto.removable --timeout=2
Now create the file /etc/auto.removable with this contents:
usbstick -fstype=vfat,rw,umask=002 :/dev/sda
then restart autofs typing:
~# /etc/init.d/autofs restart
Now move to the /var/autofs/removable directory:
~# cd /var/autofs/removable /var/autofs/removable# ls /var/autofs/removable# ls usbstick [ .. list on my files on the usbstick ]
As you can see the usbstick directory will appear when requested and disappear after 2 seconds.
The most part of application program log created on /var/log are created by rsyslog daemon. To disable it type:
~# cd /etc/rc2.d /etc/rc2.d# mv S01rsyslog K01rsyslog
The system message log on /var/log/dmesg is created by bootlogs daemon. To disable it type:
~# cd /etc/rc2.d /etc/rc2.d# mv S01bootlogs K01bootlogs
Comment the line:
session optional pam_lastlog.so
The Debian package installation utility apt-get keeps all the packages it has downloaded in case they are needed in the future in /var/cache/apt/archives directory.
It is possible to save space removing them by typing: