Commit Graph
13 Commits
Author SHA1 Message Date
Joachim Nilsson 6a5f4398a2 initctl: Check mkdir() for error and give helpful message on fail
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2020-01-06 21:37:07 +01:00
Joachim Nilsson 85261c9acd initctl: Create 'enabled' services directory if it doesn't exist
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-02-05 12:42:13 +01:00
Robert Andersson 12d14aae84 fix service enable/disable support
Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
2018-10-22 12:51:58 +02:00
Joachim Nilsson 90249e50ef initctl: Show available services if none given
In case a user forgets to type in the service to enable, disable, or
touch, we try to be helpful and list available services instead of
bugging out.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-06 18:41:36 +01:00
Joachim Nilsson bb3d9c8670 initctl: Add support for touch <CONF>, mark .conf for reload
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-22 12:50:18 +01:00
Joachim Nilsson 11dd877484 initctl: Fix possible divide by zero, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-18 23:01:07 +02:00
Joachim Nilsson f91205cbad initctl: list, only print whitespace separator between services
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-16 08:43:29 +02:00
Joachim Nilsson 11026d9da3 initctl: Minor, use local screen_cols rather than SCREEN_WIDTH
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-16 08:42:03 +02:00
Joachim Nilsson d22ffa05bd initctl: Refactor initctl list slightly
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-24 20:41:40 +02:00
Joachim Nilsson be6f0de0df Add util.c:screen_init() to probe screen size once per boot
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-04 20:58:43 +02:00
Joachim Nilsson 405cf4d997 initctl: Use actual terminal/screen width for table listings
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-04 12:55:34 +02:00
Joachim Nilsson b06502b0cb initctl: Use printheader() from libite for table headings
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-04 12:37:20 +02:00
Joachim Nilsson 3428cd48b7 Fix #71: Add support for enabling/disabling services in /etc/finit.d
This patch adds support for enabling and disabling services in
/etc/finit.d/ by adding another subdirectory:

    /etc/finit.d/available

Enabled service/run/task stanzas are by convention symlinked
to the parent dir.  The initctl tool has three new convenience
commands to facilitate operating with this:

   initctl list
   initctl enable  <CONF>
   initctl disable <CONF>

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-06-29 22:23:38 +02:00