diff options
author | Dermot Bradley <dermot_bradley@yahoo.com> | 2020-08-27 01:39:40 +0100 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2020-11-27 18:06:38 -0600 |
commit | 57d9528a0bc64366ea3e0fbbb21b1282ce5c1212 (patch) | |
tree | 52c66a62217cb6ffe73ad800272ae02174722c83 | |
parent | 6ce48f124aea593b77163d6f198d18bbe9093068 (diff) |
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.
-rw-r--r-- | init.d/osclock.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/init.d/osclock.in b/init.d/osclock.in index cd089af2..7f645d09 100644 --- a/init.d/osclock.in +++ b/init.d/osclock.in @@ -17,3 +17,15 @@ 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 +} |