mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
Refactor: introduce telinit and a new initctl tool w/ API
- Reduce size of `helpers.c`, for linking against new `initctl` tool, by moving out functions to `pid.c` and `exec.c` - Add `AF_UNIX` API to Finit, to complement old `/dev/initctl` FIFO - Let old FIFO API be used by init/telinit: `init <q | 1-9>` - Move all advanced initctl code from `client.c` to `initctl.c`, yes its a bit confusing to call the *new* tool the same as the old FIFO but this is more in line with what, e.g Upstart does. - Move all advanced server side code from `plugins/initctl.c` to `api.c` - Update TODO with upcoming inetd syntax change and dynamic events. - Temporarily fix display of inetd services from `initctl status -v` Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
66edb42e06
commit
1a1f24721f
15 files changed
+934
-731
No files matched your search
@@ -33,11 +33,11 @@ DEV = $(NAME)-dev
|
||||
ARCHTOOL = `which git-archive-all`
|
||||
ARCHIVE = $(PKG).tar
|
||||
ARCHIVEZ = ../$(ARCHIVE).xz
|
||||
EXEC = finit reboot
|
||||
EXEC = finit initctl reboot
|
||||
HEADERS = plugin.h svc.h helpers.h queue.h
|
||||
DISTFILES = LICENSE README CHANGELOG finit.conf services
|
||||
OBJS = finit.o client.o conf.o helpers.o sig.o svc.o service.o \
|
||||
plugin.o tty.o inetd.o
|
||||
OBJS = finit.o api.o client.o conf.o exec.o helpers.o pid.o sig.o \
|
||||
svc.o service.o plugin.o tty.o inetd.o
|
||||
|
||||
TOPDIR = $(shell pwd)
|
||||
-include config.mk
|
||||
@@ -74,6 +74,8 @@ config.h: configure
|
||||
|
||||
finit: $(OBJS)
|
||||
|
||||
initctl: initctl.o svc.o helpers.o
|
||||
|
||||
reboot: reboot.o $(DEPLIBS)
|
||||
|
||||
install-exec: all
|
||||
@@ -83,8 +85,8 @@ install-exec: all
|
||||
printf " INSTALL $(DESTDIR)$(sbindir)/$$file\n"; \
|
||||
$(STRIPINST) $$file $(DESTDIR)$(sbindir)/$$file; \
|
||||
done
|
||||
printf " INSTALL $(DESTDIR)$(sbindir)/initctl\n"
|
||||
@ln -sf finit $(DESTDIR)$(sbindir)/initctl
|
||||
printf " INSTALL $(DESTDIR)$(sbindir)/telinit\n"
|
||||
@ln -sf finit $(DESTDIR)$(sbindir)/telinit
|
||||
$(MAKE) -C libite install-exec
|
||||
$(MAKE) -C plugins install
|
||||
|
||||
|
||||
Reference in new issue
Block a user