Commit Graph
1344 Commits
Author SHA1 Message Date
Joachim Nilsson 227dda34f7 cond_set_path(): Log error if unlink() fails
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-12 01:23:16 +02:00
Joachim Nilsson 06479aa5f1 Remove reconf condition when .conf reload completes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-12 01:07:09 +02:00
Joachim Nilsson 75d29de3cc initctl: Use entire screen width for task/service description
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-12 00:19:10 +02:00
Joachim Nilsson 40fc95047d Prevent 100% CPU, allow bootstrap tasks to fully complete
When collecting a bootstrap task we need to allow its state machine to
complete before cleaning them out.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 23:53:34 +02:00
Joachim Nilsson 5551324291 Minor, comment style
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 23:52:20 +02:00
Joachim Nilsson 46cef811d6 Make sure to step state machine when collecting bootstrap tasks
During the runlevel change from S --> 2 the state machine will pause,
waiting to collect all S-only tasks/services, before continuing.

When an S-only task/service is collected we therefore need to call the
state machine again so that it can reassert all conditions properly.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 23:02:13 +02:00
Joachim Nilsson 52ccd6d662 Use correct grammar form
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 22:54:48 +02:00
Joachim Nilsson 70afaa16f5 sm_step(): Log pending stopped svc if we exit state machine
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 22:05:33 +02:00
Joachim Nilsson 8a1015cf3e API refactor, allow svc_stop_completed() to return the pending svc
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 22:04:17 +02:00
Joachim Nilsson 586f0a7799 Live debug stopped but not yet collected tasks
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 21:56:49 +02:00
Joachim Nilsson 474bd2f361 Minor, comment style
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 21:56:31 +02:00
Joachim Nilsson 0caa8330b7 Increase live debugging of main state machine
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 21:41:42 +02:00
Joachim Nilsson c8d8c817e7 Minor, cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 21:29:21 +02:00
Joachim Nilsson 0d9542c222 Live debug
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-11 21:29:15 +02:00
Joachim Nilsson b6be354508 Minor, whitespace
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 23:39:22 +02:00
Joachim Nilsson 448c6749d6 Add missing debug calls to RTM_NEWLINK and RTM_DELLINK
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 22:53:19 +02:00
Joachim Nilsson 0f09c1b0dc Minor, comment fix
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 22:53:05 +02:00
Joachim Nilsson 7db6611593 Debian GNU/Linux: Minor caveats
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 22:15:27 +02:00
Joachim Nilsson c9b13759a2 Debian GNU/Linux: Install finit.* using install and cp
A recursive cp is requried for finit.d

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 18:50:58 +02:00
Joachim Nilsson 449c712329 Remove old symlinks and install finit.d directory instead
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 16:15:36 +02:00
Joachim Nilsson e27283c5e6 Add extra spacing
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 16:14:27 +02:00
Joachim Nilsson f337efcc35 Debian GNU/Linux: Update install script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 16:13:22 +02:00
Joachim Nilsson 3c7eaff7b3 Debian GNU/Linux: Update and sync build instructions with Alpine
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 12:00:04 +02:00
Joachim Nilsson d4d42a7a75 Debian GNU/Linux: Convert finit.conf to finit.d/*.conf
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 11:59:29 +02:00
Joachim Nilsson 3c1c5621a5 Alpine Linux: Slight update + sync with Debian
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-10 11:46:02 +02:00
Joachim Nilsson 2d9c147e0e Minor, fix comment within comment GCC warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-09 09:03:58 +02:00
Joachim Nilsson 53de1c8575 Follow-up to issue #81, don't append error message again.
Also, when called multiple times, return workaround immediately instead
of warning again.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-01 22:07:21 +02:00
Joachim Nilsson 3d4e3c99ed Fix #81: Workaround for systems without SYSV shm IPC support
We should not let PID 1 fail on systems where Linux is built without
CONFIG_SYSVIPC, or the libc does not support shmget()/shmat().

This workaround implements a fallback to using calloc() for PID 1,
which means the initctl tool will not work properly.  A better fix
would be to refactor the shm implementation to instead have initctl
call Finit using api.c for each svc_t.  This has been added to the
TODO file as future work.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-01 20:52:01 +02:00
Joachim Nilsson c1b6c7e840 TODO: Remove shm, as soon as possible
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-01 20:01:57 +02:00
Joachim Nilsson f17515d791 Merge pull request #80 from joerg-krause/patch-1
helpers.h: fix build error: unknown type name ‘va_list’
2017-10-01 18:56:45 +02:00
Jörg Krause 48262e4250 helpers.h: fix build error: unknown type name ‘va_list’
Building finit with a uclibc-ng-toolchain fails with:
```
../src/helpers.h:53:43: error: unknown type name ‘va_list’
 void    printv          (const char *fmt, va_list ap);
```
2017-10-01 16:50:39 +02:00
Joachim Nilsson 9d9dc74768 Minor corrections
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-01 01:26:43 +02:00
Joachim Nilsson e1d1d1c795 Makefile: Remove service script wrapper from distribution as well
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-30 12:16:33 +02:00
Joachim Nilsson fcfef0af47 Initial cleanup + refactor of Debian contrib files
We should no longer need to rely on runparts to handle initial set up of
keyboard and console.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-30 10:26:03 +02:00
Joachim Nilsson c44c217c4a Clean up unused and long since deprecated contrib files/patches
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-30 10:23:21 +02:00
Joachim Nilsson d60fc1ce62 Refactor, simplify
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-29 01:22:10 +02:00
Joachim Nilsson 0a12997d32 Try right aligning Finit3 logo
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-29 01:21:07 +02:00
Joachim Nilsson dce8031c83 Clarify, early on, that conditions also stop services.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-28 08:22:41 +02:00
Joachim Nilsson bd9d9c8303 Add early example of conditions in service stanza
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-28 08:22:28 +02:00
Joachim Nilsson 956acc4b93 Update getty overview
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-28 08:10:31 +02:00
Joachim Nilsson 5ed54d79fc Update configure flags
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 09:27:15 +02:00
Joachim Nilsson acc77c27c3 Add URL to initctl reference
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 09:23:54 +02:00
Joachim Nilsson bcb9fe039a Move running and debugging to doc/build.md
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 09:22:04 +02:00
Joachim Nilsson 55f44386d1 Clarify focus, refer to examples and tell what the screenshot is
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-09-27 09:09:23 +02:00
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