423ba10303
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
339 lines
10 KiB
Text
339 lines
10 KiB
Text
--------------------------------------------------------------------------------
|
|
define coding guidelines
|
|
-> general, with url?
|
|
--------------------------------------------------------------------------------
|
|
- define how it should work (doc/braindums/big-picture.text)
|
|
- define service status in one document, so repeatition stops!
|
|
--------------------------------------------------------------------------------
|
|
- rename headers/ -> includes/
|
|
- remove client/ from top level
|
|
--------------------------------------------------------------------------------
|
|
Generate automatic asciidoc from conf/*
|
|
--------------------------------------------------------------------------------
|
|
Add handler for ctrl+alt+delete
|
|
* document in paths
|
|
--------------------------------------------------------------------------------
|
|
pre-compile config: conf/*
|
|
|
|
--------------------------------------------------------------------------------
|
|
comm:
|
|
tmpnow: search for pid in list,
|
|
save the pid in the list, so we know whether our executer died!
|
|
--------------------------------------------------------------------------------
|
|
Logging / cinit:
|
|
fuer unsere eigenen ausgaben auch multilog?
|
|
|
|
Logger: shared memory?
|
|
--------------------------------------------------------------------------------
|
|
Ausgaben nach Beendigung vom Starten des Services.
|
|
|
|
[ on ] %s + Ergebnis
|
|
[ off ] %s
|
|
|
|
Rekursives herunter/rauffahren
|
|
--------------------------------------------------------------------------------
|
|
- add error handling to cinit.install.binary
|
|
- cleanup serv/sig_reboot.c:7:
|
|
o implement os-specific reboot function
|
|
--------------------------------------------------------------------------------
|
|
1. Entfernung mount
|
|
-> Example configuration
|
|
-> was man alles machen muss
|
|
--------------------------------------------------------------------------------
|
|
- add code do implement stopping / restarting with dependency tree
|
|
--------------------------------------------------------------------------------
|
|
Documentation:
|
|
- Installing cinit
|
|
o compiling cinit from source
|
|
o debian / gentoo
|
|
- Configuring
|
|
--------------------------------------------------------------------------------
|
|
Check whether we also get notified about stopped children, if so, ignore.
|
|
--------------------------------------------------------------------------------
|
|
- perhaps use dnotify?
|
|
- recheck warm reboot
|
|
- fix cservice
|
|
- print service name or cinit: before _everything_ WE print
|
|
|
|
TESTING:
|
|
- is the reporting ok?
|
|
- does cservice and ccontrol what's expected?
|
|
|
|
# cinit.create.empty.service: can only be started from the bin directory
|
|
|
|
- compile cinit static and other tools dynamically per default
|
|
|
|
- Fix Switching services off !!
|
|
- Remove RUN_RUN_SVCs, move code to run_svc so one can determine which
|
|
services failed?
|
|
--> sequentieller ablauf!
|
|
--> parallel ablauf, struct-array mit namen und ergebnis?
|
|
--> for dep in deps/*; do fork(run_svc() ); done
|
|
-----> while(any_is_running) { sleep }
|
|
-------> array durchsuchen, ergebnis nutzen.
|
|
- ueberpruefen von wo aus run_svc() aufgerufen wird
|
|
|
|
- do not kill respawing service, if off exists
|
|
- ccontrol
|
|
- manpages
|
|
- Error codes when shutting down a service?
|
|
- Delay dokumentieren
|
|
- no_kill dokumentieren
|
|
|
|
|
|
- on.out, on.err, on.in?
|
|
-> reading/writing from/to files
|
|
|
|
- implement "no_kill" until cinit-0.2 or 0.3?
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
- Source Logic issues
|
|
- remove FIXME entries (and what should be fixed, too)
|
|
- memset for timespecs?
|
|
- move umount, swapoff and remount to off of init?
|
|
-> cleanup sig_reboot.c
|
|
--------------------------------------------------------------------------------
|
|
- Documentation
|
|
- Write manpages (use doc/* as base for that)
|
|
- Check Spell and Grammar in documentation
|
|
- write howto:
|
|
o Howto-cinit
|
|
o Howto-cinit-uml
|
|
--------------------------------------------------------------------------------
|
|
[OLD BUGS]
|
|
- execve() fails -> no sleep!!
|
|
- cservice!
|
|
- prozess nur einmal -> WARTET! cinit auch!
|
|
doku:
|
|
cservice einmal starten -> wartet auf ende
|
|
cint ersetzt init bei gentoo
|
|
an error occuerd-> verbose
|
|
|
|
possible BUGS:
|
|
|
|
[14:44] freelsd:cinit-0.2.2% ./sbin/cservice -e ein
|
|
|
|
ein: No such file or directory
|
|
Bad address
|
|
: Service does not exist
|
|
|
|
/etc/cinit/specials/... rein
|
|
|
|
|
|
--> cinit-0.3-rc1
|
|
--------------------------------------------------------------------------------
|
|
Helper scripts, rausgenommen aus Der Doku, muessen fuer
|
|
cinit-0.3 ueberprueft werden:
|
|
|
|
Configure help scripts
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
cinit-conf later
|
|
Using prepared scripts
|
|
|
|
In the bin/ directory of this tarball you'll find at least:
|
|
|
|
cinit.add.dependency - add a dependency to a service
|
|
cinit.add.getty - add a new getty
|
|
cinit.create.empty.service - create an empty service
|
|
cinit.reboot - reboot in /bin/sh
|
|
cinit.remove.getty - remove a getty service
|
|
cinit.respawn.off - switch respawing off
|
|
cinit.respawn.on - switch respawing on
|
|
cinit.shutdown - shutdown in /bin/sh
|
|
|
|
--------------------------------------------------------------------------------
|
|
--------------------------------------------------------------------------------
|
|
|
|
Optimisations
|
|
-------------
|
|
|
|
tree_exec
|
|
~~~~~~~~~
|
|
- only check dependencies (=needs) after the basic run?
|
|
|
|
Documentation
|
|
-------------
|
|
|
|
developer
|
|
~~~~~~~~~
|
|
- ST_IN_LIST == startup marker, used to (NOT) insert services into startup
|
|
- dep_needs_wants_add is used to add dependencies of a service to the general
|
|
starter list
|
|
|
|
|
|
user
|
|
----
|
|
- do we really need swapoff? remove umount, swapoff!
|
|
* to services!
|
|
- dependencies with leading '.' (dot) are ignored.
|
|
- about cinit-configuration structure
|
|
* cconfig
|
|
* svc/
|
|
* special/ (or however we called it)
|
|
- panic
|
|
- halt
|
|
- poweroff
|
|
- reboot
|
|
|
|
--------------------------------------------------------------------------------
|
|
Doc
|
|
---
|
|
Doku!!!
|
|
- MANPAGE!
|
|
|
|
FAQ
|
|
~~~
|
|
- DOKU: what happens when a service does not terminate....
|
|
und er als once drin ist
|
|
--> Wenn kein ReSPAWN und der Prozess beendet sich nicht,
|
|
dann haengt init!
|
|
|
|
- multuicall probleme -> busysbox --> GIBT ES NICHT!!
|
|
---> DOKU DAZU! mit links, doppelt links, aus test
|
|
---> erklaeren, dass es unproblematisch ist!
|
|
|
|
--------------------------------------------------------------------------------
|
|
csvc:
|
|
11:09 < folken23> telmich: oder service allready started.
|
|
--------------------------------------------------------------------------------
|
|
cinit:
|
|
11:09 < folken23> telmich: zsb. eine grund angabe warum ein dienst nicht gestartet
|
|
werden konnte.
|
|
11:09 < folken23> telmich: e.g. file nicht gefunden, service hat nicht 0
|
|
zurueckgeworfen.
|
|
---> errno in execute_sth!
|
|
|
|
Child handlin
|
|
~~~~~~~~~~~~~g
|
|
- free() everything before starting child
|
|
|
|
Later
|
|
~~~~~
|
|
|
|
- close(*>2) before forking / executing
|
|
-> close fds, clean environment, etc., ...
|
|
-> do we really need that?
|
|
-> yep, clean environment!
|
|
- logging service!
|
|
-> write output $somewhere, wait for syslog?
|
|
-> flush at the end of start-process?
|
|
-> perhaps pipe logging output to a program?
|
|
--------------------------------------------------------------------------------
|
|
--------------------------------------------------------------------------------
|
|
--------------------------------------------------------------------------------
|
|
- Doc
|
|
* main.text -> cleanup / remove / split
|
|
* config-dirs
|
|
* FAQ
|
|
* ideas
|
|
* meta.dependencies
|
|
- config/hints/meta depps
|
|
* optimising
|
|
- integrate into other
|
|
* README.text
|
|
- update
|
|
* replacing.init
|
|
- update / integrate
|
|
* special-services.text
|
|
- into configuring/hints?
|
|
* TODO
|
|
- into paths, if necessary
|
|
* updating.cinit
|
|
- update as soon as update is possible?
|
|
* using.rescue
|
|
- update as soon as update is possible?
|
|
* 'os-integration.text'
|
|
* 'daemons.backgrounding'
|
|
* There are some hints on how to migrate to cinit in general and also
|
|
some os specific help in the file 'migrating-init-systems.text',
|
|
- CODECHECK:
|
|
* what happens with the wants of the last services?
|
|
- are they added?
|
|
- are they added at the correct position?
|
|
- scripts
|
|
* `cinit.check.config` (doc/user/configuring.cinit.text)
|
|
-> circular depedencies!
|
|
- Doc.next:
|
|
- installing: report!
|
|
-> write report script.
|
|
- Doc later
|
|
* current-init-problems.text
|
|
- current-init-problems.text explains why cinit does not use nor recommends the use of shell scripts.
|
|
* special-services.text
|
|
|
|
- Begin documentation
|
|
* Check Makefile
|
|
* Integrate Makefile into main Makefile
|
|
* create manpage
|
|
* Write a small manual
|
|
- install
|
|
- configure
|
|
- boot (different OS)
|
|
* generate asciidoc!
|
|
- report broken links in needs/wants
|
|
- Doc way:
|
|
* installing
|
|
* configuring
|
|
- testconfig!
|
|
* booting
|
|
- different OS / bootloader
|
|
* debugging
|
|
- Shutdomn code:
|
|
* begin at init, then shutdown wants/needs, ...
|
|
- check free on dep_del!
|
|
- check that the new wants and need elements are nserted the other way round
|
|
* we go to next, elements must be put before us!
|
|
- implement do_reboot()
|
|
* so not only booting with cinit works, but also the shutdown
|
|
- define messages
|
|
a) human readable
|
|
b) binary data?
|
|
- replace cinit_ipc_logon with cinit_ipc_init...
|
|
* delay ipc code -> after start!
|
|
- Remove old code
|
|
* remove run_svc
|
|
* remove run_init_svc
|
|
|
|
Finally:
|
|
- test and release cinit-0.3rc1
|
|
|
|
- Cleanup object lists
|
|
object-lists/
|
|
cinit
|
|
cservice
|
|
ccontrol
|
|
cinit.halt
|
|
cinit.reboot
|
|
cinit.shutdown (shell script?!?)
|
|
|
|
TODO.pre7:
|
|
|
|
Done:
|
|
check cinit_ipc_destroy
|
|
- Segfault, when there is only init -> problem in glibc2.3.6
|
|
- Added general shutdown support (via kill -TERM, -HUP, -USR1)
|
|
- write sleep_before_kill
|
|
reads config, sleeps
|
|
Tests:
|
|
- test reboot functionality
|
|
-> kill -X 1
|
|
-> what happens?
|
|
|
|
TODO.pre8:
|
|
remove old object listings
|
|
take care of ipc/ and os/
|
|
merge codingstyle and codingguide
|
|
double check all initialisations!
|
|
Use sa.mask in sigaction!
|
|
|
|
Document the define of the following:
|
|
conf/umount = called before all shutdown procedures
|
|
|
|
- test sleep code (sleep_before_kill())
|
|
|
|
do_reboot.c:
|
|
write cinit_svc_shutdown
|
|
|
|
TODO.pre9:
|
|
include locking via shm, remove test on pid1
|