Commit Graph
1300 Commits
Author SHA1 Message Date
Joachim Nilsson 37983e69c4 Clarify service stanza and simplify text further
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 09:08:32 +02:00
Joachim Nilsson a45a872c28 Simplify introduction a lot, focus on screenshot and example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 08:43:53 +02:00
Joachim Nilsson 152b2be8ea Clarify warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 08:43:27 +02:00
Joachim Nilsson 1677436137 initctl: Allow C99 style
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-26 10:39:45 +02:00
Joachim Nilsson c69ca6847a Update ToC and move references to alternative init systems here
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-25 19:06:07 +02:00
Joachim Nilsson f8147214f1 doc/config.md: Significant update, less limitations for /etc/finit.d
- Detail limitations in separate section
- Focus on syntax early in document
- Overhaul and simplify introduction

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-25 19:03:22 +02:00
Joachim Nilsson 56eec5164d Minor, update code comment
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-25 19:02:19 +02:00
Joachim Nilsson e58f84f3fb Update introduction, much system config can be done using finit.d
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-24 20:54:27 +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 2e66db3fea helpers.c:printv() - Iterate over size of buffer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-24 20:40:44 +02:00
Joachim Nilsson 376811c1a7 doc/config.md: Update run and task, mention pipes + redirects
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-21 22:52:48 +02:00
Joachim Nilsson 9b5f2388c1 Alpine Linux: Add LXDM service .conf
Enable LXDM using:

    initctl enable lxdm
    initctl reload

