openrc/init.d/osclock.in
Dermot Bradley 57d9528a0b Remove warning when osclock init.d script runs
Currently when osclock is enabled as a init.d service the following
messages appear during boot when osclock starts:

  * The command variable is undefined.
  * There is nothing for osclock to start.
  * If this is what you intend, please write a start function.
  * This will become a failure in a future release.

osclock is activated whenever a machine's system clock is automatically
configured from a RTC by the kernel and the osclock's only purpose is to
satisfy the "clock" dependency defined by other init.d services.

Adding a stub start() function prevents OpenRC from showing warnings but
continues to ensure that the osclock service still does not actually do
anything.

This fixes #377.
2020-11-27 18:06:38 -06:00

32 lines
947 B
Plaintext

#!@SBINDIR@/openrc-run
# Copyright (c) 2014-2015 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
# Can be used on OSs that take care of the clock.
description="Provides clock"
depend()
{
provide clock
}
start()
{
# This stub function is required to avoid OpenRC warning at boot:
#
# * The command variable is undefined.
# * There is nothing for osclock to start.
# * If this is what you intend, please write a start function.
# * This will become a failure in a future release.
#
return 0
}