1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/bin/sh
#
# Run ADJTIMEX at startup.
### BEGIN INIT INFO
# Provides: adjtimex
# Required-Start: $local_fs
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: set the kernel time variables
# Description: set the kernel time variables
### END INIT INFO
. /lib/lsb/init-functions
test -x /usr/sbin/adjtimex || exit 0
# default values
TICK=10000
FREQ=0
# values in $cfg take precedence over the values here
cfg=/etc/default/adjtimex
test -r $cfg || exit 0
. $cfg
case "$1" in
start|restart|force-reload)
echo -n "Regulating system clock..."
/usr/sbin/adjtimex -tick "$TICK" -frequency "$FREQ"
echo "done."
;;
stop|status)
;;
*)
echo "/etc/init.d/adjtimex: unknown command $1" >&2
echo "Usage: /etc/init.d/adjtimex {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
exit 0
|