The latter command reloads all /etc/finit.d/*.conf files and starts lxdm
in runlevels 2-5.

Remember to first edit /etc/lxdm/lxdm.conf, necessary to get a session.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 15:33:56 +02:00
Joachim Nilsson 686193b701 Only load modules at bootstrap
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 14:03:56 +02:00
Joachim Nilsson b43bca529c Minor, fix build error
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 13:57:23 +02:00
Joachim Nilsson 545171a8b2 Minor, improve comments in parse_dynamic()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 13:50:44 +02:00
Joachim Nilsson d54d5b7f20 Allow kernel modules to be loaded from /etc/finit.d/*.conf
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 13:48:07 +02:00
Joachim Nilsson e52d952ca5 Alpine: Move bootstrap services and setup from finit.conf to finit.d/*.conf
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 13:30:36 +02:00
Joachim Nilsson 633a56054b Add support for boot[S]trap services in /etc/finit.d/*.conf
This patch enables support for bootstrap services in /etc/finit.d/

Please note, however, that this does not mean that all configuration
directives are now allowed in /etc/finit.d/*.conf -- the intention is
only to simplify distribution setups.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 13:21:11 +02:00
Joachim Nilsson 3eeb966f15 Alpine Linux: Simplify build instructions by referencing script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 12:55:32 +02:00
Joachim Nilsson d09253bdbd Make Alpine build script executable
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 12:50:36 +02:00
Joachim Nilsson 0052793a46 Update Alpine Linux README
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 11:41:05 +02:00
Joachim Nilsson 333871caf2 Minor, reorder
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 11:40:56 +02:00
Joachim Nilsson ef9d0c479e Load mousedev kernel driver for Alpine installs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 01:40:24 +02:00
Joachim Nilsson d5cce03a76 Enable D-Bus plugin for Alpine installs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-10 01:39:23 +02:00
Joachim Nilsson 744903d455 Alpine Linux finit.conf, clear space at end for easy script append
Restore original file layout somewhat, it's better if we clear the space
at the end of the file for easy `cat BOOTSTRAP.conf >>/etc/finit.conf`

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-06 08:12:44 +02:00
Joachim Nilsson cc00be48b5 Move runlevel stanza to the end, possibly more intuitive
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 21:24:59 +02:00
Joachim Nilsson b45a37ca47 Add simple build script for targeting Alpine
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 21:20:32 +02:00
Joachim Nilsson f1f9ee712a Refactor Alpine example to use /etc/finit.d/*.conf for services
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 21:15:11 +02:00
Joachim Nilsson 7c4a9ad5af alpine: Migrate rc.local bootstrap tasks to finit.conf
Finit now supports pipes and redirects in run/task stanzas.  Hence, we
can reduce rc.local to an example template.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 20:16:54 +02:00
Joachim Nilsson f3a000560f exec_runtask(): Refactor, remove GLIBC:isms to build with musl
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 20:05:22 +02:00
Joachim Nilsson fdd13c1ae1 README: New shell redirect + pipe possibilities with task + run
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:35:22 +02:00
Joachim Nilsson 0585767258 README: Update tty configuration examples with noclear + nowait
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:35:04 +02:00
Joachim Nilsson 9e7e92b4b7 run stanzas are never caught in service_monitor()
A run stanza blocks operation by calling waitpid(), so it will never be
caught by the service_monitor() function.  Hence, we need to clean up
any bootsrap calls after waitpid(), or at least perform a manual state
change.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:02:23 +02:00
Joachim Nilsson 29822ef0f7 Always collect bootstrap tasks, regardless of previous runlevel
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:02:01 +02:00
Joachim Nilsson 718e82bc10 svc_clean_dynamic(): Actually clean dirty services ...
Add missing call to svc_mark_clean() in while() loop.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:01:05 +02:00
Joachim Nilsson 684314db0f Allow pipe + redirect in task/run stanzas, exec() in /bin/sh
This patch extends the capabilities of task and run .conf stanzas by
enabling pipes and redirects.

Example:

    task [s] echo "foo" | cat >/tmp/bar
    run  [s] echo "$HOME" >/tmp/secret

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 16:00:49 +02:00
Joachim Nilsson 442598282f Update Alpine Linux sample to latest Finit dev.
- Show progress when booting
- Use noclear + nowait on TTY's
- Update `loadkmap` args

Works on Alpine Linux 3.4 .. 3.6

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-04 07:19:12 +02:00
Joachim Nilsson 3e2b78305d Update finit.conf tty documentation
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 06:45:29 +02:00
Joachim Nilsson 8eea64cebf getty: Set $TERM environment variable if given in tty config
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 06:41:22 +02:00
Joachim Nilsson b8a7cb6b93 tty-register(): Fix regression in built-in TTY baud + term parser
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 06:40:52 +02:00
Joachim Nilsson 529b39ebba tty: Add 'noclear' + 'nowait' options to built-in and external tty's
This patch aligns the two tty configuration stanzas, thus clear and wait
are now the default for both.

    tty [LVLS] <DEV> [BAUD] [noclear] [nowait] [TERM]
    tty [LVLS] <CMD> <ARGS> [noclear] [nowait]

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 06:10:08 +02:00
Joachim Nilsson f029ba2111 Reorder functions a bit, group run_getty*() family
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 05:50:50 +02:00
Joachim Nilsson 277c3dbb14 getty: Remove TTY clear from built-in getty, delegate to run_getty()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-01 05:47:53 +02:00
Joachim Nilsson f273ecc135 Fix #79: Add 'nowait' option to tty setting, external getty
This patch makes it possible to disable the "Please press Enter" prompt
when using an external getty. Simply append `nowait` to the .conf entry
and Finit will spawn the getty immediately.

A future patch will add support for `noclear` as well to external getty,
as well as a change in default (=> `wait`) for the built-in getty.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-31 00:51:11 +02:00
Joachim Nilsson 2fe257b7af getty.c: Handle Ctrl-U properly, erase line to beginning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 17:19:43 +02:00
Joachim Nilsson 907595d9ed getty.c: Ignore signals like SIGINT, SIGHUP
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 17:19:12 +02:00
Joachim Nilsson 55c12aa6f6 Remove developer debug message
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 15:08:14 +02:00
Joachim Nilsson 04891d3e5b Update and align service descriptions in finit.conf example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 15:05:31 +02:00
Joachim Nilsson 9973cd22a5 Update sample .conf files after purge of startx and user settings
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 15:02:39 +02:00
Joachim Nilsson a2f4b35e4e Fix #77: Remove deprecated startx and user .conf settings
It is strongly recommended to instead use the service stanza to start
XDM/GDM, or use startx after a regular login.

Note: the `user NAME` setting was always reserved for use with startx

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 15:01:05 +02:00