Joachim Nilsson
07d6e69c30
bootmisc: Check return value from getgroup()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-18 10:10:13 +02:00
Joachim Nilsson
d2053bd07d
bootmisc: Follow-up to f4662d8
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-18 10:09:15 +02:00
Joachim Nilsson
f4662d8c06
boomisc: Create /run/uuid for Void Linux if uuid user exists
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-18 10:05:46 +02:00
Joachim Nilsson
7a2667d34c
plugins/dbus: Free cmd returned from which() when done
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-15 23:01:10 +02:00
Joachim Nilsson
f39cd50762
plugins/dbus: Use cmd found by which() to start dbus-daemon
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-15 22:48:04 +02:00
Joachim Nilsson
ddeed15191
plugins/dbus: Start dbus-daemon with absolut path
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-15 22:45:01 +02:00
Joachim Nilsson
b02f241e5e
plugin/dbus.c: Minor, documentation
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-15 21:18:21 +02:00
Joachim Nilsson
888ce56f3e
plugin/dbus.c: Register dbus-daemon as a service
...
This patch changes how the D-Bus plugin starts dbus-daemon, from being
started in the background to letting Finit start and monitor it.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-15 20:46:22 +02:00
Joachim Nilsson
6818813ff8
plugins/dbus: Conditionalize, don't run if dbus-daemon is missing
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-13 08:02:59 +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
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
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
Joachim Nilsson
963b736d8b
tty: Refactor, remove useless runlevel argument
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-09 15:05:32 +02:00
Joachim Nilsson
6f61e8e915
Remove hard-coded paths to system tools available in $PATH
...
Since at least a44daf2 both run() and run_interactive() can access all
system tools in _PATH_STDPATH. A system that uses non-standard paths,
e.g. /system/bin and /apps/bin, should update _PATH_STDPATH.
For reference, see issue #69 and PRs #70 and #72 .
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-03 13:18:42 +02:00
Joachim Nilsson
9c6e046d93
Remove hard-coded paths to system tools available in $PATH
...
This patch implemements a new feature of libite v1.9.1, whichp(), which
instead of fexist() that requires an absolute path, searches $PATH.
For reference, see issue #69 and PRs #70 and #72 .
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-03 13:13:55 +02:00
Joachim Nilsson
30822f0d68
Remove UNUSED() macro and disable the compiler warning instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-02 21:59:23 +02:00
Joachim Nilsson
a31ecb32e1
Fix problem with building from a separate build directory
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-06-05 01:07:47 +02:00
Joachim Nilsson
a0e17c8f47
Relocate create() from bootmisc plugin to helpers.h
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-25 19:40:06 +01:00
Joachim Nilsson
1d39decaf1
Update .gitignore files
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 07:32:09 +01:00
Joachim Nilsson
fff68b7b06
Relocate source files to an src/ subdirectory
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 01:31:02 +01:00
Joachim Nilsson
044ded3045
Fix #61 : Reassert net/* conditions after initctl reload
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 01:09:06 +01:00
Joachim Nilsson
0cccc629bf
pidfile: Ensure svc is always followed by a slash
...
A service need no longer be fully qualified path.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 01:02:40 +01:00
Joachim Nilsson
57181264e9
pidfile: Make sure to set a default name for plugin
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 01:02:16 +01:00
Joachim Nilsson
4321038518
bootmisc: Minor refactor
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-16 00:59:32 +01:00
Joachim Nilsson
d5942f3267
Minor whitespace fixes
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-11 17:40:10 +01:00
Mattias Walström
816aa9a17c
pidfile: Run the reconf-callback again until no application are in flux
...
If a service depend on the service last in the list the application
will be kept in flux state forever.
Signed-off-by: Mattias Walström <mattias.walstrom@westermo.se >
2017-01-11 16:25:04 +01:00
Joachim Nilsson
892ac2edb2
Fix #47 : Relocate sysctl.conf setup to procps plugin
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-12-08 08:17:38 +01:00
Joachim Nilsson
1dc67acd40
chargen: Make sure to check target buffer size
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-12-05 08:37:41 +01:00
Joachim Nilsson
b9ae4d04ef
bootmisc: Replace homegrown desym() with realpath()
...
Followup to issue #49 .
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-11-21 15:01:59 +01:00
Joachim Nilsson
47060c9738
bootclean: Resolve any symlinks in tmpfs check
...
Followup to issue #49 .
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-11-21 09:41:30 +01:00
Joachim Nilsson
846692ca03
Fix #49 : Skip tmpfs directories at bootclean
...
We can safely skip tmpfs, nothing to clean from previous boot there.
In fact, if we clean it we may spoil things for udev, which saves
pre-boot files in /run/udev.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-11-20 19:29:42 +01:00
Joachim Nilsson
bab13c9cef
bootclean: Followup to a013e48, reduced verbosity
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-23 11:28:24 +02:00
Joachim Nilsson
67c55145b9
Fix warning for comment in comment
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-10 00:03:08 +02:00
Joachim Nilsson
fc2489d9e1
Remove or mark unused variables
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-10 00:02:45 +02:00
Joachim Nilsson
a384a95529
Add missing warning flags and enable STD:GNU99
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-10 00:02:10 +02:00
Joachim Nilsson
a013e48ab5
Run bootclean() from bootmisc plugin instead
...
This patch moves both the definition and the call to bootclean() from
finit.c to the bootmisc plugin. We want to call bootclean() *after*
any /run and /var file systems have been mounted.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-09 23:15:06 +02:00
Joachim Nilsson
34bdbdb3b1
resolvconf: Simplify and fix buglet
...
- The /dev/shm/ directories are no longer needed
- Do not create the resolv.conf symlink
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-02 13:14:16 +02:00
Joachim Nilsson
83af7e8e9d
resolvconf: Initial cleanup of plugin
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-02 13:06:03 +02:00
Joachim Nilsson
4eb5f8a0dc
bootmisc: /var/lock/subsys created by D-Bus plugin
...
No need to create it twice.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-02 12:05:27 +02:00
Joachim Nilsson
e03b358ff0
Fix #46 : Set correct umask() before makedir() and chmod()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-10-02 11:42:40 +02:00
Wang He
dd87c81adc
Create missing /var/lock/subsys dir in dbus plugin
...
Signed-off-by: Wang He <xw897002528@gmail.com >
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-18 12:09:05 +02:00
Joachim Nilsson
f7d6d269c7
Change to runlevel 0/6 on reboot/halt/poweroff
...
This patch fixes a long-standing issue with how Finit handles shutdown,
reboot and poweroff -- and even runlevel changes to runlevel 0 and 6.
Prior to this patch sig.c:do_shutdown() was called immediately on any
of the above events, disregarding any services that a user might have
wanted to run as part of the shutdown/reboot.
With this change the handling is unified in all frontends to instead
do a runlevel change followed by the do_shutdown() action.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-18 11:50:07 +02:00
Joachim Nilsson
f9732a6fb9
Fix warnings: type mismatch and unused parameters
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-18 10:27:03 +02:00
Joachim Nilsson
19b81cf434
Fix #40 , #39 : initctl plugin started too early, before /run FS existed
...
Delay setup of initctl plugin to after the base filesystems are up and
after the bootmisc plugin has run.
This patch factors out the I/O initialization of plugins so it does not
have to run when plugins are loaded. Instead, plugins can now call this
API to register an I/O callback when they are ready.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-08 12:58:28 +02:00
Joachim Nilsson
9fc1f50678
bootmisc: The getgroup() API returns int not gid_t
...
Must use int to check for error code (-1) from getgroup() API.
Found by Coverity Scan.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-05 00:55:21 +02:00
Joachim Nilsson
5ddc35d387
echo: Mark callback argument as unused
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-05 00:54:29 +02:00
Joachim Nilsson
bb7208c591
bootmisc: Check return value from chmod() API
...
Found by Coverity Scan.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-04 23:23:37 +02:00
Joachim Nilsson
bb0505f57c
bootmisc: Check return value from getgroup() API
...
Found by Coverity Scan.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-04 23:13:51 +02:00
Joachim Nilsson
74eb2bf4d2
initctl: Add dependency on bootmisc
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-04 17:13:38 +02:00
Joachim Nilsson
3f71ed352d
initctl: Remove confusing/wrong debug message
...
The 's' runlevel after boot is the traditional single-user rescue mode.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-08-24 22:08:46 +02:00