Correct documentation for the forced-update option

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Complete removal of MODULE_TAG

Follow on from commit f2e9400

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Remove old comment in do_update_alias_table()

When commit 216b198 replaced this line:
 -  anychange += update_ok; /* Adjust forced update period on success */
with:
 +  anychange++; /* Adjust forced update period on success */
and removed these lines:
 -  /* Recalculate forced update period */
 -  p_self->forced_update_times = p_self->forced_update_period_sec / p_self->sleep_sec;
the comment became redundant.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Write PID file with trailing newline character

The Filesystem Hierarchy Standard, section 5.13 /var/run : Run-time
variable data, says a PID file must contain the PID in ASCII encoded
decimal, followed by a newline character.
    http://www.pathname.com/fhs/2.2/fhs-5.13.html

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Restore time since last update on program startup

The default forced update interval is 30 days and inadyn starts the
counter from zero on startup.  If your dynamic IP address hardly ever
changes and inadyn is stopped and restarted more frequently than the
forced update interval, inadyn will never update your DDNS record.  As a
result your DDNS account is likely to expire.

Inadyn already updates the cache file with the new IP address, even when
the IP address hasn't changed.  Just use the cache file's modification
time to initialize the time since the last update.

If an embedded device without a battery backed RTC starts it's clock
from a hard coded time, such as 01-Jan-2010 or earlier for example, it
would cause this code to perform a forced update immediately. Every
reboot of the device would do the same.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix issue #43: Add support for forced update using SIGUSR1

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Rename -t,--test to -o,-once for clarity.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix issue #44: support for --startup-delay SEC command line and .conf option

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix issue #32: Remove stale/non-working pSOS and Windows support

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Cleanup error handling and replace RC_TYPE enum with defines. POSIX 0 is OK

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Massive cleanup, change ALL_CAPS_TYPES to lower_caps_t type, etc.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Fix issue #33: Reindent all code to use Linux kernel style

Please note, the code derived from Polar SSL should use its
own coding style, for easier diff/patch merge from upstream.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Allow slightly longer lines, we're way past the space age.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Followup to 9ac3e6a, issue #44, make sure startup-delay is only used once.

The startup-delay is only supposed to be used once per program invocation,
i.e., not to be triggered on SIGHUP.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Explicitly initialize startup_delay_sec variable

... with its default of 0 seconds, rather than relying on memset(0) to
do the job further up init_context().

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Minor clean up to doing startup-delay only once

1) Make variable name more meaningful, startup -> first_startup.
2) Minimise scope of variable to enhance code readability.
3) Clarify comment explaining the purpose of the first startup delay.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Document SIGUSR1 in the manual page

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Minor update to logging of commands

Inadyn taking actions based on receipt of signals is important enough to
be logged.  Currently the forced update command is not logged and the
remaining commands are logged with priority debug.  Typically syslog
isn't configured to record debug messages.

1) Raise priority of logging commands from DEBUG to INFO.
2) Add logging of the forced update command on receipt of SIGUSR1.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Correct -L option in the manual page

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Enhance manual page documentation of the startup-delay option

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>