D.7. /etc/rc.d/init.d/setclock
# / Bin / sh
#################################################################### ######################
# Begin setclock
#
# Description : Setting Linux Clock
#
# Autori: Gerard Beekmans - [e-mail protejat]
# DJ Lucas - [e-mail protejat]
# Actualizare: Bruce Dubbs - [e-mail protejat]
#
# Versiune: LFS 7.0
#
#################################################################### ######################
### ÎNCEPE INFO INFO
# Oferă:
# Necesar-Start:
# Ar trebui să pornească: module
# Necesar-Oprire:
# Ar trebui să se oprească: $syslog
# Pornire implicită: S
# Oprire implicită:
# Short-Description: Stores and restores time from the hardware clock
# Description: On boot, system time is obtained from hwclock. The
# hardware clock can also be set on shutdown.
# X-LFS-Provided-By: LFS BLFS
### END INIT INFO
. /lib/lsb/init-functions
[ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock
case "${UTC}" in yes|true|1)
CLOCKPARAMS="${CLOCKPARAMS} --utc"
;;
no|false|0)
CLOCKPARAMS="${CLOCKPARAMS} --localtime"
;;
ESAC
case ${1} in start)
hwclock --hctosys ${CLOCKPARAMS} >/dev/null
;;
Stop)
log_info_msg "Setting hardware clock..." hwclock --systohc ${CLOCKPARAMS} >/dev/null evaluate_retval
;;
*)
echo „Utilizare: ${0} {start|stop}” ieșirea 1
;;
ieșire esac 0
*)
echo „Utilizare: ${0} {start|stop}” ieșirea 1
;;
ieșire esac 0