Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fake-hwclock(8) [debian man page]

FAKE-HWCLOCK(8) 					      System Manager's Manual						   FAKE-HWCLOCK(8)

NAME
fake-hwclock - Control fake hardware clock SYNOPSIS
fake-hwclock [ command ] [ force ] BACKGROUND
Many embedded Linux systems do not have a functional hardware clock. Either they simply don't have a hardware clock at all or they have a hardware clock but it is not usable (e.g. because Linux doesn't know how to use it or because no battery is present). This can lead to time moving backwards to some default value (often 1970) when the system is rebooted. Since lots of software assumes that time only moves forward this is a bad thing. NTP can (and should where practical) be used to sync with an external timeserver but it is not available early in the boot process and may be unavailable for other reasons. DESCRIPTION
fake-hwclock sets and queries a fake "hardware clock" which stores the time in a file. This program may be run by the system administrator directly but is typically run by init (to load the time on startup and save it on shutdown) and cron (to save the time hourly). If no command is given then fake-hwclock acts as if the save command was used. COMMANDS
save Save the time to the file. load Load the time from the file. If force is specified fake-hwclock will move the clock either backwards or forwards. Otherwise it will only move it forwards. FILES
/etc/fake-hwclock.data The file used to store the time /etc/init.d/fake-hwclock The init script used to run fake-hwclock on startup and shutdown /etc/default/fake-hwclock Settings file for the init script. /etc/cron.hourly/fake-hwclock Cron job used to save the time hourly ENVIRONMENT VARIABLES
FILE set the file used by fake-hwclock RETURN VALUES
1 is returned for invalid commands. 0 is returned in all other cases. BUGS
This approach can only provide a crude approximation of what a real hardware clock provides. Use of NTP or another method to keep the time in sync is strongly advised. Debian 5 April 2012 FAKE-HWCLOCK(8)

Check Out this Related Man Page

FAKE(8) 						      System Manager's Manual							   FAKE(8)

NAME
fake - IP address takeover tool SYNOPSIS
fake [remove] IP_ADDRESS DESCRIPTION
The fake utility enables the switching in of a backup server by bringing up an additional interface and using ARP spoofing to take over IP_ADDRESS. Variants of the script have been used extensively at Zip World (http://www.zipworld.com.au/) for backing up mail, web and proxy servers. Although this system has been shown to work you are well advised to test the system thoroughly before putting it into production. Please read the documents in /usr/share/doc/fake/ for an explanation of how fake works and for a discussion of issues surrounding its use. OPTIONS
remove Stop the takeover of an IP address. Without this option, fake starts the takeover of an IP address. GLOBAL CONFIGURATION FILE
The global configuration file is in /etc/fake/.fakerc. The settings there are overridden by those in ${HOME}/.fakerc. Here is a sample configuration file. ############################################################ # Set up basic environment for fake # Variables are set as bash variables # i.e. <VARIABLE>=<value> # # Must set: # ARP_DELAY: Delay in seconds between gratuitous ARP # PID_DIR: Directory where PID files are kept # INSTANCE_CONFIG_DIR: Directory where specific # configuration files for an IP address takeover are kept # CLEAR_ROUTERS_FILE: New line delimited list of routers to rsh # to and execute "clear arp-cache" # FAKE_RSH: Programme to use to "rsh" to another machine # to obtain macaddress by running ifconfig # # PATH can be set here to ensure that send_arp is in the # path ############################################################ FAKE_HOME="/etc/fake" #PATH=/sbin:/usr/sbin:/bin:/usr/bin ARP_DELAY=1 CLEAR_ROUTERS_FILE="$FAKE_HOME/clear_routers" PID_DIR="/var/run" INSTANCE_CONFIG_DIR="$FAKE_HOME/instance_config" #Only needed if you wish to send gratuitous ARP #advertising the "real" mac address when turning fake off #FAKE_RSH=ssh INSTANCE CONFIGURATION
To configure an instance of fake, create /etc/fake/instance_config/<IP-address-to-take-over>.cfg with the following format: SPOOF_IP=<IP-address-to-take-over> The SPOOF_IP variable must contain the same IP address as appears in the name of the file. This is checked at run time. IFCONFIG=TRUE|FALSE SPOOF_NETMASK=<netmask-of-network-that-IP-address-to-take-over-is-on> TARGET_INTERFACE=<interface-to-bring-up> If the IFCONFIG variable is set to TRUE, the address specified by SPOOF_IP will be brought up on the interface specified by TARGET_INTER- FACE; SPOOF_NETMASK and TARGET_INTERFACE must also be defined. For obvious reasons it is very important that the TARGET_INTERFACEs of running instances of fake all be different from one another. Optionally if you wish to rsh to the main server and advertise the "real" MAC address when turning fake off then set the following; FOREIGN_INTERFACE=<interface-on-foreign-host-with-MAC-address-to-use> FOREIGN_ARP=<number-of-ARPs-to-send-with-real-MAC-address> To use this last feature in an automated fashion you will need to be able to $FAKE_RSH to $SPOOF_IP from the host that fake runs on without manual authentication. With rsh this is typically achived using .rhosts; with ssh an RSH key with an empty passphrase can be employed. Here is an example of /etc/fake/instance_config/203.12.97.7.cfg: SPOOF_IP=203.12.97.7 IFCONFIG=TRUE SPOOF_NETMASK=255.255.255.0 TARGET_INTERFACE=eth0:2 FOREIGN_INTERFACE=eth0 FOREIGN_ARP=5 ACTIVATION
To activate fake, run: fake <IP-address-to-take-over> & Logs will be made to the local0.notice syslog facility. On startup you should see messages in the syslog; running ifconfig should show the new interface; running route should show a route for the spoofed IP address on the new interface (which is needed so the machine that fake is running on can communicate correctly to this IP address); and running tcpdump -i <interface> arp should show the gratuitous ARP packets. DEACTIVATION
To deactivate, run: fake remove <IP-address-to-take-over> As of version 1.1.2 the fake process can be sent a SIGTERM or SIGHUP to effect the removal. On removal you should see a message in the syslog; ifconfig should show that the new interface has been removed; route should show that the new route has been removed; and tcpdump should show that the gratuitous ARP has stopped. Note: Activating fake multiple times with the same arguments has the same effect as activating it once. Similarly, deactivating fake mul- tiple times with the same arguments has the same effect as deactivating it once. FILES
/etc/fake/.fakerc /etc/fake/clear_routers /etc/fake/instance_config/<IP-address>.cfg /var/run/fake.<IP-address>.pid AUTHOR
Horms <horms@verge.net.au> 9 June 2004 FAKE(8)
Man Page