pax_global_header 0000666 0000000 0000000 00000000064 11260460574 0014517 g ustar 00root root 0000000 0000000 52 comment=7e3a195da97b3eaf49433bf967ce804142fa89c5
cinit-0.3pre16/ 0000775 0000000 0000000 00000000000 11260460574 0013345 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/ 0000664 0000000 0000000 00000000262 11260460574 0013407 0 ustar 00root root 0000000 0000000 This is a non-existing file, how did you find it? ;-)
It seems like you know a bit about your system, perhaps
you want to join cinit development in #cLinux on irc.freenode.org?
cinit-0.3pre16/.ditz-config 0000664 0000000 0000000 00000000162 11260460574 0015562 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/config
name: Nico Schottelius
email: nico@ikn.schottelius.org
issue_dir: bugs
cinit-0.3pre16/.gitignore 0000664 0000000 0000000 00000000520 11260460574 0015332 0 ustar 00root root 0000000 0000000 *.o
*.a
MT
ddoc
contrib+tools/cinit.graph.text
config.h
sbin
tmp
os/current
tmpbin
src/os/current
src/ipc/current
src/cinit
*.html
*.htm
*.man
*.texi
*.texi
*.docbook
src/halt.kill
src/poweroff.kill
src/reboot.kill
doc/man/*.[0-9]
doc/man/*.xml
src/cmd
.*.swp
.exclude
src/.configured
src/cinit.halt
src/cinit.poweroff
src/cinit.reboot
cinit-0.3pre16/Makefile 0000664 0000000 0000000 00000006646 11260460574 0015021 0 ustar 00root root 0000000 0000000 #
# 2005-2009 Nico Schottelius (nico-cinit at schottelius.org)
#
# This file is part of cinit.
#
# cinit is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit. If not, see .
#
#
# Don't edit Makefiles, use conf/* for configuration.
#
# Directories and files
CDIRS=src doc
#
# Targets
#
#
# Warn per default, make sure the user knows what she does
#
warn:
@cat doc/.buildwarn
all: sources documentation
dev-all: all
install clean dist distclean:
@for subdir in ${CDIRS}; do \
echo "Making $@ in $$subdir"; \
(cd $$subdir && ${MAKE} ${MAKEFLAGS} $@) || break; \
done;
.PHONY: sources
sources:
${MAKE} -C src all
.PHONY: documentation
documentation:
${MAKE} -C doc documentation
install-miniconf:
./bin/cinit.install.miniconf
install-dir:
./bin/cinit.install.dir
config:
@./bin/cinit.configure.os
@./bin/cinit.configure.tools
@./bin/cinit.configure.ipc
@touch src/.configured
################################################################################
# Tests
#
tests:
# does not work, due getting killed, due to design :-)
#./scripts/internal/compile_run_as_compiler.sh
./scripts/internal/test_on_hosts.sh ./scripts/internal/compile_test.sh
DEBIAN=lenny
UMLDIR=test/uml
CONFDIR=etc/cinit/
uml-install-debian:
mkdir -p $(UMLDIR)
sudo /usr/sbin/debootstrap $(DEBIAN) $(UMLDIR)
me=$$(whoami); sudo chown -R $$me $(UMLDIR)
# only install binaries, no need to test documentation
uml-install-config:
rsync -av --delete ./$(CONFDIR) $(UMLDIR)/$(CONFDIR)
uml-install-cinit:
dir=$$(cd $(UMLDIR); pwd -P); make -C src DESTDIR=$$dir install
uml-run: uml-install-config
dir=$$(cd $(UMLDIR); pwd -P); linux root=/dev/root rootflags=$$dir rootfstype=hostfs init=/sbin/cinit
uml-run-sysv:
dir=$$(cd $(UMLDIR); pwd -P); linux root=/dev/root rootflags=$$dir rootfstype=hostfs
# debian-etch
de-install:
rsync -av --delete ./ root@de:cinit
rsync -av --delete ./etc/cinit/ root@de:/etc/cinit
ssh root@de '(cd cinit; make clean install)'
de-run:
ssh root@de reboot
UBUNTUHOST=cinit@192.168.122.2
UBUNTUCONF=./etc/cinit-ubuntu
UBUNTUINSTALL="cd cinit && make clean && sudo make install"
UBUNTUTEST="sudo reboot"
ubuntu-install:
rsync -av --delete ./ $(UBUNTUHOST):cinit
# rsync -av --delete ./$(UBUNTUCONF) $(UBUNTUHOST):/etc/cinit
ssh "$(UBUNTUHOST)" $(UBUNTUINSTALL)
ubuntu-test: ubuntu-install
ssh "$(UBUNTUHOST)" $(UBUNTUTEST)
################################################################################
#
# Developer targets
#
release: ./scripts/internal/cinit.release
./scripts/internal/cinit.release now
scripts/internal/cinit.release: ./scripts/internal/test-cmd.sh
./scripts/internal/test-cmd.sh
WEBFILE=~/privat/computer/net/netzseiten/www.nico.schottelius.org/src/software/cinit.mdwn
.PHONY: web
web: README
cp $< $(WEBFILE)
cinitconfconfdir=../cinit-conf/conf
sync-conf:
rsync --delete -av ./conf/ $(cinitconfconfdir)
cd $(cinitconfconfdir); git add .; git commit -m "sync with cinit/conf"
cinit-0.3pre16/README 0000664 0000000 0000000 00000022030 11260460574 0014222 0 ustar 00root root 0000000 0000000 cinit is a fast, small and simple init with support for profiles
## Introduction
cinit is a fast init system with dependency features and
profile support. It was orientated on the design of
Richard Goochs
[need concept](http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/)
and Felix von Leitners
[minit](http://www.fefe.de/minit/).
Minit does not support real dependencies (you don't know whether the
service you depend on really started) and the need concept is somehow
slow (as seen in gentoo).
In addition, minit needs libowfat and dietlibc, which may not be found
on every Unix system.
### Cinit main features
* portability: it should run on every Unix
* true dependencies (soft and hard!)
* parallel execution
* highly customisable (see conf/*)
* profile support (specify what services to start depending on the profile)
### Why should I use cinit?
* To significant speedup the startup process
* To use highest level of parallelisation at startup
* To benefit from real dependencies (so called ***needs*** and ***wants***)
* To easily create profiles that can be chosen at startup (even **before** init is started!)
### How does cinit work?
Cinit creates a dependency tree at startup and executes the services.
A service can have two type of dependencies:
* ***wants*** describe soft dependencies (i.e. it's not fatal if the wanted service fails to start)
* ***needs*** describe hard dependencies (if the needed service fails, the depending won't be started)
Let's have a look at an example:
A
(wants)
/ \
|------> B \ C
| / \ / \
^ (needs) (needs) (wants)
| D E F
| |
|------<------(needs)----|
Or in words:
* B and C do not have dependencies
* They will be started at the beginning
* A wants B and C
* A waits until B and C are executed and started afterwards,
independently of the success of B and C
* A will also be started, if B and C fail to start.
* D needs B
* D will only be started, if B is successfully started
* E needs B and C
* E will only be started, if both B and C are successfully started
* F wants C and needs B
* F will only be started, if B is successfully started
* F waits until C is started and is started afterwards
## Getting cinit
### Development versions
You can get the latest (development) version via git:
git clone git://git.schottelius.org/cLinux/cinit.git
Additionally, the following other git ressources are available:
* [Gitweb](http://git.schottelius.org/?p=cLinux/cinit.git;a=summary).
* [Mirror at github](http://github.com/telmich/cinit)
* [Mirror at gitorious](http://gitorious.org/cinit)
### Archives
* [[cinit-0.3pre16.tar.bz2|archives/cinit-0.3pre16.tar.bz2]]
([browse source](browse_source/cinit-0.3pre16/))
[[changes|browse_source/cinit-0.3pre16/doc/changes/0.3pre16]]
* [[cinit-0.3pre15.tar.bz2|archives/cinit-0.3pre15.tar.bz2]]
([browse source](browse_source/cinit-0.3pre15/))
[[changes|browse_source/cinit-0.3pre15/doc/changes/0.3pre15]]
* [[cinit-0.3pre14.tar.bz2|archives/cinit-0.3pre14.tar.bz2]]
([browse source](browse_source/cinit-0.3pre14/))
[[changes|browse_source/cinit-0.3pre14/CHANGES]]
* [[cinit-0.3pre13.tar.bz2|archives/cinit-0.3pre13.tar.bz2]]
([browse source](browse_source/cinit-0.3pre13/))
[[changes|browse_source/cinit-0.3pre13/CHANGES]]
* [[cinit-0.3pre12.tar.bz2|archives/cinit-0.3pre12.tar.bz2]]
([browse source](browse_source/cinit-0.3pre12/))
[[changes|browse_source/cinit-0.3pre12/CHANGES]]
* [[cinit-0.3pre11.tar.bz2|archives/cinit-0.3pre11.tar.bz2]]
([browse source](browse_source/cinit-0.3pre11/))
[[changes|browse_source/cinit-0.3pre11/CHANGES]]
* [[cinit-0.3pre10.tar.bz2|archives/cinit-0.3pre10.tar.bz2]]
([browse source](browse_source/cinit-0.3pre10/))
[[changes|browse_source/cinit-0.3pre10/CHANGES]]
* [[cinit-0.3pre9.tar.bz2|archives/cinit-0.3pre9.tar.bz2]]
([browse source](browse_source/cinit-0.3pre9/))
[[changes|browse_source/cinit-0.3pre9/CHANGES]]
* [[cinit-0.3pre8.tar.bz2|archives/cinit-0.3pre8.tar.bz2]]
([browse source](browse_source/cinit-0.3pre8/))
[[changes|browse_source/cinit-0.3pre8/CHANGES]]
* [[cinit-0.3pre7.tar.bz2|archives/cinit-0.3pre7.tar.bz2]]
([browse source](browse_source/cinit-0.3pre7/))
[[changes|browse_source/cinit-0.3pre7/CHANGES]]
* [[cinit-0.3pre6.tar.bz2|archives/cinit-0.3pre6.tar.bz2]]
([browse source](browse_source/cinit-0.3pre6/))
[[changes|browse_source/cinit-0.3pre6/CHANGES]]
* [[cinit-0.3pre5.tar.bz2|archives/cinit-0.3pre5.tar.bz2]]
([browse source](browse_source/cinit-0.3pre5/))
[[changes|browse_source/cinit-0.3pre5/CHANGES]]
* [[cinit-0.3pre4.tar.bz2|archives/cinit-0.3pre4.tar.bz2]]
([browse source](browse_source/cinit-0.3pre4/))
[[changes|browse_source/cinit-0.3pre4/CHANGES]]
* [[cinit-0.3pre3.tar.bz2|archives/cinit-0.3pre3.tar.bz2]]
([browse source](browse_source/cinit-0.3pre3/))
[[changes|browse_source/cinit-0.3pre3/CHANGES]]
* [[cinit-0.3pre2.tar.bz2|archives/cinit-0.3pre2.tar.bz2]]
([browse source](browse_source/cinit-0.3pre2/))
[[changes|browse_source/cinit-0.3pre2/CHANGES]]
* [[cinit-0.3pre1.tar.bz2|archives/cinit-0.3pre1.tar.bz2]]
([browse source](browse_source/cinit-0.3pre1/))
[[changes|browse_source/cinit-0.3pre1/CHANGES]]
* [[cinit-0.2.1.tar.bz2|archives/cinit-0.2.1.tar.bz2]]
([browse source](browse_source/cinit-0.2.1/))
[[changes|browse_source/cinit-0.2.1/CHANGES]]
* [[cinit-0.2.tar.bz2|archives/cinit-0.2.tar.bz2]]
([browse source](browse_source/cinit-0.2/))
[[changes|browse_source/cinit-0.2/CHANGES]]
* [[cinit-0.1.tar.bz2|archives/cinit-0.1.tar.bz2]]
([browse source](browse_source/cinit-0.1/))
[[changes|browse_source/cinit-0.1/CHANGES]]
* [[cinit-0.0.8.tar.bz2|archives/cinit-0.0.8.tar.bz2]]
([browse source](browse_source/cinit-0.0.8/))
[[changes|browse_source/cinit-0.0.8/CHANGES]]
* [[cinit-0.0.7.tar.bz2|archives/cinit-0.0.7.tar.bz2]]
([browse source](browse_source/cinit-0.0.7/))
[[changes|browse_source/cinit-0.0.7/CHANGES]]
* [[cinit-0.0.6.tar.bz2|archives/cinit-0.0.6.tar.bz2]]
([browse source](browse_source/cinit-0.0.6/))
[[changes|browse_source/cinit-0.0.6/CHANGES]]
* [[cinit-0.0.5.tar.bz2|archives/cinit-0.0.5.tar.bz2]]
([browse source](browse_source/cinit-0.0.5/))
[[changes|browse_source/cinit-0.0.5/CHANGES]]
* [[cinit-0.0.4.tar.bz2|archives/cinit-0.0.4.tar.bz2]]
([browse source](browse_source/cinit-0.0.4/))
[[changes|browse_source/cinit-0.0.4/CHANGES]]
## Documentation
The documentation is currently spread all over the ***doc/*** directory
within the tarball and is being cleaned up. Additionally there
are two presentations available:
* [[2005-10-22: (German) speech at Technophil|software/cinit/speeches/2005-10-22]]
* [[2005-08-06: (German) online speech|software/cinit/speeches/2005-08-06]]
### Pre-Configuring
If you want to fine tune cinit parameters, add different path names,
change the DESTDIR, ... have a look at conf/*.
### Installing cinit
You can install cinit parallel to any other init-system, it won't
kill other init's config nor /sbin/init, if it exists:
# make all install
This will create /sbin/cinit.
If /sbin/init does not exist, it will be linked to /sbin/cinit.
### Configuring cinit
You'll have to configure cinit in /etc/cinit and add services,
before you can use it.
Please read doc/configuring.cinit for details.
Please read doc/FAO if there are still questions open.
There are some testing examples below doc/examples/, to be used
as a starting point.
There are currently no tools to merge your existing init-system
to cinit (like sysvinit-merge, bsd-merge or minit-merge) available,
but they are in the making (see various bugs in ditz).
### Configuring the OS / Kernel
After configuring cinit you need to tell your kernel to boot cinit instead
of your current init system. How to do that depends on your system:
* Linux/LILO and Linux/yaboot (ppc):
* append="init=/sbin/cinit"
* grub1 and grub2:
* kernel init=/sbin/cinit
## Support
### IRC
You can join the development ***IRC channel***
[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux).
### Mailing list
Bug reports, questions, patches, etc. should be send to the
[cinit mailing list](http://l.schottelius.org/mailman/listinfo/cinit).
## Related websites
* [cinit](http://www.nico.schottelius.org/software/cinit/)
* [cinit mailing list](http://l.schottelius.org/mailman/listinfo/cinit)
* BSD init systems (same codebase):
* [FreeBSDs init](http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/init/)
* [NetBSDs init](http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/init/)
* [OpenBSDs init](http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/init/)
* [initng](http://www.initng.org/)
* [minit](http://www.fefe.de/minit/)
* [runit](http://smarden.org/runit/)
* [need/simpleinit](http://www.atnf.csiro.au/~rgooch/linux/boot-scripts/)
* [sys-v-init](ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/)
* [upstart](http://www.netsplit.com/blog/work/canonical/upstart.html)
[[!tag unix]]
cinit-0.3pre16/bin/ 0000775 0000000 0000000 00000000000 11260460574 0014115 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/bin/cinit-conf.get-confdir 0000775 0000000 0000000 00000002370 11260460574 0020276 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2005-2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
# cinit: read configuration into variables
# Date: 2005-05-24 (Last Changed: 2005-08-08)
#
hier="${0%/*}"
# try environment first
if [ "$CINIT_CONF_CONF_DIR" ]; then
CONFDIR=$CINIT_CONF_CONF_DIR
elif [ -d "${hier}/../conf/" ]; then
CONFDIR="${hier}/../conf/"
elif [ -d "/etc/cinit-conf/" ]; then
CONFDIR="/etc/cinit-conf/"
else
echo 'Did not find cinit-conf configuration!' >&2
echo "Please set the variable CINIT_CONF_CONF_DIR" >&2
exit 1
fi
CONFDIR=$(cd "${CONFDIR}" && pwd -P)
echo $CONFDIR
cinit-0.3pre16/bin/cinit-conf.path-find-executable 0000775 0000000 0000000 00000000647 11260460574 0022073 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: find binary in path
# Date: 2005-10-15
#
set -e
if [ $# -ne 1 ]; then
echo "$(basename $0): searched binary"
exit 1
fi
binary=$1
# this is NOT really clean, paths can also contain spaces
# FIXME: use awk or similar
for pfad in $(echo $PATH | sed 's/:/ /g'); do
fullname=$pfad/$binary
if [ -f "$fullname" ]; then
echo "$fullname"
exit 0
fi
done
exit 1
cinit-0.3pre16/bin/cinit-conf.read-conf 0000775 0000000 0000000 00000003565 11260460574 0017742 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
hier="${0%/*}"
: ${CONFDIR:="$("${hier}/cinit-conf.get-confdir")"}
# read general values and overwrite specific ones later
for conf in ${CONFDIR}/*; do
NAME="$(basename $conf | tr a-z A-Z)"
# short version
eval : \${$NAME:=$(head -n1 "${conf}")}
# long version
#if eval test -z \$$NAME; then
# eval $NAME=\"$(head -n 1 $conf)\"
# eval export $NAME
#fi
# eval echo $NAME = \$$NAME
done
# comment out: generated automatically now
#: ${DESTDIR="$(head -n1 "${CONFDIR}/destdir")"}
#: ${SERVICE_CATEGORIES="$(head -n1 "${CONFDIR}/service_categories")"}
#: ${GETTYDIR="${SVCDIR}/$(head -n1 "${CONFDIR}/gettydir")"}
#: ${INSTALL_PROG="$(head -n1 "${CONFDIR}/install_prog")"}
#: ${INSTALL_DIRECTORY="$(head -n1 "${CONFDIR}/install_directory")"}
#: ${C_ON="$(head -n1 "${CONFDIR}/c_on")"}
#: ${C_PARAMS="$(head -n1 "${CONFDIR}/c_params")"}
#: ${C_RESPAWN="$(head -n1 "${CONFDIR}/c_respawn")"}
# overwrite or set: add destdir and put things together
# R_* = real = should be used in scripts
: ${R_CINIT_DIR:="${DESTDIR}/${CINIT_DIR}"}
: ${R_CINITCONF_DIR:="${R_CINIT_DIR}/${CINITCONFDIR}"}
: ${R_SVC_DIR:="${R_CINIT_DIR}/${SVCDIR}"}
cinit-0.3pre16/bin/cinit-conf.svc.categories 0000775 0000000 0000000 00000000370 11260460574 0021012 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install standard sub-configuration directories
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
for svc in $SERVICE_CATEGORIES; do
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_SVC_DIR}/${svc}"
done
cinit-0.3pre16/bin/cinit-conf.svc.create.sample 0000775 0000000 0000000 00000002621 11260460574 0021411 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: create templates
# 2005-05-24
set -e
# init variables
. $(dirname $0)/cinit-conf.read-conf
if [ $# -lt 1 ]; then
echo "`basename $0`: service-name(s)"
echo " I do create templates for your services"
exit 1
fi
BASEDIR="${DESTDIR}/${CINIT_DIR}"
for svc in $@; do
INSTDIR="${BASEDIR}/${svc}"
if [ -e "$INSTDIR" ]; then
echo "$svc already exists, skipping."
continue
fi
echo -n "Creating $svc ..."
# install creates needed parent directories
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${INSTDIR}/${C_NEEDS}"
echo "The services this services really needs (it will not start if one failed to start)." > "${INSTDIR}/${C_NEEDS}/README"
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${INSTDIR}/${C_WANTS}"
echo "The services this services wants (it will start if one or more fail)." > "${INSTDIR}/${C_WANTS}/README"
echo '#!/bin/sh' > "${INSTDIR}/${C_ON}"
echo "echo This should be a link to an executable or a script" >> "${INSTDIR}/${C_ON}"
chmod 0700 "${INSTDIR}/${C_ON}"
echo "One paramater on each line." > "${INSTDIR}/${C_ON}${C_PARAMS}"
echo "Delete me, if there are no paramaters." > "${INSTDIR}/${C_ON}${C_PARAMS}"
echo "Environtment: varx=valuex, one variable on each line." > "${INSTDIR}/${C_ON}${C_ENV}"
echo "Delete me, if you do not want to set any variables." > "${INSTDIR}/${C_ON}${C_ENV}"
echo "finished."
done
cinit-0.3pre16/bin/cinit-conf.svc.dependency.add 0000775 0000000 0000000 00000006563 11260460574 0021544 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
# cinit: create dependency: service a needs or wants service b
#
set -x
# initialise cinit-conf framework
hier="${0%/*}"; set -e; . "${hier}/cinit-conf.read-conf"
if [ $# -ne 3 ]; then
echo "`basename $0`: service_A [wants|needs] service_B"
echo ""
echo " Service A needs or wants Service B."
echo " You must specify whether to use wants or needs."
echo ""
exit 23
fi
SVC_A="$1"
DEP="$2"
SVC_B="$3"
# adding 'wishes' for x-mas and requires for 'the mass' and 'tv'
case "${DEP}" in
wishes|wants) DEP="$C_WANTS" ;;
needs|requires) DEP="$C_NEEDS" ;;
*) echo "Use \"want\" or \"need\" as type of dependency."
esac
# First of all create absolute paths
# if SVC_X beginning matches R_CINIT_DIR it is absolute
# else it is relative to R_CINIT_DIR
echo "${SVC_A}" | grep "^${R_SVC_DIR}" >/dev/null || SVC_A="${R_SVC_DIR}/${SVC_A}"
echo "${SVC_B}" | grep "^${R_SVC_DIR}" >/dev/null || SVC_B="${R_SVC_DIR}/${SVC_B}"
SVC_A_ABS=$(cd "${SVC_A}" && pwd -P)
SVC_B_ABS=$(cd "${SVC_B}" && pwd -P)
SVC_A_REL="${SVC_A_ABS##*/}"
SVC_B_REL="${SVC_B_ABS##*/}"
set +e
match=""
count="0"
svc_stripped="$(echo $SVC_A_ABS | sed -e 's;/$;;' -e 's;/[^/]*$;;')"
while [ "$svc_stripped" ]; do
match="$(echo ${SVC_B_ABS} | grep "^${svc_stripped}")"
count=$(($count+1))
if [ "$match" ]; then
relpath=""
while [ "$count" -gt 0 ]; do
source="../${source}"
count=$(($count-1))
done
source="${source}${SVC_B_REL}"
break
fi
svc_stripped="$(echo $svc_stripped | sed -e 's;/$;;' -e 's;/[^/]*$;;')"
done
# nothing in common? link absolute
if [ ! "$match" ]; then
source="${SVC_B_ABS}"
fi
# Then find out the level of subdirs, excluding destdir!
# FIXME: could someone PLEASE simplify that?
#SLASHES=$(echo $SVC_A | sed -e 's,/$,,' -e 's,[^/],,g' -e 's,/,../,g' -e 's,^,../../,')
# find common anchor and link after that:
# /destdir/etc/cinit/svc/svca/b/
# /destdir/etc/cinit/svc/svca/c/
# results in ../c/
# Thus:
# while unmatched
# remove /* (one level, shortest match)
#
# 1. remove destdir, if present 2. remove everything but the slashes 3. replace them with ../
#
SLASHES=$(echo $SVC_A | sed -e "s;^$DESTDIR;;" -e 's,/$,,' -e 's,[^/],,g' -e 's,/,../,g' -e 's,^,../../,')
DEST_NAME=$(echo $SVC_A | sed -e 's,/$,,' -e 's,/,-,g')
SOURCE="${SLASHES}${SVC_B}"
DEP_DIR="${SVC_A}/${DEP}"
if [ ! -d "$DEP_DIR" ]; then
echo "$DEP_DIR does not exist, creating..."
mkdir "$DEP_DIR"
if [ $? -ne 0 ]; then
echo "Error occured due to creating directory. Exiting."
exit 1
fi
fi
DEST="${DEP_DIR}/${DEST_NAME}"
echo -n "Linking ${source} to ${DEST} ... "
ln -sf "${source}" "${DEST}"
echo "finished."
cinit-0.3pre16/bin/cinit-conf.svc.fsck.linux 0000775 0000000 0000000 00000001307 11260460574 0020752 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: init
# Date: 2005-10-15
#
set -e
. $(dirname $0)/cinit-conf.read-conf
if [ $# -ne 3 ]; then
echo "$(basename $0): name device filesystem-type"
exit 1
fi
NAME=$1
DEVICE=$2
FS_TYPE=$3
FSCK="/sbin/fsck.${FS_TYPE}"
if [ ! -f "$FSCK" ]; then
echo "Missing $FSCK, abort."
exit 1
fi
if [ ! -e "${DESTDIR}${DEVICE}" ]; then
echo "Warning: ${DESTDIR}${DEVICE} does not exist."
fi
svcdir="${R_SVC_DIR}/fsck/${NAME}"
if [ -e "$svcdir" ]; then
echo "Error: $svcdir already exists"
exit 1
fi
set -e
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${svcdir}"
ln -sf "${FSCK}" "${svcdir}/$C_ON"
echo "$DEVICE" > "${svcdir}/$C_ON$C_PARAMS"
cinit-0.3pre16/bin/cinit-conf.svc.getty.add 0000775 0000000 0000000 00000003102 11260460574 0020544 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: create gettys
# Date: 2005-05-24 (Last changed: 2005-08-07)
#
set -e
# init variables
. "$(dirname $0)/cinit-conf.read-conf"
BASEDIR="${R_SVC_DIR}/${GETTYDIR}"
LAST_NUMBER=$(cd "$BASEDIR" && ls | awk '/^((0[xX])[0-9a-fA-F]+)|([0-9]+)$/ { print }' | sort -n | tail -n 1)
[ ! "$LAST_NUMBER" ] && LAST_NUMBER=0
NUMBER=$(echo $LAST_NUMBER + 1 | bc)
[ ! "$NUMBER" ] && NUMBER=1
DDIR=$BASEDIR/$NUMBER
#echo "Creating getty number $NUMBER in $DDIR ..."
if [ "$USE_THIS_GETTY" ]; then
GETTYS="$USE_THIS_GETTY"
else
GETTYS=`echo /sbin/*getty*`
fi
for getty in $GETTYS; do
case $getty in
*/fgetty|*/mingetty)
mygetty=$getty
params="/dev/tty${NUMBER}"
;;
*/agetty|*/getty)
mygetty=$getty
params="38400 tty${NUMBER} linux"
;;
*/mgetty)
mygetty=$getty
params="38400 tty${NUMBER}"
;;
*)
echo "Unknown Getty type $getty"
echo "Please report standard parameters to me."
esac
[ "$mygetty" ] && break
done
# check input
if [ ! "$mygetty" ]; then
read -p "Getty to use [$mygetty]: " rgetty
fi
if [ ! "$params" ]; then
read -p "Parameters to pass [$params]: " rparams
fi
if [ ! "$params" -o ! "$mygetty" ]; then
echo "Sorry, either getty or parameters are not supplied."
exit 23
fi
echo -n "Creating $mygetty ($params) in $DDIR ... "
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "$DDIR"
ln -s "$mygetty" "$DDIR/$C_ON"
for param in $params; do
echo $param >> "$DDIR/${C_ON}${C_PARAMS}"
done
touch "$DDIR/$C_RESPAWN"
echo "finished."
cinit-0.3pre16/bin/cinit-conf.svc.getty.remove 0000775 0000000 0000000 00000000776 11260460574 0021327 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: create gettys
# init variables
. $(dirname $0)/cinit-conf.read-conf
BASEDIR="$DESTDIR/$CINIT_DIR/$GETTY_DIR"
NUMBER=$(cd $BASEDIR && ls | awk '/^((0[xX])[0-9a-fA-F]+)|([0-9]+)$/ { print }' | tail -n 1)
if [ ! "$NUMBER" ]; then
echo "There is no getty to remove."
exit 1
fi
DDIR="$BASEDIR/$NUMBER"
echo "Removing getty number $NUMBER located in $DDIR ..."
read -p "Are you sure [y/N]? " yes
if [ "$yes" = "y" ]; then
rm -r "$DDIR"
else
echo "Aborted."
fi
cinit-0.3pre16/bin/cinit-conf.svc.hostname.linux 0000775 0000000 0000000 00000000775 11260460574 0021652 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service, which sets the hostname
# Date: 2005-10-15
#
set -e
. $(dirname $0)/cinit-conf.read-conf
if [ $# -ne 1 ]; then
echo "$(basename $0): hostname"
exit 1
fi
HOSTNAME="$1"
: ${HOSTNAME_BIN:=/bin/hostname}
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${R_SVC_DIR}/network/hostname"
ln -sf "$HOSTNAME_BIN" "${R_SVC_DIR}/network/hostname/$C_ON"
echo "$HOSTNAME" > "${R_SVC_DIR}/network/hostname/$C_ON$C_PARAMS"
cinit-0.3pre16/bin/cinit-conf.svc.init 0000775 0000000 0000000 00000000536 11260460574 0017634 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install needed directories
# Date: - (Last Modified: 2005-08-06)
#
. $(dirname $0)/cinit-conf.read-conf
set -e
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_CINITCONF_DIR}"
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_SVC_DIR}"
# init must be there. always.
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_SVC_DIR}/init"
cinit-0.3pre16/bin/cinit-conf.svc.init.dependencies 0000775 0000000 0000000 00000000723 11260460574 0022257 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: add standard sub-configuration directories to init wants
# Date: 2005-10-11
#
set -e
. $(dirname $0)/cinit-conf.read-conf
$(dirname $0)/cinit-conf.add.dependency init wants getty
$(dirname $0)/cinit-conf.add.dependency init wants local-services
$(dirname $0)/cinit-conf.add.dependency init wants local-tuning
$(dirname $0)/cinit-conf.add.dependency init wants mount
$(dirname $0)/cinit-conf.add.dependency init wants network
cinit-0.3pre16/bin/cinit-conf.svc.keymap.linux 0000775 0000000 0000000 00000001661 11260460574 0021315 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install keymap from environment setting
# Date: 2005-10-15
#
. $(dirname $0)/cinit-conf.read-conf
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
if [ -z "$C_KEYMAP" ]; then
echo "Set C_KEPMAP to the wanted keymap."
exit 1
fi
if [ -d "${DESTDIR}/${CINIT_DIR}/local-tuning/keymap" ]; then
echo "Service keymap already exists."
exit 1
fi
BINARY_PATH=$($(dirname $0)/cinit.path-find loadkeys)
if [ $? -ne 0 ]; then
echo "Did not find binary loadkeys."
exit 1
fi
echo -n "Installing keymap to ${DESTDIR}/${CINIT_DIR}/local-tuning/keymap ..."
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}/${CINIT_DIR}/local-tuning/keymap"
ln -sf "$BINARY_PATH" "${DESTDIR}/${CINIT_DIR}/local-tuning/keymap/$C_ON"
echo "$C_KEYMAP" >> "${DESTDIR}/${CINIT_DIR}/local-tuning/keymap/$C_ON$C_PARAMS"
echo "finished."
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.linux.network.lo 0000775 0000000 0000000 00000001036 11260460574 0022125 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: loopback device
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
set -e
# - mount /proc
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${DESTDIR}/${CINIT_DIR}/network/lo"
ln -sf /sbin/ifconfig "${DESTDIR}/${CINIT_DIR}/network/lo/$C_ON"
echo lo > "${DESTDIR}/${CINIT_DIR}/network/lo/${C_ON}${C_PARAMS}"
echo 127.0.0.1/8 >> "${DESTDIR}/${CINIT_DIR}/network/lo/${C_ON}${C_PARAMS}"
echo up >> "${DESTDIR}/${CINIT_DIR}/network/lo/${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.mount.getsource 0000775 0000000 0000000 00000001507 11260460574 0022031 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
# FIXME: Skip ^#!, make for generic mounts!
awk '$2 ~ /^\/$/ { print $0 }' < /etc/fstab
cinit-0.3pre16/bin/cinit-conf.svc.mount.proc 0000775 0000000 0000000 00000001143 11260460574 0020770 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: mount /proc
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
set -e
# - mount /proc
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${DESTDIR}/${CINIT_DIR}/mount/proc"
ln -sf /bin/mount "${DESTDIR}/${CINIT_DIR}/mount/proc/$C_ON"
echo proc > "${DESTDIR}/${CINIT_DIR}/mount/proc/${C_ON}${C_PARAMS}"
echo -t >> "${DESTDIR}/${CINIT_DIR}/mount/proc/${C_ON}${C_PARAMS}"
echo proc >> "${DESTDIR}/${CINIT_DIR}/mount/proc/${C_ON}${C_PARAMS}"
echo /proc >> "${DESTDIR}/${CINIT_DIR}/mount/proc/${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.mount.root 0000775 0000000 0000000 00000001044 11260460574 0021010 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: mount root r/w
# Date: 2005-08-07
#
set -e
. $(dirname $0)/cinit-conf.read-conf
# mount root read/write
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_SVC_DIR}/mount/root"
ln -sf /bin/mount "${R_SVC_DIR}/mount/root/$C_ON"
echo -n > "${R_SVC_DIR}/mount/root/${C_ON}${C_PARAMS}"
echo -o >> "${R_SVC_DIR}/mount/root/${C_ON}${C_PARAMS}"
echo remount,rw >> "${R_SVC_DIR}/mount/root/${C_ON}${C_PARAMS}"
echo / >> "${R_SVC_DIR}/mount/root/${C_ON}${C_PARAMS}"
cinit-0.3pre16/bin/cinit-conf.svc.mount.swap 0000775 0000000 0000000 00000001710 11260460574 0020777 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install swap
# Date: 2005-10-15
#
. $(dirname $0)/cinit-conf.read-conf
SERVICE=mount/swap
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
BINARY=swapon
BINARY_PATH=$($(dirname $0)/cinit.path-find $BINARY)
if [ $? -ne 0 ]; then
echo "Did not find binary $BINARY."
exit 1
fi
HAS_SWAP=$(awk '$3 ~ /swap/ { print $3 }' /etc/fstab)
if [ -z "$HAS_SWAP" ]; then
echo "Seems you have no swap, service not installing"
exit 1
fi
if [ -d "${DESTDIR}/${CINIT_DIR}/${SERVICE}" ]; then
echo "Service ${SERVICE} already exists."
exit 1
fi
echo -n "Installing ${SERVICE} to ${DESTDIR}${CINIT_DIR}/${SERVICE} ..."
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}/${CINIT_DIR}/${SERVICE}"
ln -sf "$BINARY_PATH" "${DESTDIR}/${CINIT_DIR}/${SERVICE}/$C_ON"
echo "-a" >> "${DESTDIR}/${CINIT_DIR}/${SERVICE}/$C_ON$C_PARAMS"
echo "finished."
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.mount.sys 0000775 0000000 0000000 00000001133 11260460574 0020642 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: mount /sys
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
set -e
# - mount /sys
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${DESTDIR}/${CINIT_DIR}/mount/sys"
ln -sf /bin/mount "${DESTDIR}/${CINIT_DIR}/mount/sys/$C_ON"
echo sys > "${DESTDIR}/${CINIT_DIR}/mount/sys/${C_ON}${C_PARAMS}"
echo -t >> "${DESTDIR}/${CINIT_DIR}/mount/sys/${C_ON}${C_PARAMS}"
echo sysfs >> "${DESTDIR}/${CINIT_DIR}/mount/sys/${C_ON}${C_PARAMS}"
echo /sys >> "${DESTDIR}/${CINIT_DIR}/mount/sys/${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.mtab-clean.linux 0000775 0000000 0000000 00000001120 11260460574 0022020 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: cleanup mtab
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
set -e
# - mount /proc
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}/${CINIT_DIR}/local-tuning/cleanup-mtab"
echo '#!/bin/sh' > "${DESTDIR}/${CINIT_DIR}/local-tuning/cleanup-mtab/$C_ON"
echo 'rm -f /etc/mtab' >>"${DESTDIR}/${CINIT_DIR}/local-tuning/cleanup-mtab/$C_ON"
echo 'ln -s /proc/mounts /etc/mtab' \
>> "${DESTDIR}/${CINIT_DIR}/local-tuning/cleanup-mtab/$C_ON"
chmod 0700 "${DESTDIR}/${CINIT_DIR}/local-tuning/cleanup-mtab/$C_ON"
exit 0
cinit-0.3pre16/bin/cinit-conf.svc.respawn.off 0000775 0000000 0000000 00000000676 11260460574 0021126 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: switch respawning off
# 2005-05-24
set -e
# init variables
. $(dirname $0)/cinit-conf.read-conf
if [ $# -lt 1 ]; then
echo "`basename $0`: service-name(s)"
echo " The respawning mark will be removed from services"
exit 1
fi
BASEDIR="$DESTDIR/$CINIT_DIR"
for svc in $@; do
echo -n "Removing respawning mark from $svc ..."
rm -f "${BASEDIR}/${svc}/${C_RESPAWN}"
echo "finished."
done
cinit-0.3pre16/bin/cinit-conf.svc.respawn.on 0000775 0000000 0000000 00000000643 11260460574 0020762 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: switch respawning on
# 2005-05-24
set -e
# init variables
. $(dirname $0)/cinit-conf.read-conf
if [ $# -lt 1 ]; then
echo "`basename $0`: service-name(s)"
echo " Services will be marked respawning"
exit 1
fi
BASEDIR="$DESTDIR/$CINIT_DIR"
for svc in $@; do
echo -n "Marking $svc respawning ..."
touch "${BASEDIR}/${svc}/${C_RESPAWN}"
echo "finished."
done
cinit-0.3pre16/bin/cinit-conf.svc.udev.linux 0000775 0000000 0000000 00000004223 11260460574 0020767 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install udev
# Date: 2005-10-15
# Comment: DO NOT RSYNC TO THE WRONG SIDE!
#
. $(dirname $0)/cinit-conf.read-conf
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
BIN_UDEVSEND=$($(dirname $0)/cinit.path-find udevsend)
BIN_UDEVSTART=$($(dirname $0)/cinit.path-find udevstart)
BIN_SYSCTL=$($(dirname $0)/cinit.path-find sysctl)
BIN_MOUNT=$($(dirname $0)/cinit.path-find mount)
SERVICE="local-tuning/udev"
if [ -z "$BIN_UDEVSEND" -o -z "$BIN_UDEVSTART" -o -z "$BIN_SYSCTL" -o -z "$BIN_MOUNT" ]; then
echo "Did not find a binary."
exit 1
fi
if [ -d "${DESTDIR}/${CINIT_DIR}/${SERVICE}" ]; then
echo "Service ${SERVICE} already exists."
exit 1
fi
echo "Installing ${SERVICE} to ${DESTDIR}/${CINIT_DIR}/ ..."
# 0. general udev
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}${CINIT_DIR}/${SERVICE}"
# 1. udevmount
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}${CINIT_DIR}/mount/udev"
ln -sf "$BIN_MOUNT" "${DESTDIR}${CINIT_DIR}/mount/udev/$C_ON"
echo "udev" > "${DESTDIR}${CINIT_DIR}/mount/udev/$C_ON$C_PARAMS"
echo "-t" >> "${DESTDIR}${CINIT_DIR}/mount/udev/$C_ON$C_PARAMS"
echo "tmpfs" >> "${DESTDIR}${CINIT_DIR}/mount/udev/$C_ON$C_PARAMS"
echo "/dev" >> "${DESTDIR}${CINIT_DIR}/mount/udev/$C_ON$C_PARAMS"
# 2. udevstart
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}${CINIT_DIR}/${SERVICE}/udevstart"
ln -sf "$BIN_UDEVSTART" "${DESTDIR}${CINIT_DIR}/${SERVICE}/udevstart/$C_ON"
# dependencies
$(dirname $0)/cinit-conf.add.dependency ${SERVICE}/udevstart needs mount/sys
$(dirname $0)/cinit-conf.add.dependency ${SERVICE}/udevstart needs mount/udev
# 3. udev to hotplug
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}/${CINIT_DIR}/${SERVICE}/hotplug"
ln -sf "$BIN_SYSCTL" "${DESTDIR}/${CINIT_DIR}/${SERVICE}/hotplug/$C_ON"
echo "$BIN_UDEVSEND" > "${DESTDIR}${CINIT_DIR}/${SERVICE}/hotplug/$C_ON$C_PARAMS"
$(dirname $0)/cinit-conf.add.dependency ${SERVICE}/hotplug needs mount/proc
exit 0
cinit-0.3pre16/bin/cinit-conf.sys-v-init.get-current-runlevel 0000775 0000000 0000000 00000001411 11260460574 0024202 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
runlevel | cut -d " " -f2
cinit-0.3pre16/bin/cinit-conf.sys-v-init.migrate-fstab 0000775 0000000 0000000 00000001561 11260460574 0022644 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008 Nico Schottelius (nico-cinit-conf at schottelius.org)
#
# This file is part of cinit-conf.
#
# cinit-conf is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cinit-conf is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cinit-conf. If not, see .
#
# read root
# read swap
# FIXME: read others: later
echo "Warning: Only configuring / and swap, ignoring other devices for now"
cinit-0.3pre16/bin/cinit.reboot 0000775 0000000 0000000 00000000272 11260460574 0016443 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# reboot system
# 2005-06-09
usage()
{
echo "`basename $0`"
echo " Reboot the system:"
exit 1
}
if [ $# -ne 0 ]; then
usage
fi
kill -HUP 1
cinit-0.3pre16/bin/cinit.shutdown 0000775 0000000 0000000 00000001130 11260460574 0017016 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# shutdown system
# TODO: use ccontrol!
# 2005-05-24 (Last changed: 2005-06-18)
usage()
{
echo "`basename $0` -[ohr]"
echo " Shutdown the system:"
echo " -p|--power-off: Power off"
echo " -h|--halt: Halt"
echo " -r|--reboot: Reboot"
echo " -s|--rescue: Rescue mode"
echo " "
exit 1
}
if [ $# -ne 1 ]; then
usage
fi
case $1 in
-r|--reboot) kill -HUP 1 ;;
-p|--power-off) kill -TERM 1 ;;
-h|--halt) kill -USR1 1 ;;
-s|--rescue) kill -USR2 1 ;;
*) usage ;;
esac
cinit-0.3pre16/bin/cinit.svc.init 0000775 0000000 0000000 00000000475 11260460574 0016713 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install service: init
# Date: 2005-08-07
#
. $(dirname $0)/cinit-conf.read-conf
set -e
ln -sf /bin/echo "${DESTDIR}/${CINIT_DIR}/${C_INIT}/$C_ON"
echo '*** cinit initial service successfully started ***' \
> "${DESTDIR}/${CINIT_DIR}/${C_INIT}/${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre16/bin/cinit.svc.linux.debian.ntpdate 0000775 0000000 0000000 00000001731 11260460574 0021762 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# cinit: install ntpdate
# Date: 2005-10-15
#
. $(dirname $0)/cinit-conf.read-conf
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
. /etc/default/ntpdate
if [ -z "$NTPSERVERS" ]; then
echo "No ntp servers found, aborting"
exit 1
fi
BINARY_PATH=$($(dirname $0)/cinit.path-find ntpdate)
if [ $? -ne 0 ]; then
echo "Did not find binary ntpdate."
exit 1
fi
if [ -d "${DESTDIR}/${CINIT_DIR}/local-tuning/ntpdate" ]; then
echo "Service ntpdate already exists."
exit 1
fi
echo -n "Installing ntpdate to ${DESTDIR}/${CINIT_DIR}/local-tuning/ntpdate ..."
"$INSTALL_PROG" "$INSTALL_DIRECTORY" \
"${DESTDIR}/${CINIT_DIR}/local-tuning/ntpdate"
ln -sf "$BINARY_PATH" "${DESTDIR}/${CINIT_DIR}/local-tuning/ntpdate/$C_ON"
for server in $NTPSERVERS; do
echo "$server" >> "${DESTDIR}/${CINIT_DIR}/local-tuning/ntpdate/$C_ON$C_PARAMS"
done
echo "finished."
exit 0
cinit-0.3pre16/bin/cinit.wait.for.daemon 0000775 0000000 0000000 00000001171 11260460574 0020143 0 ustar 00root root 0000000 0000000 #!/bin/sh
# Nico Schottelius
# wait for daemon to terminate
# the pidfile is our first argument,
# the dameon the second and all others are for the daemon
# 2005-06-12 (Last Changed: 2005-06-17)
# how long to sleep before rechecking
SLEEP=5
if [ $# -lt 2 ]; then
echo "`basename $0` [daemon arguments]"
exit 1
fi
PIDFILE=$1; shift
DAEMON=$1; shift
# remove old pidfile
[ -e "$PIDFILE" ] && rm -f $PIDFILE
$DAEMON $@
PID=$(cat "$PIDFILE")
ISALIVE=$(ps ax | awk '{ print $1 }' | grep "^$PID\$")
while [ "$ISALIVE" ]; do
sleep ${SLEEP}
ISALIVE=$(ps ax | awk '{ print $1 }' | grep "^$PID\$")
done
cinit-0.3pre16/bugs/ 0000775 0000000 0000000 00000000000 11260460574 0014305 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/bugs/README 0000664 0000000 0000000 00000000046 11260460574 0015165 0 ustar 00root root 0000000 0000000 This directory is maintained by ditz.
cinit-0.3pre16/bugs/issue-0c63a541a2261c7322d6c59a6adb091301020c8d.yaml 0000664 0000000 0000000 00000001512 11260460574 0023471 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Create minimal sample configurations for different OS
desc: |-
Similar to what I thought todo in cinit.install.test:
[ -e /etc/gentoo-release ] && TAR=${TARDIR}/gentoo.tar
[ -e /etc/debian_version ] && TAR=${TARDIR}/debian.tar
[ -e /etc/SuSE-release ] && TAR=${TARDIR}/suse.tar
[ -e /etc/mandrake-release ] && TAR=${TARDIR}/mandrake.tar
[ -e /etc/fedora-release ] && TAR=${TARDIR}/fedora.tar
type: :task
component: portability
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-24 20:14:42.832701 Z
references: []
id: 0c63a541a2261c7322d6c59a6adb091301020c8d
log_events:
- - 2009-09-24 20:14:44.120614 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-0d8142c646aa04e8e713fc8f886a44475581c670.yaml 0000664 0000000 0000000 00000001160 11260460574 0023471 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: How to handle OS specific signal handlers
desc: |-
-- cinit ignores the Keyboard request
- Currently there is no support to react on 'ctr+alt+del':
Maybe allow signal handlers to be passed to something like services?
type: :task
component: core
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:29:28.589652 Z
references: []
id: 0d8142c646aa04e8e713fc8f886a44475581c670
log_events:
- - 2009-09-28 05:29:31.033914 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-120cbf62dbdd9a7a026bcbb7d2863599c7183f70.yaml 0000664 0000000 0000000 00000001561 11260460574 0024040 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Add install targets
desc: |-
install:
make install => does not overwrite critical targets
* cinit
* *.kill (see client/*)
* cmd
make force-install => overwrites /sbin/{halt,poweroff,reboot}?
=> with script that wraps cmd
make install-template:
* creates categories
make install-miniconf:
* creates categories
* creates one service starting a shell (depending on the OS!)
type: :task
component: build
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:42:21.470333 Z
references: []
id: 120cbf62dbdd9a7a026bcbb7d2863599c7183f70
log_events:
- - 2009-09-28 05:42:22.146097 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-1cc421b885608485f73c9041c5c0af71df76331a.yaml 0000664 0000000 0000000 00000000735 11260460574 0023541 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Documentate, how to write an init system
desc: So others can redo it.
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:17:05.878201 Z
references: []
id: 1cc421b885608485f73c9041c5c0af71df76331a
log_events:
- - 2009-09-29 05:17:06.729534 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-1e83dca921062d97b96830caf24e7898ad4fbbe2.yaml 0000664 0000000 0000000 00000000754 11260460574 0024060 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: add error handling to cinit.install.binary
desc: Double check the whole installation process
type: :task
component: build
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:32:13.897529 Z
references: []
id: 1e83dca921062d97b96830caf24e7898ad4fbbe2
log_events:
- - 2009-09-28 05:32:14.581391 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-25822475f5d01c35eb9edd8d75c065c83032701b.yaml 0000664 0000000 0000000 00000001021 11260460574 0023526 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: "Documentate: How to cross compile"
desc: |-
conf/os to destination os
conf/cc
conf/ld
conf/cflags
conf/ldflags
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-07 06:31:53.866741 Z
references: []
id: 25822475f5d01c35eb9edd8d75c065c83032701b
log_events:
- - 2009-09-07 06:31:54.990478 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-278e5a7b4c338f18f92d5bb1a2789d76d0e11ad9.yaml 0000664 0000000 0000000 00000002566 11260460574 0024004 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Add reason, why service was not started
desc: |-
--------------------------------------------------------------------------------
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!
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:36:51.093468 Z
references: []
id: 278e5a7b4c338f18f92d5bb1a2789d76d0e11ad9
log_events:
- - 2009-09-28 05:36:51.957356 Z
- Nico Schottelius
- created
- ""
- - 2009-09-29 05:15:14.622132 Z
- Nico Schottelius
- commented
- |-
And add better status messages:
-> starting
[ started once ]
[ respawning ]
[ failed ] (+ REASON!)
[ needs failed ] (which ones)
-> stopping
[ stopping ] (for dependencies)
[ stopped ] ?
[ not running ] ?
cinit-0.3pre16/bugs/issue-29d45f06044e5329dca7f351a17676e65d4e3b38.yaml 0000664 0000000 0000000 00000001111 11260460574 0023543 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: "Bugfix: SIGCHLD not handled carefully"
desc: ""
type: :task
component: core
release: "0.3"
reporter: Nico Schottelius
status: :in_progress
disposition:
creation_time: 2009-09-29 05:34:17.833638 Z
references: []
id: 29d45f06044e5329dca7f351a17676e65d4e3b38
log_events:
- - 2009-09-29 05:34:18.397430 Z
- Nico Schottelius
- created
- ""
- - 2009-09-29 05:35:28.338069 Z
- Nico Schottelius
- changed status from unstarted to in_progress
- ""
cinit-0.3pre16/bugs/issue-2a4a3675810b44b05ce51c021690fb3f21725e55.yaml 0000664 0000000 0000000 00000001060 11260460574 0023426 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: write sys-v-init-shutdown-wrapper
desc: |-
So people can use their known tools:
* shutdown
* halt
* reboot
* poweroff
type: :task
component: user interface
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 18:35:44.468421 Z
references: []
id: 2a4a3675810b44b05ce51c021690fb3f21725e55
log_events:
- - 2009-09-28 18:35:45.292294 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-2fda514da472aa15fa57d2df06e8d5cc909016d0.yaml 0000664 0000000 0000000 00000001002 11260460574 0024072 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Write a small manual
desc: |-
How to
- install
- configure
- boot (different OS)
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 18:37:34.300443 Z
references: []
id: 2fda514da472aa15fa57d2df06e8d5cc909016d0
log_events:
- - 2009-09-28 18:37:35.280232 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-3cc14c82109544e198e5cce002c0d94a66e6f4d7.yaml 0000664 0000000 0000000 00000000704 11260460574 0023700 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Export service information
desc: Like pid, path, ...
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:18:47.901610 Z
references: []
id: 3cc14c82109544e198e5cce002c0d94a66e6f4d7
log_events:
- - 2009-09-29 05:18:48.369488 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-40bb0e1478cb8e1fd7ef577b0acf8f7b2f516d6d.yaml 0000664 0000000 0000000 00000001341 11260460574 0024265 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Add service start/stop
desc: Hack cinit_svc_disable.c
type: :task
component: cinit
release: "0.3"
reporter: Nico Schottelius
status: :in_progress
disposition:
creation_time: 2009-09-29 05:31:38.533662 Z
references: []
id: 40bb0e1478cb8e1fd7ef577b0acf8f7b2f516d6d
log_events:
- - 2009-09-29 05:31:39.209477 Z
- Nico Schottelius
- created
- ""
- - 2009-09-29 05:32:40.681588 Z
- Nico Schottelius
- commented
- "svc_stop vs. svc_disable: coded tired?"
- - 2009-09-29 05:33:27.666143 Z
- Nico Schottelius
- changed status from unstarted to in_progress
- on it...
cinit-0.3pre16/bugs/issue-4e460e6061fb5d39549b85d42fc33f57de7a1396.yaml 0000664 0000000 0000000 00000000706 11260460574 0023643 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Maybe create libcinit?
desc: At least for use in cmd()
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:43:27.689712 Z
references: []
id: 4e460e6061fb5d39549b85d42fc33f57de7a1396
log_events:
- - 2009-09-28 05:43:28.069533 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-5bd7befd45553864b1d2ebc12509e06440a402d0.yaml 0000664 0000000 0000000 00000000724 11260460574 0023656 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Documentate how to migrate from another init system
desc: ""
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 20:00:00.854675 Z
references: []
id: 5bd7befd45553864b1d2ebc12509e06440a402d0
log_events:
- - 2009-09-28 20:00:01.450291 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-5c4769f4f4f23b8a544ae3e20866d8fc2676a7e7.yaml 0000664 0000000 0000000 00000000750 11260460574 0023733 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: add code do implement stopping / restarting service with/without dependency tree
desc: ""
type: :task
component: cinit
release: 0.3.1
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:33:24.966097 Z
references: []
id: 5c4769f4f4f23b8a544ae3e20866d8fc2676a7e7
log_events:
- - 2009-09-28 05:33:25.929966 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-8391cdbcb30d007bfb692504d9469a93f7c15b97.yaml 0000664 0000000 0000000 00000001002 11260460574 0023701 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Mase sure cinit runs on POSIX
desc: Double check that there are no linux deps in it anymore (from cinit-0.2)
type: :task
component: portability
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:16:19.961614 Z
references: []
id: 8391cdbcb30d007bfb692504d9469a93f7c15b97
log_events:
- - 2009-09-29 05:16:20.858087 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-85687a7f79046db51429db38e7b1da5234a3675e.yaml 0000664 0000000 0000000 00000001302 11260460574 0023555 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: write examples for profiles
desc: |-
o switch ssh known_hosts based on profile
o different proxy settings in browsers
- environment
- mozilla settings
o start samba (for lan)
o start samba (for company lan)
o use nis and nfs (company profile)
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:19:26.941625 Z
references: []
id: 85687a7f79046db51429db38e7b1da5234a3675e
log_events:
- - 2009-09-29 05:19:27.345506 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-863a9d56ed460fb45e91d2c555d57133d2286f72.yaml 0000664 0000000 0000000 00000001331 11260460574 0023555 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Add speedup part in documentation
desc: |-
- cinit will start a little bit faster if you omit non needed
'wants' and 'needs' dirs as they need to be scanned if they
do not exist
- Dependencies beginning with a '.' (dot) are ignored.
So you can temporarily disable a dependency moving it to
want/.name
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:30:01.562097 Z
references: []
id: 863a9d56ed460fb45e91d2c555d57133d2286f72
log_events:
- - 2009-09-28 05:30:02.433805 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-8d5e1aee59a52ab1b3b0b02b02f07823d4f4b8d8.yaml 0000664 0000000 0000000 00000001454 11260460574 0024077 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Create cinit-conf framework or libexec
desc: |-
Maybe include
- cinit_service_modify(name|path)
- cinit_service_create() - interactive
- cinit_service_delete(name|path) - interactive
* has to take care about needs / wants!
- cinit_magic_configuration_generation()
* tries to build a completly fresh configuration, by analysing your system
Non interactive tools
- cinit_svc_del
type: :task
component: user interface
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:28:48.049604 Z
references: []
id: 8d5e1aee59a52ab1b3b0b02b02f07823d4f4b8d8
log_events:
- - 2009-09-29 05:28:48.665510 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-bb27c9b51f82dd54eba8baa40aa5e8bba326ea01.yaml 0000664 0000000 0000000 00000000714 11260460574 0024365 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: export profile information
desc: Possible via $CINIT_PROFILE
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:19:54.965525 Z
references: []
id: bb27c9b51f82dd54eba8baa40aa5e8bba326ea01
log_events:
- - 2009-09-29 05:19:55.929526 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-c8d020845511594b4b90bb38a2a839ef6ce4c9c8.yaml 0000664 0000000 0000000 00000001014 11260460574 0023701 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Cleanup environment before starting child
desc: |-
Close fds, free mem, ...
Chcek what's necessary, what's senseful, ...
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:41:22.857702 Z
references: []
id: c8d020845511594b4b90bb38a2a839ef6ce4c9c8
log_events:
- - 2009-09-28 05:41:23.909476 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-d3732fffad054c5a1f781f28a60015346ad28dd6.yaml 0000664 0000000 0000000 00000001006 11260460574 0023745 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: write cinit-conf.check
desc: |-
* report broken links in needs/wants
* report circular dependencies
type: :task
component: user interface
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 18:36:27.892997 Z
references: []
id: d3732fffad054c5a1f781f28a60015346ad28dd6
log_events:
- - 2009-09-28 18:36:28.504859 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-d7a7970bd20e1dc0b04f314fee5f39ba90d3d904.yaml 0000664 0000000 0000000 00000000734 11260460574 0024111 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Cleanup contrib+tools
desc: Tools may be old or not even compiling. Cleanup!
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:22:54.298139 Z
references: []
id: d7a7970bd20e1dc0b04f314fee5f39ba90d3d904
log_events:
- - 2009-09-29 05:22:55.166003 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-dbc5e27c03e3dd22add144409f6dfe8b81d2c8d1.yaml 0000664 0000000 0000000 00000001204 11260460574 0024244 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Documentate sleeping behaviour (when respawing processes)
desc: |-
- cinit will sleep after respawing if ...
a) the service did not terminate normally (!WIFEXITED(status))
b) the service did return a non-zero exit status
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:27:32.721481 Z
references: []
id: dbc5e27c03e3dd22add144409f6dfe8b81d2c8d1
log_events:
- - 2009-09-28 05:27:33.821345 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-e40b9f0761d0a1e0ca47cc8e0e52d4ec16f51669.yaml 0000664 0000000 0000000 00000001021 11260460574 0024021 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: define service status in one document, so repeatition stops
desc: |-
maybe use doxygen?
Chose focus: user | developer
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 05:31:11.886061 Z
references: []
id: e40b9f0761d0a1e0ca47cc8e0e52d4ec16f51669
log_events:
- - 2009-09-28 05:31:12.802016 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-e435cb93810ea790f795fedc2e9afc6475c9c0a8.yaml 0000664 0000000 0000000 00000000742 11260460574 0024147 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: "FAQ: what happens when a service does not terminate...."
desc: write faq!
type: :task
component: documentation
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-28 20:11:41.130314 Z
references: []
id: e435cb93810ea790f795fedc2e9afc6475c9c0a8
log_events:
- - 2009-09-28 20:11:41.862145 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-f10682d63b1059f876c6cdde2323a596dba89d3c.yaml 0000664 0000000 0000000 00000002677 11260460574 0024004 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Test new build sytem
desc: |-
Migrate conf/ to general conf/-buildsystem (write documentation for it).
gpm2 may be an example for this!
conf/targets:
targets to make available in Makefile and their dependencies
abstract the build-process somehow, so one can create build-targets?
c-programs/ (includes cc / ld)
cinit (link to conf/object_listings cinit?)
conf/object_listings
lists of dependencies:
conf/object_listings/cinit contains all objects needed for cinit
conf/programs/
like cc, ld, install, ...
conf/built-options/
like --... in ./configure
conf/install/
options/
destdir (prefixed before everything)
prefix (standard prefix)
bin (relative to prefix, if not beginning with a /)
sbin (relative to prefix, if not beginning with a /)
lib (relative to prefix, if not beginning with a /)
targets/
cinit/
built-target (link to conf/targets/cinit)
destination (relative to
type: :task
component: build
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:21:55.313650 Z
references: []
id: f10682d63b1059f876c6cdde2323a596dba89d3c
log_events:
- - 2009-09-29 05:21:55.845402 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-fa88d3f9dca2df7ccaf8fb9ce2daab3e9255dae3.yaml 0000664 0000000 0000000 00000000677 11260460574 0024742 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Check shutdown code
desc: To verify the right way
type: :task
component: core
release: "0.3"
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:34:46.305951 Z
references: []
id: fa88d3f9dca2df7ccaf8fb9ce2daab3e9255dae3
log_events:
- - 2009-09-29 05:34:46.774065 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/issue-fea40277e32b0bd747d7f47a68d41009fc046fd9.yaml 0000664 0000000 0000000 00000000726 11260460574 0023772 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: add logging support for services
desc: Similar to DJB tools? multilog?
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-09-29 05:18:00.717667 Z
references: []
id: fea40277e32b0bd747d7f47a68d41009fc046fd9
log_events:
- - 2009-09-29 05:18:01.146029 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre16/bugs/project.yaml 0000664 0000000 0000000 00000002250 11260460574 0016636 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/project
name: cinit
version: "0.5"
components:
- !ditz.rubyforge.org,2008-03-06/component
name: cinit
- !ditz.rubyforge.org,2008-03-06/component
name: core
- !ditz.rubyforge.org,2008-03-06/component
name: user interface
- !ditz.rubyforge.org,2008-03-06/component
name: portability
- !ditz.rubyforge.org,2008-03-06/component
name: documentation
- !ditz.rubyforge.org,2008-03-06/component
name: build
releases:
- !ditz.rubyforge.org,2008-03-06/release
name: "0.3"
status: :unreleased
release_time:
log_events:
- - 2009-09-07 06:28:02.974644 Z
- Nico Schottelius
- created
- The first cleaned up version
- !ditz.rubyforge.org,2008-03-06/release
name: future
status: :unreleased
release_time:
log_events:
- - 2009-09-07 06:29:14.264777 Z
- Nico Schottelius
- created
- All things to be fixed in the future.
- !ditz.rubyforge.org,2008-03-06/release
name: 0.3.1
status: :unreleased
release_time:
log_events:
- - 2009-09-28 05:32:55.870041 Z
- Nico Schottelius
- created
- Bugfix of 0.3
cinit-0.3pre16/conf/ 0000775 0000000 0000000 00000000000 11260460574 0014272 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/conf/.README 0000664 0000000 0000000 00000000452 11260460574 0015231 0 ustar 00root root 0000000 0000000 This is an example for a cinit and cinit-conf configuration.
The first line of a file contains the configuration value,
the rest of the file may contain a description.
The conf/ directory is shared by cinit and cinit-conf and may contain files that
are only relevant for one of the two projects.
cinit-0.3pre16/conf/c_confdir 0000664 0000000 0000000 00000000075 11260460574 0016145 0 ustar 00root root 0000000 0000000 conf
The directory below cinit_dir for cinit configuration.
cinit-0.3pre16/conf/c_delay 0000664 0000000 0000000 00000000161 11260460574 0015613 0 ustar 00root root 0000000 0000000 delay
Name of the file which contains the delay between sending SIGKILL after
SIGTERM for respawning processes.
cinit-0.3pre16/conf/c_desaster 0000664 0000000 0000000 00000000251 11260460574 0016327 0 ustar 00root root 0000000 0000000 /bin/sh
The path to a program, that we execute if nothing
else helps. We'll execute it, if the standard panic
action fails (as specified in cinit_dir/c_confdir/panic).
cinit-0.3pre16/conf/c_env 0000664 0000000 0000000 00000000220 11260460574 0015301 0 ustar 00root root 0000000 0000000 .env
The extension to c_on and c_off, which will contain the environment \n seperated.
For instance:
CLIENT_IP=192.168.23.42
ACCEPT_CONN=32
cinit-0.3pre16/conf/c_init 0000664 0000000 0000000 00000000044 11260460574 0015460 0 ustar 00root root 0000000 0000000 init
The name of the init service.
cinit-0.3pre16/conf/c_last 0000664 0000000 0000000 00000000343 11260460574 0015462 0 ustar 00root root 0000000 0000000 last
Name of the file below cinit_dir/c_confdir/ to execute right before
reboot/halt/poweroff.
This maybe a shellscript with the OS-specific umount procedure (like umount -a),
see doc/user/configuring.cinit for more details.
cinit-0.3pre16/conf/c_needs 0000664 0000000 0000000 00000000111 11260460574 0015606 0 ustar 00root root 0000000 0000000 needs
Name of the service sub-directory containing the needed services.
cinit-0.3pre16/conf/c_off 0000664 0000000 0000000 00000000073 11260460574 0015271 0 ustar 00root root 0000000 0000000 off
Name of the file we start, when stopping the service.
cinit-0.3pre16/conf/c_on 0000664 0000000 0000000 00000000072 11260460574 0015132 0 ustar 00root root 0000000 0000000 on
Name of the file we start, when starting the service.
cinit-0.3pre16/conf/c_panic 0000664 0000000 0000000 00000000244 11260460574 0015611 0 ustar 00root root 0000000 0000000 panic
Name of the file below cinit_dir/c_confdir/ to execute on panic.
This name .params (normally panic.params) will be passed as parameters/
argumunts to panic.
cinit-0.3pre16/conf/c_params 0000664 0000000 0000000 00000000132 11260460574 0015776 0 ustar 00root root 0000000 0000000 .params
The extension to c_on and c_off, which will contain the parameters \n seperated.
cinit-0.3pre16/conf/c_respawn 0000664 0000000 0000000 00000000125 11260460574 0016174 0 ustar 00root root 0000000 0000000 respawn
If this file exists in a service directory, cinit will respawn the service.
cinit-0.3pre16/conf/c_sock 0000664 0000000 0000000 00000000137 11260460574 0015457 0 ustar 00root root 0000000 0000000 coala
The name of the socket cinit will use (currently: below tmpdir,
see doc/ipc.thoughts).
cinit-0.3pre16/conf/c_tmp 0000664 0000000 0000000 00000000127 11260460574 0015317 0 ustar 00root root 0000000 0000000 tmp
The name of the temporary directory, where we'll mount tmpfs to create the socket
cinit-0.3pre16/conf/c_tmpfs 0000664 0000000 0000000 00000000141 11260460574 0015644 0 ustar 00root root 0000000 0000000 tmpfs
The name of the filesystem to use to mount a memory filesystem.
On Linux this is "tmpfs".
cinit-0.3pre16/conf/c_tmpmount 0000664 0000000 0000000 00000000232 11260460574 0016377 0 ustar 00root root 0000000 0000000 tmpfs
The name of the mount target, we'll mount with c_tmpfs on the c_tmp directory.
On Linux this can be anything, but we will use the default "tmpfs".
cinit-0.3pre16/conf/c_wants 0000664 0000000 0000000 00000000111 11260460574 0015644 0 ustar 00root root 0000000 0000000 wants
Name of the service sub-directory containing the wanted services.
cinit-0.3pre16/conf/cc 0000664 0000000 0000000 00000000034 11260460574 0014577 0 ustar 00root root 0000000 0000000 gcc
The c-compiler to use.
cinit-0.3pre16/conf/cflags 0000664 0000000 0000000 00000000340 11260460574 0015451 0 ustar 00root root 0000000 0000000 -pipe -W -Wall -Werror -Iinclude -g -D_XOPEN_SOURCE=600 -D_USE_POSIX
Standard flags to pass to (g)cc.
-D_XOPEN_SOURCE=600 must be used on glibc to select the right standard.
-D_USE_POSIX is needed for sigemptyset on glibc
cinit-0.3pre16/conf/cinit_dir 0000664 0000000 0000000 00000000106 11260460574 0016156 0 ustar 00root root 0000000 0000000 /etc/cinit
This is where all configuration for cinit will be stored.
cinit-0.3pre16/conf/cinitconfdir 0000664 0000000 0000000 00000000063 11260460574 0016667 0 ustar 00root root 0000000 0000000 conf
General cinit-configuration (below cinitdir)
cinit-0.3pre16/conf/destdir 0000664 0000000 0000000 00000000301 11260460574 0015645 0 ustar 00root root 0000000 0000000
The destination to install to. This is not used when running cinit,
but only for installing it. Normally the first line is blank.
cinit-conf uses this file for installing the configuration.
cinit-0.3pre16/conf/gettydir 0000664 0000000 0000000 00000000220 11260460574 0016042 0 ustar 00root root 0000000 0000000 getty
This is the subdirectry in which the scripts will create the gettys,
if you are using 'install-conf'. It's not used be cinit internally.
cinit-0.3pre16/conf/install_directory 0000664 0000000 0000000 00000000075 11260460574 0017751 0 ustar 00root root 0000000 0000000 -d
Parameter to pass to install_prog to create directories.
cinit-0.3pre16/conf/install_prog 0000664 0000000 0000000 00000000147 11260460574 0016714 0 ustar 00root root 0000000 0000000 /usr/bin/install
Program we use to install. install_directory contains parameter
to create directory.
cinit-0.3pre16/conf/ipc_method 0000664 0000000 0000000 00000000164 11260460574 0016331 0 ustar 00root root 0000000 0000000 msgq
The type of IPC (inter process communication) to use.
Valid values can be optained by issuing `ls src/ipc/`.
cinit-0.3pre16/conf/ld 0000664 0000000 0000000 00000000026 11260460574 0014612 0 ustar 00root root 0000000 0000000 gcc
Comment missing.
cinit-0.3pre16/conf/ldflags 0000664 0000000 0000000 00000000037 11260460574 0015631 0 ustar 00root root 0000000 0000000
No flags specified normally.
cinit-0.3pre16/conf/max_delay 0000664 0000000 0000000 00000000124 11260460574 0016155 0 ustar 00root root 0000000 0000000 30
Maximum number of seconds to sleep between retrying to start it
(respawn only).
cinit-0.3pre16/conf/max_deps 0000664 0000000 0000000 00000000212 11260460574 0016010 0 ustar 00root root 0000000 0000000 32
Maximum number of direct dependencies (in each wants and needs,
that way doubling this number) a service may have. The default is 32.
cinit-0.3pre16/conf/msgq_pathname 0000664 0000000 0000000 00000000123 11260460574 0017035 0 ustar 00root root 0000000 0000000 /bin/sh
Used to generate an unique identifier for the message queue.
See ftok(3).
cinit-0.3pre16/conf/msgq_to_clients 0000664 0000000 0000000 00000000153 11260460574 0017406 0 ustar 00root root 0000000 0000000 o
This is use in ftok to generate a key_t for the message queue use to write
to the clients. See ftok(3).
cinit-0.3pre16/conf/msgq_to_server 0000664 0000000 0000000 00000000152 11260460574 0017252 0 ustar 00root root 0000000 0000000 i
This is use in ftok to generate a key_t for the message queue use to write
to the server. See ftok(3).
cinit-0.3pre16/conf/os 0000664 0000000 0000000 00000000240 11260460574 0014632 0 ustar 00root root 0000000 0000000 linux
Select the operating system compiling for.
Current possibilities:
- linux
Currently Planned possibilities:
- freebsd
- openbsd
- netbsd
cinit-0.3pre16/conf/p_asciidoc 0000664 0000000 0000000 00000000166 11260460574 0016315 0 ustar 00root root 0000000 0000000 asciidoc
The binary on your system (with or without path) which does what I expect
asciidoc todo.
Default: asciidoc
cinit-0.3pre16/conf/p_docbooktoman 0000664 0000000 0000000 00000000174 11260460574 0017215 0 ustar 00root root 0000000 0000000 docbook2x-man
The binary on your system (with or without path) which converts
docbook to manpages.
Default: docbook2x-man
cinit-0.3pre16/conf/p_docbooktotexi 0000664 0000000 0000000 00000000175 11260460574 0017414 0 ustar 00root root 0000000 0000000 docbook2x-texi
The binary on your system (with or without path) which converts
docbook to texinfo.
Default: docbook2x-texi
cinit-0.3pre16/conf/prefix 0000664 0000000 0000000 00000000300 11260460574 0015503 0 ustar 00root root 0000000 0000000
Where to install cinit. Normally this will be /, but you can put it anywhere.
The subdirectory 'sbin' under this prefix must be readable by the kernel.
This is normally either empty or "/".
cinit-0.3pre16/conf/profile 0000664 0000000 0000000 00000000470 11260460574 0015656 0 ustar 00root root 0000000 0000000 cprofile:
The argument should be passed to cinit to recognize that
a profile will follow. "cprofile:" is the standard, as
the Linux kernel eats everything in the form 'var=parm'.
The old (pre cinit-0.1) option "cprofile=" should therefore
NOT be used.
Under Linux you tell it the bootloader like grub or LILO.
cinit-0.3pre16/conf/service_categories 0000664 0000000 0000000 00000000222 11260460574 0020056 0 ustar 00root root 0000000 0000000 getty local-tuning local-services mount network remote-services
List of directories normally created below /etc/cinit/svc/ as 'pseudo-services'.
cinit-0.3pre16/conf/sleep_before_kill 0000664 0000000 0000000 00000000347 11260460574 0017666 0 ustar 00root root 0000000 0000000 sleep_before_kill
The file that specifies how long to sleep after sending SIGTERM, before sending
SIGKILL to every process. If this file is non-existing the builtin value from
'sleep_kill'.
The file should be located below conf/
cinit-0.3pre16/conf/sleep_kill 0000664 0000000 0000000 00000000377 11260460574 0016347 0 ustar 00root root 0000000 0000000 2
Seconds to sleep after sending SIGTERM, before sending SIGKILL to every
process. 5 is a good working value, but makes me tired. Testing with
2 currently.
Note: This does NOT affect terminating services, they are shutdown by
their own 'off' functions.
cinit-0.3pre16/conf/sleep_kill_svc 0000664 0000000 0000000 00000000255 11260460574 0017215 0 ustar 00root root 0000000 0000000 1
Seconds to sleep after sending SIGTERM, before sending SIGKILL to
the service we are shutting down. This is only used for
bringing down respawning processes. Default: 1.
cinit-0.3pre16/conf/sleep_rerun 0000664 0000000 0000000 00000000137 11260460574 0016541 0 ustar 00root root 0000000 0000000 1
How many seconds to sleep before rechecking if the service was executed.
Used by run_svc().
cinit-0.3pre16/conf/sleep_svc 0000664 0000000 0000000 00000000101 11260460574 0016170 0 ustar 00root root 0000000 0000000 5
How many seconds to sleep before respawning a failed process.
cinit-0.3pre16/conf/sock_queue 0000664 0000000 0000000 00000000127 11260460574 0016360 0 ustar 00root root 0000000 0000000 32
Maximum process waiting in the socket queue. The default is much
more than enough.
cinit-0.3pre16/conf/strip 0000664 0000000 0000000 00000000110 11260460574 0015346 0 ustar 00root root 0000000 0000000 strip -R .comment -R .note
Strip out unecessary parts of the binaries.
cinit-0.3pre16/conf/sulogin 0000664 0000000 0000000 00000000274 11260460574 0015700 0 ustar 00root root 0000000 0000000 /sbin/sulogin
The path to sulogin. We'll execute it, if the standard panic
action fails (as specified in cinit_dir/c_confdir/panic).
If you need arguments, you tave to hack serv/panic.c
cinit-0.3pre16/conf/svcdir 0000664 0000000 0000000 00000000074 11260460574 0015510 0 ustar 00root root 0000000 0000000 svc
Directory below /etc/cinit that contains the services.
cinit-0.3pre16/conf/version 0000664 0000000 0000000 00000000041 11260460574 0015675 0 ustar 00root root 0000000 0000000 "0.3pre16"
The version of cinit
cinit-0.3pre16/contrib+tools/ 0000775 0000000 0000000 00000000000 11260460574 0016141 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/contrib+tools/Makefile 0000664 0000000 0000000 00000002301 11260460574 0017575 0 ustar 00root root 0000000 0000000 #
# (c) 2005 Peter Portmann (pp at bluewin.ch)
# cinit/contrib+tools
#
# This script is written for the clinux-System and published
# under the terms of GPL 2.0
#
# Version: 0.2
# clean with a single command instead of two commands.
#
# ChangeLog:
# 0.1 initial version
#
# Todo:
#
# Features:
#
# compile/link options
#
# do not use DEBUG and OPTIMIZE at the same time!
#DEBUG=-DDEBUG
#OPTIMIZE=-Werror
DEBUG=-g -DDEBUG
#OPTIMIZE=-pipe -Os -Werror
# init should be static per default!
LDFLAGS=
# programs
CC=gcc $(DEBUG) $(OPTIMIZE) $(TIMEME)
CFLAGS=-Wall -I. -I../
LD=gcc
STRIP=strip -R .comment -R .note
INSTALL = install
prefix = /usr
bindir = $(prefix)/bin
# objects
CLIENT=cinit.graph.text.o
COMMUNICATION=error.o usage.o mini_printf.o
OBJ=$(CLIENT) $(COMMUNICATION)
#
PROGRAMS=cinit.graph.text
SCRIPTS=cconfig.graph.xml.rb \
make.cconfig.from.xml.rb \
cinit-vis.pl
# targets
all: $(PROGRAMS)
cinit.graph.text: $(OBJ)
$(LD) $(LDFLAGS) $(OBJ) -o $@
$(STRIP) $@
clean:
rm -f *.o $(PROGRAMS)
install: all
@echo '*** Installing contrib+tools ***'
$(INSTALL) -d -m755 $(DESTDIR)$(bindir)
for bin in $(SCRIPTS) $(PROGRAMS); do \
$(INSTALL) $$bin $(DESTDIR)/$(bindir); \
done
cinit-0.3pre16/contrib+tools/README 0000664 0000000 0000000 00000000663 11260460574 0017026 0 ustar 00root root 0000000 0000000 contrib+tools/
programs written by others and external tools not necessary
needed but (very) nice to have
cinit-vis.pl - draw an ascii graph of cinit configuration [perl]
cinit.graph.text - draw an ascii graph of cinit configuration [c]
cconfig.graph.xml.rb - creates a xml file from a cconfig [ruby]
make.cconfig.from.xml.rb - creates a cconfig from a xml file [ruby]
cinit-0.3pre16/contrib+tools/README.ruby 0000664 0000000 0000000 00000000416 11260460574 0020002 0 ustar 00root root 0000000 0000000 The ruby tools for general cconfig [0] are written by René Nussbaumer [1].
You can find the documentation for them at [2].
[0]: http://nico.schotteli.us/papers/linux/cconfig/
[1]: http://killerfox.forkbomb.ch/
[2]: http://killerfox.forkbomb.ch/articles/cconfig/tools
cinit-0.3pre16/contrib+tools/cconfig.graph.xml.rb 0000775 0000000 0000000 00000006675 11260460574 0022016 0 ustar 00root root 0000000 0000000 #!/usr/bin/env ruby
=begin
Writes an XML-Tree for a cconfig directory
Idea by Nico Schottelius aka telmich
Implemented and (C) by René Nussbaumer aka KillerFox
This script is written for the clinux-System and published
under the terms of GPL 2.0
Version: 0.3
ChangeLog:
Version 0.3 (René Nussbaumer):
* Added support for binary files
* Added sha1 checksum for binary files
Version 0.2 (René Nussbaumer):
* Changed checking order: symlink, directory, file. Because of
a logical bug -> directory follows symlink so, when a symlink
points to a directory no «link» element is created.
Version 0.1 (René Nussbaumer):
* Holy hack for directory scanning (needs to be optimized)
* Hack for rexml to print out «lost» tags. This rexml sux.
Todo:
* Optimize scanning.
* Use another xml library instead of rexml crap.
Problem: Produce dependencies -> no std-lib
Features:
* Create a flat (no deepnes without directory) and 1:1 image
of an cconfig directory
=end
require 'rexml/document'
require 'base64'
require 'digest/sha1'
require 'filemagic'
@version = '0.3'
def determineTarget(entry)
return 'external' if(!File.expand_path(entry).index(@initpath))
return 'link' if(FileTest.symlink?(entry))
return 'object' if(FileTest.directory?(entry))
return 'attribute' if(FileTest.file?(entry))
return 'unknown' # Should never be reached
end
def createTree(dir, parent)
dir.each { |entry|
next if(entry =~ /^(\.|\.\.)$/)
if(FileTest.symlink?(entry))
e = parent.add_element('link')
# Much fun with links
e.add_attributes( { 'name' => entry, 'target' => determineTarget(File.readlink(entry)) } )
e.add_text(File.readlink(entry))
elsif(FileTest.directory?(entry))
e = parent.add_element('object')
e.add_attribute('name', entry)
# Bad, that we need to change the directory every time.
oldPwd = Dir.pwd
Dir.chdir(entry)
createTree(Dir.new('.'), e)
Dir.chdir(oldPwd)
elsif(FileTest.file?(entry))
e = parent.add_element('attribute')
e.add_attribute('name', entry)
if(File.stat(entry).size?)
# Yeah, we got one WITH content! W00h00, let's party.
fm = FileMagic.new(FileMagic::MAGIC_MIME)
if(fm.file(entry) =~ /executable/)
e.add_attribute('type', 'binary')
text = File.new(entry).read
e.add_attribute('sha1', Digest::SHA1.hexdigest(text))
e.add_text(Base64.encode64(text))
else
e.add_text(File.new(entry).read)
end
fm.close()
end
end
}
end
if(!ARGV[0] || !FileTest.directory?(ARGV[0]))
puts 'You need to specify a directory'
Kernel.exit(-1)
end
doc = REXML::Document.new
e = doc.add_element('cconfig')
e.add_attribute('name', File.basename(ARGV[0]))
e.add_attribute('version', @version)
@initpath = File.expand_path(ARGV[0])
Dir.chdir(ARGV[0])
createTree(Dir.new('.'), doc.root)
out = ''
doc.write(out, 0, false, true)
REXML::XMLDecl.new('1.0', 'utf-8').write($stdout) # This should automatically printed by rexml. Damn bugs.
puts ''
puts out # Workaround for a buggy rexml
cinit-0.3pre16/contrib+tools/cinit-vis.pl 0000775 0000000 0000000 00000003112 11260460574 0020403 0 ustar 00root root 0000000 0000000 #!/usr/bin/perl -w
# (c) by Marcus Przyklink (downhill-clinux@burningchaos.org)
# written for cinit and published under GPL
# beautified a bit by Nico Schottelius
# optimized by René Nussbaumer
# Version: 0.1
use strict;
use warnings;
#
# Variables for location and output
#
# cinit-directory
my $path = "/etc/cinit/svc/";
# started profile
my $starting_point = "init";
# the spaces for each level (integer: amount of spaces)
my $space = 3;
# marker for need
my $need = "-->";
# marker for want
my $want = "==>";
#
# main function, recursively list the components of the cinit system
#
if (@ARGV) {
if( $ARGV[0] =~ /-(h|-help)/ ) {
print "Usage: " . __FILE__ . " without parameters for standard-use (check variables in file)\n";
print " Parameters:\n";
print " -h for this help\n";
print " profile-name for a profile\n";
exit(0);
}
else {
$starting_point = $ARGV[0];
}
}
#
# start first instance
#
sub get_deeper {
my ($point, $tmp_counter, $need_want) = splice @_;
print " " x ($space * $tmp_counter) . ($need_want ? $need : $want) . " " . $point . "\n";
opendir(DIR, "${path}${point}/needs") and
my @next_need = sort grep(!/^\./, readdir(DIR)) and
closedir(DIR);
opendir(DIR, "${path}${point}/wants") and
my @next_want = sort grep(!/^\./, readdir(DIR)) and
closedir(DIR);
for(@next_need) {
get_deeper($_, $tmp_counter + 1, 1);
}
for(@next_want) {
get_deeper($_, $tmp_counter + 1, 0);
}
}
#
# start first instance
#
get_deeper($starting_point, 0, 0);
#
# work done, go home
#
exit(0);
cinit-0.3pre16/contrib+tools/cinit.graph.text.c 0000664 0000000 0000000 00000012471 11260460574 0021503 0 ustar 00root root 0000000 0000000 /**
(c) 2005 Peter Portmann (pp at bluewin.ch)
cinit.graph.text.c
This script is written for the clinux-System and published
under the terms of GPL 2.0
Version: 0.2
ChangeLog:
Version 0.2 (Peter Portmann):
* Not assigned link destinies are marked by (!).
* Not readable directories are marked by "directory not readable".
Version 0.1 (Peter Portmann):
* Print of the directory structure of the contained files and links
without following the links.
Todo:
Features:
*/
//#include
#include
#include
#include
#include
#include
#include
#include
//#include "cinit.h"
#include "error.h"
#define FTW_F 1 /* file isn't a directory */
#define FTW_D 2 /* file is a directory */
#define FTW_DNR 3 /* not readable directory */
#define FTW_NS 4 /* unsuccesfully stat on this file */
#define MAX_CHAR 4096
/***********************************************************************
* cinit.graph.text - textual representation of the cinit directory
*/
#define CSERVICE_BANNER "cinit.graph.text - textual representatio of the cinit directory\n\n"
#define USAGE_TEXT "\n\nUsage:\n\ncinit.graph.text \n" \
"\tpath\t- cinit installationpath\n"
typedef int EACH_ENTRY(const char *, const struct stat *, int);
typedef enum { FALSE=0, TRUE=1 } bool;
static char dirpath[PATH_MAX];
static int depth = 0;
static long int filecount = 0;
static EACH_ENTRY each_entry;
static int pp_ftw(char *, EACH_ENTRY *);
static int each_getinfo(EACH_ENTRY *);
/***********************************************************************
* pp_ftw: file tree walk
*/
static int pp_ftw(char *filepath, EACH_ENTRY *function)
{
int n;
if(chdir(filepath) < 0) /* In angegebenen Pfad wechseln */
err_msg(FATAL_SYS, "can't change to %s", filepath);
if(getcwd(dirpath, PATH_MAX) == 0) /* Absoluten Pfadnamen ermitteln */
err_msg(FATAL_SYS, "error using getcwd for %s", filepath);
n = each_getinfo(function);
return(n);
}
/***********************************************************************
* each_getinfo: get more info for each file.
*/
static int each_getinfo(EACH_ENTRY *function)
{
struct stat statpuff;
struct dirent *direntz;
DIR *dirz;
int n;
char *zgr;
if(lstat(dirpath, &statpuff) < 0)
return(function(dirpath, &statpuff, FTW_NS)); /* Error on stat */
if(S_ISDIR(statpuff.st_mode) == 0)
return(function(dirpath, &statpuff, FTW_F)); /* no directory */
/* It's a directory.
* Call function() for it. After that handel each file in the directory. */
if((dirz = opendir(dirpath)) == NULL) { /* Directory not readable */
closedir(dirz);
return(function(dirpath, &statpuff, FTW_DNR));
}
if((n = function(dirpath, &statpuff, FTW_D)) != 0) /* return the directorydirpath */
return(n);
zgr = dirpath + strlen(dirpath); /* append slash to the dirpathname */
*zgr++ = '/';
*zgr = '\0';
while((direntz = readdir(dirz)) != NULL) {
/* ignor . and .. */
if(strcmp(direntz->d_name, ".") && strcmp(direntz->d_name, "..")) {
strcpy(zgr, direntz->d_name); /* append filename after slash */
depth++;
if(each_getinfo(function) != 0) { /* Recursion */
depth--;
break;
}
depth--;
}
}
*(zgr-1) = '\0'; /* deleting evrything after the slash */
if(closedir(dirz) < 0)
err_msg(WARNING, "closedir for %s failed", dirpath);
return(n);
}
/***********************************************************************
* each_entry: handling each file and build the graph step by step.
*/
static int each_entry(const char *filepath, const struct stat *statzgr, int filetype)
{
struct stat statpuff;
static bool erstemal=TRUE;
int i;
char link[MAX_CHAR];
filecount++;
if(!erstemal) {
for(i=1 ; i<=depth ; i++)
printf("%4c|", ' ');
printf("----%s", strrchr(filepath, '/')+1);
} else {
printf("%s", filepath);
erstemal = FALSE;
}
switch(filetype) {
case FTW_F:
switch(statzgr->st_mode & S_IFMT) {
case S_IFREG: break;
case S_IFCHR: printf(" c"); break;
case S_IFBLK: printf(" b"); break;
case S_IFIFO: printf(" f"); break;
case S_IFLNK:
printf(" -> ");
if(( i=readlink(filepath, link, MAX_CHAR)) != -1)
printf("%.*s", i, link);
if(stat(filepath, &statpuff) < 0)
printf(" (!)");
break;
case S_IFSOCK: printf(" s"); break;
default: printf(" ?"); break;
}
printf("\n");
break;
case FTW_D:
printf("/\n");
break;
case FTW_DNR:
printf("/ directory not readable\n");
break;
case FTW_NS:
err_msg(WARNING_SYS, "Error using 'stat' on file %s", filepath);
break;
default:
err_msg(FATAL_SYS, "Unknown Filetype (%d) by file %s", filetype, filepath);
break;
}
return(0);
}
/***********************************************************************
* main:
*/
int main(int argc, char *argv[])
{
if(argc != 2)
usage(CSERVICE_BANNER, USAGE_TEXT);
exit(pp_ftw(argv[1], each_entry));
}
cinit-0.3pre16/contrib+tools/cinit.h 0000664 0000000 0000000 00000000565 11260460574 0017426 0 ustar 00root root 0000000 0000000 /***********************************************************************
*
* 2007 Nico Schottelius (nico-cinit //@\\ schottelius.org)
*
* part of cLinux/cinit
*
* Dummy header file to intgrate mini_printf and usage
*/
#ifndef CINIT_DUMMY_HEADER
#define CINIT_DUMMY_HEADER
void usage(char *banner, char *text);
void mini_printf(char *str,int fd);
#endif
cinit-0.3pre16/contrib+tools/error.c 0000664 0000000 0000000 00000005707 11260460574 0017447 0 ustar 00root root 0000000 0000000 /**
(c) 2005 Peter Portmann (pp at bluewin.ch)
error.c
This script is written for the clinux-System and published
under the terms of GPL 2.0
Version: 0.1
ChangeLog:
Todo:
Features:
*/
#include "error.h"
#include
#include
#include
#include
#include
#include
#define MAX_CHAR 4096
int debug; /* Aufrufer von log_msg oder log_open muss debug setzen:
0, wenn interaktiv; 1, wenn Daemon-Prozess */
/*---- Lokale Routinen zur Abarbeitung der Argumentliste --------------------*/
static void msg_err(int sys_msg, const char *fmt, va_list az)
{
int fehler_nr = errno;
char puffer[MAX_CHAR];
vsprintf(puffer, fmt, az);
if (sys_msg)
sprintf(puffer+strlen(puffer), ": %s ", strerror(fehler_nr));
fflush(stdout); /* fuer Fall, dass stdout und stderr gleich sind */
fprintf(stderr, "%s\n", puffer);
fflush(NULL); /* alle Ausgabepuffer flushen */
return;
}
static void msg_log(int sys_msg, int prio, const char *fmt, va_list az)
{
int fehler_nr = errno;
char puffer[MAX_CHAR];
vsprintf(puffer, fmt, az);
if (sys_msg)
sprintf(puffer+strlen(puffer), ": %s ", strerror(fehler_nr));
if (debug) {
fflush(stdout); /* fuer Fall, dass stdout und stderr gleich sind */
fprintf(stderr, "%s\n", puffer);
fflush(NULL); /* alle Ausgabepuffer flushen */
} else {
strcat(puffer, "\n");
syslog(prio, puffer);
}
return;
}
/*---- Global aufrufbare Fehlerroutinen -------------------------------------*/
void err_msg(int kennung, const char *fmt, ...)
{
va_list az;
va_start(az, fmt);
switch (kennung) {
case WARNING:
case FATAL:
msg_err(0, fmt, az);
break;
case WARNING_SYS:
case FATAL_SYS:
case DUMP:
msg_err(1, fmt, az);
break;
default:
msg_err(1, "Falscher Aufruf von err_msg...", az);
exit(3);
}
va_end(az);
if (kennung==WARNING || kennung==WARNING_SYS)
return;
else if (kennung==DUMP)
abort(); /* core dump */
exit(1);
}
void log_msg(int kennung, const char *fmt, ...)
{
va_list az;
va_start(az, fmt);
switch (kennung) {
case WARNING:
case FATAL:
msg_log(0, LOG_ERR, fmt, az);
break;
case WARNING_SYS:
case FATAL_SYS:
msg_log(1, LOG_ERR, fmt, az);
break;
default:
msg_log(1, LOG_ERR, "Falscher Aufruf von log_msg...", az);
exit(3);
}
va_end(az);
if (kennung==WARNING || kennung==WARNING_SYS)
return;
exit(2);
}
/*---- log_open ---------------------------------------------------------------
initialisiert syslog() bei einem Daemon-Prozess */
void log_open(const char *kennung, int option, int facility)
{
if (debug==0)
openlog(kennung, option, facility);
}
cinit-0.3pre16/contrib+tools/error.h 0000664 0000000 0000000 00000000733 11260460574 0017446 0 ustar 00root root 0000000 0000000 #ifndef ERROR_H
#define ERROR_H
/**
(c) 2005 Peter Portmann (pp at bluewin.ch)
error.h
This script is written for the clinux-System and published
under the terms of GPL 2.0
Version: 0.1
ChangeLog:
Todo:
Features:
*/
#define WARNING 0
#define WARNING_SYS 1
#define FATAL 2
#define FATAL_SYS 3
#define DUMP 4
void log_msg(int kennung, const char *fmt, ...);
void err_msg(int kennung, const char *fmt, ...);
#endif
cinit-0.3pre16/contrib+tools/make.cconfig.from.xml.rb 0000775 0000000 0000000 00000014503 11260460574 0022561 0 ustar 00root root 0000000 0000000 #!/usr/bin/env ruby
=begin
Create a cconfig directory based on a xml input.
(C) 2005 by Ren Nussbaumer aka KillerFox
This script is written for the clinux-System and published
under the terms of GPL 2.0
Version: 0.3
ChangeLog:
Version 0.3 (Ren Nussbaumer):
* Added binary file support
* Added sha1 checksum for binary files
Version 0.2 (Ren Nussbaumer):
* Added some commandline options
* Added level so control the restrictivity of the program
* Added more intelligence to the program, to detect internal broken dependcies.
* Support debug-Levels.
* Print statistic at the end of the programs about warnings and errors.
Version 0.1 (Ren Nussbaumer):
* Initial
Todo:
* Use an rexml alternative
* Some cleanup
* Optimize
* Testing?
Features:
* Create a cconfig directory based on a xml
=end
require 'rexml/document'
require 'getoptlong'
require 'base64'
require 'digest/sha1'
@verbose = 0
@level = 1
@version = '0.3'
@warnings = 0
@errors = 0
@checklist = Array.new
def printMsg(prefix, msg)
puts '%-12s %s' % [prefix + ':', msg]
end
def error(msg, fatal = 0)
@errors += 1
fatal = 0 if(@level < 1)
fatal = 255 if(@level > 1 && !fatal)
printMsg(fatal != 0 ? 'PANIC' : 'ERROR', msg)
Kernel.exit(-fatal) if(fatal != 0)
end
def warn(msg)
error(msg, 1) if(@level > 1)
@warnings += 1
printMsg('WARNING', msg)
end
def info(msg)
printMsg('INFO', msg)
end
def debug(msg, verbosity = 1)
if(@verbose >= verbosity)
printMsg("DEBUG(#{verbosity})", msg)
end
end
def createObject(name)
error("#{name} already exists.", 1) if(FileTest.exists?(name))
begin
Dir.mkdir(name)
rescue
error("Could not create directory #{name}: #{$!}. Abort.", 7)
end
debug("Object #{File.expand_path(name)} has been created.", 4)
end
def createAttribute(name, content = nil)
warn("#{name} already exists. Overwrite.") if(FileTest.exists?(name))
begin
file = File.new(name, 'w')
file.print content if(content && !content.empty?)
file.close
debug("Attribute #{File.expand_path(name)} has been created", 4)
rescue
error("Could not create file #{name}: #{$!}. Skipped.")
end
end
def createLink(name, target, type)
warn("#{name} already exists. Overwrite.") if(FileTest.exists?(name))
error("Broken dependencies! Please take a look if #{target} exists on your system", 2) if(type == 'external' && !FileTest.exists?(target))
if(!FileTest.exists?(target) && type != 'external')
#info("Possible break. But maybe the target #{target} does not yet exists. Checking later.")
exptarget = File.expand_path(target)
@checklist << exptarget
debug("Adding #{target} to the list of internal dependcies to check.", 2)
end
begin
error('You\'ve a system which does not support symbolic links. Abort.', 3) if(File.symlink(target, name) != 0)
rescue
error("Could not create symlink #{name} => #{target}: #{$!}.", 3)
end
debug("Link #{File.expand_path(name)} has been created", 4)
end
def doWork(elm)
name = elm.name
attrname = elm.attributes['name']
error("XML Tag with missing name attribute!", 5) if(!attrname)
if(name =~ /(object|cconfig)/)
if(name == 'cconfig')
if(elm.attributes['version'])
info("Found a version string: #{elm.attributes['version']}")
warn("This XML is maybe incompatible with this programm. I'm a version #{@version} script. The XML is generated with a version #{elm.attributes['version']} script. Please update.") if(elm.attributes['version'] > @version)
end
end
createObject(attrname)
if(elm.has_elements?)
pwd = Dir.pwd
Dir.chdir(attrname)
elm.each_element { |e|
doWork(e)
}
Dir.chdir(pwd)
end
elsif(name == 'attribute')
text = nil
e = nil
text = e.value if((e = elm.get_text))
if(text && elm.attributes['type'] && elm.attributes['type'] == 'binary')
text = Base64.decode64(text)
if(Digest::SHA1.hexdigest(text) != elm.attributes['sha1'])
warn("SHA1 differs from file: #{Dir.pwd}#{attrname}")
end
end
createAttribute(attrname, text)
elsif(name == 'link')
error("link-Tag without content.", 6) if(!elm.has_text?)
error("link with missing target. Skipped.") if(!elm.attributes['target'])
createLink(attrname, elm.get_text.value, elm.attributes['target'])
end
end
puts "This is #{File.basename(__FILE__)} v#{@version} by Ren Nussbaumer"
puts
opts = GetoptLong.new(
['--verbose', '-v', GetoptLong::OPTIONAL_ARGUMENT],
['--level', '-l', GetoptLong::REQUIRED_ARGUMENT],
['--version', '-V', GetoptLong::NO_ARGUMENT]
)
opts.each { |arg,value|
case arg
when '--verbose'
@verbose += 1
value.each_byte { |x|
if(x.chr == 'v')
@verbose += 1
end
}
debug("Verbosity set to: #{@verbose}")
when '--level'
debug("Setting level to: #{value}", 3)
case value
when 'low'
@level = 0
when 'normal'
@level = 1
when 'paranoid'
@level = 2
else
warn('Unknown level: ' + value)
end
when '--version'
Kernel.exit(0)
else
warn("Unknown option #{arg}#{value && !value.empty? ? ('with value ' + value) : ''}")
end
}
if(!ARGV[0])
puts 'Need at least one argument'
puts "Usage: #{__FILE__} "
Kernel.exit(1)
end
filedesc = $stdin
if(ARGV[0] != '-')
filedesc = File.new(ARGV[0])
end
doc = REXML::Document.new filedesc
doWork(doc.root)
if(!@checklist.empty?)
info('Now checking all broken internal dependcies again')
broken = 0
@checklist.each { |path|
debug("Checking #{path}.", 2)
if(!FileTest.exists?(path))
broken += 1
warn("Broken dependcies. #{path} does not exist. Please fix.")
end
}
info('Looks good.') if(broken == 0)
info('Bad, bad.') if(broken > 0)
end
info("Successed. #{@warnings} warnings, #{@errors} errors")
cinit-0.3pre16/contrib+tools/mini_printf.c 0000777 0000000 0000000 00000000000 11260460574 0025716 2../src/generic/mini_printf.c ustar 00root root 0000000 0000000 cinit-0.3pre16/contrib+tools/usage.c 0000777 0000000 0000000 00000000000 11260460574 0023272 2../src/generic/usage.c ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ 0000775 0000000 0000000 00000000000 11260460574 0014112 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/.buildwarn 0000664 0000000 0000000 00000001057 11260460574 0016105 0 ustar 00root root 0000000 0000000
Welcome to the cinit
********************
Hints:
------
- Settings can be found in conf/* (also used for compiling)
- Cinit configuration is normally found in /etc/cinit
Documentation
-------------
The documentation can be found in doc/:
- doc/user/ contains documentation for users
- doc/devel/ contains documentation for developers
Please read doc/user/installing-cinit.text BEFORE installing.
Building cinit
--------------
"make all" - to build cinit
"make install" - to install cinit, documentation and core tools
cinit-0.3pre16/doc/COPYING 0000664 0000000 0000000 00000104513 11260460574 0015151 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
cinit-0.3pre16/doc/CREDITS 0000664 0000000 0000000 00000001644 11260460574 0015137 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Credits - People contributed to cinit
Nico Schottelius, 2005-05-17 (Last Change: ls -l)
--------------------------------------------------------------------------------
The following list is sorted chronological, new contributors are
added at the end of the list.
René Nussbaumer
* helping with the general IPC idea
* testing and proof-reading code
Marcus Przyklink
* coding linear lists, making MAX_SVC obsolete
* providing cinit-vs.pl to visualize the cinit-tree
Matteo Croce
* finding good strip parameters to save about 30KiB (on glibc)
Sandro Koechli
* testing, testing and testing cinit and cinit documentation
Marcus Wagner
* building and maintaining the Debian package
Peter Portmann
* testing cinit and documentation, writing cinit.graph.text in C, other coding
Tonnerre Lombard
* NetBSD support (host + hints)
cinit-0.3pre16/doc/Makefile 0000664 0000000 0000000 00000004775 11260460574 0015567 0 ustar 00root root 0000000 0000000 #
# Makefile stolen from ccollect
# Nico Schottelius, Fri Jan 13 12:13:08 CET 2006
#
A2X=a2x
ASCIIDOC=asciidoc
DOCBOOKTOTEXI=docbook2x-texi
DOCBOOKTOMAN=docbook2x-man
XSLTPROC=xsltproc
XSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
#
# Asciidoc will be used to generate other formats later
#
MANDOCS = man/cinit.text man/halt.kill.text man/poweroff.kill.text \
man/reboot.kill.text man/cmd.text
USERDOCS = user/compiles.on.text user/configuring.cinit.text \
user/conf-system.text \
user/cross-compiling.text user/current-init-problems.text \
user/daemons.backgrounding.text user/dependencies.text \
user/example-directory-structure.text \
user/installing-cinit.text user/paths.text \
user/profiles.text user/README.text
DEVELDOCS = devel/codingguideline.text
DOCS = $(MANDOCS) $(USERDOCS) $(DEVELDOCS)
#
# Doku
#
HTMLDOCS = $(DOCS:.text=.html)
DBHTMLDOCS = $(DOCS:.text=.htm)
#TEXIDOCS = $(DOCS:.text=.texi)
MANPDOCS = $(MANDOCS:.text=.man)
DOCBDOCS = $(DOCS:.text=.docbook)
DOC_ALL = $(HTMLDOCS) $(DBHTMLDOCS) $(TEXIDOCS) $(MANPDOCS)
#
# End user targets
#
help:
@echo "----------- documentation make targets --------------"
@echo "documentation: generate HTML, Texinfo and manpage"
@echo "html: only generate HTML (via asciidoc/docbook/xsltproc)"
@echo "htm: only generate HTML (via asciidoc)"
@echo "info: only generate Texinfo"
@echo "man: only generate manpages"
@echo "pdf: only generate pdfs (requires: fop)"
install: $(DOC_ALL)
@echo "===> Copy " man/*.[0-9] "to the correct manpaths"
#
# Internal targets
#
html: $(HTMLDOCS)
htm: $(DBHTMLDOCS)
info: $(TEXIDOCS)
man: $(MANPDOCS)
documentation: $(DOC_ALL)
#
# Generic targets
#
# docbook gets .htm, asciidoc directly .html (or the other way round)
%.html: %.docbook
${XSLTPROC} -o $@ ${XSL} $<
%.htm: %.text
${ASCIIDOC} -n -o $@ $<
%.docbook: %.text
${ASCIIDOC} -n -b docbook -o $@ $<
%.texi: %.docbook
${DOCBOOKTOTEXI} --to-stdout $< > $@
%.mandocbook: %.text
${ASCIIDOC} -b docbook -d manpage -o $@ $<
#%.man: %.mandocbook
# ${DOCBOOKTOMAN} --to-stdout $< > $@
%.man: %.text
${A2X} -f manpage $<
%.pdf: %.text
${A2X} -f pdf $<
#
# Distribution
#
clean distclean:
rm -f $(DOC_ALL)
rm -f man/*.texi man/*.xml man/*.[0-9]
#
# Be nice with the users and generate documentation for them
#
dist: distclean documentation
cinit-0.3pre16/doc/README.text 0000664 0000000 0000000 00000002050 11260460574 0015752 0 ustar 00root root 0000000 0000000 cinit/doc
=========
Nico Schottelius
0.1, Initial Version from 2006-11-30
:Author Initials: NS
This directory contains the cinit documentation.
Files and directories in this directory
----------------------------------------
ancient
~~~~~~~
Old documents, only thought to irritate you.
They are not interesting for most people and may contain
obsoleted or wrong information.
braindumps
~~~~~~~~~~
Files I used to make the situation clear to myself.
They are not interesting for most people and may contain
obsoleted or wrong information.
devel
~~~~~
Developer related documents. Contains information for adding code,
for developing external tools to cinit or code guidelines for writing
patches to cinit.
logs
~~~~
Logfiles or raw data dumps.
Makefile
~~~~~~~~
The makefile used to generate the documentation.
man
~~~
Manpages.
README.text
~~~~~~~~~~~
This file
user
~~~~
The most important part: Documentation for users (aka sysadmins,
hackers, endusers?): Explains howto install, configure, use and
debug cinit.
cinit-0.3pre16/doc/ancient/ 0000775 0000000 0000000 00000000000 11260460574 0015533 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/Changelog 0000664 0000000 0000000 00000000634 11260460574 0017350 0 ustar 00root root 0000000 0000000 Mo Okt 3 00:19:40 CEST 2005
*Changelog can now be found in git database (cg-log)
Sun May 8 12:20:35 CEST 2005
*Changelog can now be found in monotone database (monotone log)
Sat Apr 30 15:53:53 CEST 2005
* add socket code
Tue Apr 26 15:29:53 CEST 2005
* removed is_cinit support, initial messaging framework
Mon Apr 18 14:07:50 CEST 2005
* added is_cinit -> recognize if you are cinit or a fork
cinit-0.3pre16/doc/ancient/README 0000664 0000000 0000000 00000000652 11260460574 0016416 0 ustar 00root root 0000000 0000000 Ancient
=======
Nico Schottelius
0.1, for cinit 0.3, Initial Version from 2006-06-02
These files may be incorrect, outdated, totally wrong or even trying
to take over world dominance.
Why are they still there?
-------------------------
Just because to document the early days of cinit. If you are
a software archaeologist in the year 2423, you'll be happy that
I saved those files.
cinit-0.3pre16/doc/ancient/TODO.lucky 0000664 0000000 0000000 00000002153 11260460574 0017352 0 ustar 00root root 0000000 0000000 18:18 hey, ich hatte gerade ein wenig lust mich mit cinit zu befassen, hier also mein
kleiner bug-report: in src/include fehlt cinit.h, (alles auf das aktuelle
tarball bezogen), ich hab's aus pre9 genommen, hatte ich noch da, da git nicht
wollte(Cannot get remote repository information.), ausserdem hast du _ statt -
in doc/man/cinit.text verwendet bei der email, das mag docbook nicht, die
beiden zeilen habe ich korrigiert, danch ging schon mal make all und auch make
ins
18:35 und warum installiert er die man pages nicht mit?
07:20 so, kleiner zwischenbericht, das argv problem bei lvm gibt es mit pre10 nicht
mehr, d.h. dass man auch kein shell-skript mehr braucht um lvm/luks-devices zu
mounten :)
07:20 soweit sieht eig. alles gut aus
07:21 wenn das so bleibt, dann werd' ich dauerhaft auf cinit umsteigen :)
07:21 und wenn sich die gelegenheit bietet, dann stell ich cinit auch mal in der
info-ag von unserer schule vor :)
cinit-0.3pre16/doc/ancient/caveats 0000664 0000000 0000000 00000004752 11260460574 0017114 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
'Geheimnisse' in German,
Nico Schottelius, 2005-05-XX (Last Modified: 2005-06-11)
--------------------------------------------------------------------------------
- Dependencies beginning with a '.' (dot) are ignored.
So you can temporarily disable a dependency moving it to
want/.name
- Why is the name of the socket "coala"?
Well, coala could mean 'cinit object abstract layer access', but
perhaps it's a much simpler reason.
- cinit will start a little bit faster if you omit non needed
'wants' and 'needs' dirs as they need to be scanned if they
do not exist
- Currently there is no support to react on 'ctr+alt+del':
1. It is not handled to switch on / off
(Linux: See man 2 reboot and /proc/sys/kernel/ctrl-alt-del)
2. If the kernel handles it and sends signals to cinit
(SIGINT on Linux) they will be ignored.
There is no problem in implementing a handler for this signal,
the only reason why it is not there
(well, a template is in old/sig_special.c) is that nobody
could tell me what would be the most senseful thing to handle
ctrl-alt-del. If you can, I'll perhaps integrate it.
3. ctrl-alt-del is currently disabled under Linux within
the service local-tuning/ctrl-alt-del
- cinit ignores the Keyboard request
Same thing with 'ctr-alt-del': SIGWINCH is sent, but I don't
know what to do when recieving it.
- cinit does not care about its pid
nor does cinit care if it is already running
in serv/cinit.c is a line calling run_init_svc().
If you call that only if getpid() == 1, cinit will behave like sysvinit
and refuse to start if pid is not 1.
Currently cinit has no chance to control whether it's started or
not as /etc/cinit/tmp mounted again for every start.
- cinit will sleep after respawing if ...
a) the service did not terminate normally (!WIFEXITED(status))
b) the service did return a non-zero exit status
- sleeping before rechecking if a service is finished can be optimised
Currently run_svc() checks every SLEEP_RERUN seconds (default: 1),
if the service it should start was finished by another instance
of run_svc(). As run_svc() internally uses nanosleep() for sleeping,
one could modify run_svc to use conf/sleep_rerun as a nanoseconds
value. This would add most likely much often checking, but would
result in faster results from run_svc.
What's the best value for SLEEP_RERUN is currently unknown.
cinit-0.3pre16/doc/ancient/cinit-doc/ 0000775 0000000 0000000 00000000000 11260460574 0017404 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/cinit-doc/author 0000664 0000000 0000000 00000000067 11260460574 0020634 0 ustar 00root root 0000000 0000000 Nico Schottelius
cinit-0.3pre16/doc/ancient/cinit-doc/availability 0000664 0000000 0000000 00000000043 11260460574 0021776 0 ustar 00root root 0000000 0000000 cinit is currently Linux-specific.
cinit-0.3pre16/doc/ancient/cinit-doc/examples 0000664 0000000 0000000 00000000057 11260460574 0021147 0 ustar 00root root 0000000 0000000 See http://linux.schottelius.org/cinit/#config
cinit-0.3pre16/doc/ancient/cinit-doc/files 0000664 0000000 0000000 00000000330 11260460574 0020425 0 ustar 00root root 0000000 0000000 /sbin/cinit - the init system
/sbin/cservice - control cinit
/sbin/cinit.reboot (/sbin/reboot if non-existent before)
/sbin/cinit.shutdown (/sbin/shutdown if non-existent before)
/etc/cinit - configuration directory
cinit-0.3pre16/doc/ancient/cinit-doc/long_description 0000664 0000000 0000000 00000000544 11260460574 0022674 0 ustar 00root root 0000000 0000000 cinit is a fast executing, small and simple init with support for profiles. It
minds dependencies (hard and soft, 'needs' and 'wants') and executes processes
in parallel. And it has a simple configuration, which makes many shell-scripts
unecessary (but you still could use them if you really want), which leads to
better performance and less memory using.
cinit-0.3pre16/doc/ancient/cinit-doc/meta/ 0000775 0000000 0000000 00000000000 11260460574 0020332 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/cinit-doc/meta/date 0000664 0000000 0000000 00000000013 11260460574 0021164 0 ustar 00root root 0000000 0000000 2005-08-21
cinit-0.3pre16/doc/ancient/cinit-doc/meta/man_section 0000664 0000000 0000000 00000000002 11260460574 0022544 0 ustar 00root root 0000000 0000000 8
cinit-0.3pre16/doc/ancient/cinit-doc/meta/name 0000664 0000000 0000000 00000000006 11260460574 0021171 0 ustar 00root root 0000000 0000000 cinit
cinit-0.3pre16/doc/ancient/cinit-doc/meta/short_description 0000664 0000000 0000000 00000000073 11260460574 0024017 0 ustar 00root root 0000000 0000000 fast executing, small and simple init with profile-support
cinit-0.3pre16/doc/ancient/cinit-doc/parameters 0000664 0000000 0000000 00000000026 11260460574 0021470 0 ustar 00root root 0000000 0000000 cprofile:
cinit-0.3pre16/doc/ancient/cinit-doc/path 0000664 0000000 0000000 00000000014 11260460574 0020256 0 ustar 00root root 0000000 0000000 /sbin/cinit
cinit-0.3pre16/doc/ancient/cinit-doc/see also 0000664 0000000 0000000 00000000044 11260460574 0021020 0 ustar 00root root 0000000 0000000 http://linux.schottelius.org/cinit/
cinit-0.3pre16/doc/ancient/cinit-doc/synopsis 0000664 0000000 0000000 00000000015 11260460574 0021212 0 ustar 00root root 0000000 0000000 /sbin/cinit
cinit-0.3pre16/doc/ancient/cinit.commands 0000664 0000000 0000000 00000005440 11260460574 0020367 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
cinit commands,
Nico Schottelius 2005-04-28 (Last Modified: 2005-06-11)
--------------------------------------------------------------------------------
cinit allows communication through a socket (see ipc.thoughs for reasons).
Sockets allow to find out the accessing uid, gid and pid (using SO_PEERCRED as
socketoption).
The communication-protocol is binary, the implementation can be found
in comm/* mostly (clients use begin_msg() and server sigio() additonally).
--------------------------------------------------------------------------------
Protocol overview
--------------------------------------------------------------------------------
Any communication begins with a command. A command is a one byte
unsigned char. Depending on the command, the communication has its own
semantics.
Commands are: (values can be found in cinit.h)
CMD_START_SVC: I want to start a service.
CMD_CHG_STATUS: I want to change the status of a service.
CMD_STOP_SVC: Please shutdown a service.
CMD_RESCUE: Kill everything, and spawn a sulogin shell.
CMD_UPDATE: Hot-reboot system and reload cinit.
CMD_HALT: Halt the system
CMD_REBOOT: Reboot the system
CMD_POWEROFF: Power-off the system
--------------------------------------------------------------------------------
Detailled command-listing
--------------------------------------------------------------------------------
CMD_START_SVC
1. int len; /* length of service name, including \0 */
2. char *svc; /* name of the service, absolute pathname */
cinit returns:
a) status of service
b) fail
CMD_CHG_STATUS: I want to change the status of a service.
0. int len;
1. char *svc;
2. char status; /* status:
once: started successfully the service once.
fail: tried to start once, but the service exit ungracefully
respawn: I am on it, as soon it exists I'll restart! */
2. pid_t pid /* the pid of the service, if started once
or the pid of the service watcher, if respawning */
cinit returns: MSG_OK|MSG_FAIL (char)
CMD_STOP_SVC: Please shutdown a service and its dependencies.
1. int len; /* length of service name, including \0 */
2. char *svc; /* name of the service, absolute pathname */
cinit returns: Status of service (should be ST_OFF)
The following commands do not return anything nor do they need any parameter:
CMD_RESCUE: Kill everything, and spawn a sulogin shell. Irreversible.
CMD_HALT: Halt the system.
CMD_REBOOT: Reboot the system.
CMD_POWEROFF: Power-off the system.
CMD_UPDATE: Update cinit, hot-reboot the system.
cinit-0.3pre16/doc/ancient/cservice-doc/ 0000775 0000000 0000000 00000000000 11260460574 0020101 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/cservice-doc/author 0000664 0000000 0000000 00000000067 11260460574 0021331 0 ustar 00root root 0000000 0000000 Nico Schottelius
cinit-0.3pre16/doc/ancient/cservice-doc/long_description 0000664 0000000 0000000 00000000072 11260460574 0023365 0 ustar 00root root 0000000 0000000 cservice controls cinit. Please use cservice -h for help.
cinit-0.3pre16/doc/ancient/cservice-doc/meta/ 0000775 0000000 0000000 00000000000 11260460574 0021027 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/cservice-doc/meta/date 0000664 0000000 0000000 00000000013 11260460574 0021661 0 ustar 00root root 0000000 0000000 2005-08-21
cinit-0.3pre16/doc/ancient/cservice-doc/meta/man_section 0000664 0000000 0000000 00000000002 11260460574 0023241 0 ustar 00root root 0000000 0000000 8
cinit-0.3pre16/doc/ancient/cservice-doc/meta/name 0000664 0000000 0000000 00000000011 11260460574 0021662 0 ustar 00root root 0000000 0000000 cservice
cinit-0.3pre16/doc/ancient/cservice-doc/meta/short_description 0000664 0000000 0000000 00000000073 11260460574 0024514 0 ustar 00root root 0000000 0000000 fast executing, small and simple init with profile-support
cinit-0.3pre16/doc/ancient/cservice-doc/parameters 0000664 0000000 0000000 00000000022 11260460574 0022161 0 ustar 00root root 0000000 0000000 [-eaphru] [thilo]
cinit-0.3pre16/doc/ancient/cservice-doc/path 0000664 0000000 0000000 00000000017 11260460574 0020756 0 ustar 00root root 0000000 0000000 /sbin/cservice
cinit-0.3pre16/doc/ancient/cservice-doc/see also 0000664 0000000 0000000 00000000044 11260460574 0021515 0 ustar 00root root 0000000 0000000 http://linux.schottelius.org/cinit/
cinit-0.3pre16/doc/ancient/cservice-doc/synopsis 0000664 0000000 0000000 00000000015 11260460574 0021707 0 ustar 00root root 0000000 0000000 /sbin/cinit
cinit-0.3pre16/doc/ancient/extern/ 0000775 0000000 0000000 00000000000 11260460574 0017040 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/ancient/extern/README 0000664 0000000 0000000 00000000104 11260460574 0017713 0 ustar 00root root 0000000 0000000 doc/extern/
Some things related to cinit from the outside world.
cinit-0.3pre16/doc/ancient/extern/ipc.thoughts 0000664 0000000 0000000 00000005062 11260460574 0021405 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Thoughts about different UNIX-IPC,
Nico Schottelius, 2005-04-28 (Last Modified: 2005-06-11)
--------------------------------------------------------------------------------
Howto cinit communicates with
a) cinit-forks
b) any other program
a) cinit-forks
a.1) shared memory
Access could generally be done with shared memory. The problem with
that is, that -lrt is required, which implicits -lpthread, which
makes linking staticly problematic (at least for glibc).
a.2) pipes
A maximum of ~510 pipes could be used ( (1024-3)/2 ),
1024 is the maximum opened file deskriptors,
minus 3 (stdin/stdout/stderr) already opened, divided
by two, because two fds needed per client.
Pipes cannot be used easily through forks of forks.
a.3) fifos
FIFOs are easy to use, but you would need to create two FIFOs
for _every_ service, as with only two FIFOs we cannot reliable
detect, _who_ is writting to us currently and who wants to read.
The same limit as above is true for fifo, too: A maximum of ~510
services.
a.4) system-v-ipc
No documentation found nor tested.
a.5) sockets
Are indeed a very clean way. There's only one problem:
bind() fails on read-only mounted devices:
- The socket either does not exists and cannot be created
- or the socket exists, but bind() refuses to reuse it
(error: Address already in use)
Imho bind() should even honour the socket-option SO_REUSEADDR,
which allows to re-use a socket, if there's no other program bound to.
As far as I can see, SO_REUSEADDR is only honoured, if socket is of
type PF_INET (we use PF_UNIX) and POSIX does only specify how to
check for support, but not that sockets have to be able to use
SO_REUSEADDR (see posix.aardvark.bug.report).
That way, we are forced to mount a temporarily filesystem on
/etc/cinit/tmp and create the socket below this directory. This is not
the clean and easy solution one would wish. Still, sockets
seem to be the cleanest and most reliable way to have IPC for
this situation.
See socket(2), bind(2), listen(2), accept(2), socket(7) and unix(7)
for help.
b) any other program
What you can do is to tell cinit to
- reboot,
- halt,
- poweroff,
- update itself (hot-reboot)
- and to start a rescue mode (see using.rescue).
Simple send cinit a signal, what to do:
HUP: reboot
USR1: halt
USR2: rescue
TERM: poweroff
CONT: update
See signal(2) and signal(7) for help and serv/sig_reboot.c for implementation.
--------------------------------------------------------------------------------
cinit-0.3pre16/doc/ancient/extern/ipc.usenet.posting 0000664 0000000 0000000 00000003036 11260460574 0022524 0 ustar 00root root 0000000 0000000 From: Nico Schottelius
Subject: Unix IPC, socket/AF_UNIX; bind on r/o devices?
Date: 09 May 2005 09:51:27 GMT
To: comp.unix.programmer
Hello!
Situation:
- everything mounted readonly (as when starting the system)
- one process with n children, which may have n children (recursive)
- all the children and children of children should be able to talk to the
first parent
Problem:
- Using bind() will fail, because
a) socket cannot created
b) the existing socket cannot be reused
Other possibilities not working:
- shared memory is not an option, as one need
-lrt, which needs -lpthread, which is problematic to link statically
- pipes: handling the pipes from parent to child of child of child
would be hard to program
- socketpair: should be the same problematic as it's with pipes
- fifos: one would have to create the fifos before and two fifos
for each child; possible, but very unelegant; and one would have
to memorize, which child is connected to which fifo; again possible,
but somehow unelegant
- signaling: one could implement communication with some kind of
morse code with signals, but that won't be a good solution
Questions:
- Is there any way, case b) (socket already existing) can be solved in
a way that I tell bind() to use an existing socket?
- What would be the best solution to talk bidirectional to clients
in this scenario?
I appreciate any hint, as I really like the socket mechanism and would
like to keep it.
Thanks in advance,
Nico
cinit-0.3pre16/doc/ancient/extern/linux.kernel.eats.arguments 0000664 0000000 0000000 00000002447 11260460574 0024347 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Linux, the kernel, eats arguments
Nico Schottelius 2005-06-17 (Last Modified: 2005-06-17)
--------------------------------------------------------------------------------
If you specify
variable=value
to the Linux kernel, the argument will NOT be passed to cinit.
Here's the relevant code block from init/main.c of the Linux kernel:
-------------------------------------------------------------------------------
From init(void * unused) the function run_init_process(char *init_filename)
is called, which passes argv_init (char * argv_init[MAX_INIT_ARGS+2]) to init.
First init_setup(char *str) resets all elements of the argv_init to NULL.
The function unknown_bootoption(char *param, char *val) fills the
argv_init array, but only with parameters, which have no value
(val).
The function parse_args calls unknown_bootoption with the unknown options.
-------------------------------------------------------------------------------
This way the profile support in all cinit versions below cinit-0.1 will
only work if you change conf/profile, because "cprofile=value" will
not be given to cinit, because it's not treated as a command line option.
The original value "cprofile=" is replaced by "cprofile:" as of cinit-0.1.
cinit-0.3pre16/doc/ancient/extern/posix.aardvark.bug.report 0000664 0000000 0000000 00000003317 11260460574 0024011 0 ustar 00root root 0000000 0000000 To: austin-review-l__AT__opengroup.org
From: nico-posix__AT__schottelius.org
Subject: Bug in TC2-d6 bind - bind a name to a socket
Reply-To: austin-group-l__AT__opengroup.org
Bug report from : Nico Schottelius , cLinux
(Note that the reply-to line automatically redirects
to austin-group-l__AT__opengroup.org for further discussion on bug reports)
@ page 1 line 0 section bind - bind a name to a socket objection {-1}
Problem:
bind should 'assign a name to a socket', but in particular environments it will fail, where it could succeed.
Long Description:
When opening a new socket, with type PF_UNIX
(sock = socket(PF_UNIX,SOCK_STREAM,0);) and one sets
the socket option SO_REUSEADDR
(setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp))),
bind does not honour this setting.
It is reported on irc channels, that SO_REUSEADDR is only supported on
PF_INET sockets and that's what I would claim a bug.
If a socket exists in the filesystem and no process is bound to
it, bind wail fail anyway.
This is especially problematic, when one is in an environment,
which is pre-startup (like beeing init) and one wants to use
sockets, but everything is mounted read-only.
So, if bind() would honour the option, it would be able
to bind() to a socket, which exists (as creating one on a
read-only filesystem is not possible).
Action:
Proposal:
Add better specification to either socket(7) or bind(2), which
explains the behaviour of bind, when this option is set
or even better: Specify, that bind should take care of this bit,
also when using PF_UNIX.
In general the socket(7) manpage should explain more in detail
or at least reference other documents (unix(7)?), which explain what the
option for a specific protocol does.
cinit-0.3pre16/doc/ancient/fun-testing 0000664 0000000 0000000 00000000373 11260460574 0017724 0 ustar 00root root 0000000 0000000 kind tot 17 ...
Read path: /
Read path: e
Read path: t
Read path: c
Read path: /
Read path: c
Read path: i
Read path: n
Read path: i
Read path: t
Read path: /
Read path: t
Read path: e
Read path: s
Read path: t
Read path: s
Read path: v
Read path: c
cinit-0.3pre16/doc/ancient/how_it_works_internally 0000664 0000000 0000000 00000001501 11260460574 0022432 0 ustar 00root root 0000000 0000000 The following is a very simple process structure of cinit internals:
cinit-main starts
\
|-> execute run_init_svc()
| \ run_svc(CINIT_INIT);
| | check status <-------------------\
| | set status = temp |
| \ check dependencies |
| | fork(run_svc()) for every WANT |
| | run_svc() for every NEED /
| / check if respawning { do .. while(repawn?)
| \ yes: (remember: run_svc _must_ return!)
| | msg_change_status(respawn)
| | add watcher_signal handler to stop! (SIGTERM)
| | fork(exec_svc) <--|
| | waitpid(fork) | while(1) { ... }
| \ sleep(WAIT_SECS) ---/
| | no: fork(exec_svc)
| \ waitpid(fork) -> yes, wait!
| | msg_change_status
| /
| /
| -> while(1)
| - listen to signals
| - listen on socket
cinit-0.3pre16/doc/ancient/init-idea-first 0000664 0000000 0000000 00000001270 11260460574 0020446 0 ustar 00root root 0000000 0000000 - restarting/respawning
touch respawn
- dependencies
a needs started b
- clean multiply dependencies
- start & stop dependencies
start_depends
stop_depends
- parallel executation
- start and stop commands
start -> link
start_param -> parameters, like minit
stop -> link
stop_param -> parameters, like minit
if no stop command is available, try to kill the pid we started at stop
/startup/
start_depends=gettys
/shutdown/
stop_depends=power_off
gettys/
start_depends=getty/1
start_depends=getty/2
start_depends=getty/3
start_depends=getty/4 ...
getty/1/
start=/sbin/fgetty
respawn
power_off/
stop_depend=umount
umount/
stop_depend=
cinit-0.3pre16/doc/ancient/porting.to.other.os 0000664 0000000 0000000 00000001757 11260460574 0021333 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Porting cinit to other operating systems,
Nico Schottelius, 2005-06-02
--------------------------------------------------------------------------------
cinit is currently Linux-specific.
It currently does not compile / work on other Unices, because
we use O_ASYNC flag of open(2) which is _not_ a standard.
This way we can act very elegant on incoming connections by our
forks. If somebody finds a at least as elegant solution
to act on incoming data which is more portable, I would
be happy to recieve a diff -u.
Additionally we currently do mount a temporarily filesystem
on /etc/cinit/tmp, which allows us to create a socket, where
nothing is mounted r/w yet.
If a Unix has some kind of tmpfs, this can easily be changed
to the appropriate value in conf/*tmp*.
The O_ASYNC thing will perhaps become a compile option to cinit
(via conf/socket_function for instance), so that using standard
mechanism will be possible.
cinit-0.3pre16/doc/ancient/removing.zombies 0000664 0000000 0000000 00000004426 11260460574 0020761 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Removing Zombies,
Nico Schottelius 2005-06-15 (Last Modified: 2005-06-15)
--------------------------------------------------------------------------------
First of all, the definition of a zombie:
''Defunct ("zombie") process, terminated but not reaped by its parent.''
[Excerpt from ps(1)]
''In the case of a terminated child, performing a wait allows the system to
release the resources associated with the child; if a wait is not performed,
then terminated the child remains in a "zombie" state (see NOTES below).
[...]
NOTES
A child that terminates, but has not been waited for becomes a "zom-
bie". The kernel maintains a minimal set of information about the
zombie process (PID, termination status, resource usage information)
in order to allow the parent to later perform a wait to obtain
information about the child. As long as a zombie is not removed
from the system via a wait, it will consume a slot in the kernel
process table, and if this table fills, it will not be possible to
create further processes. If a parent process terminates, then its
"zombie" children (if any) are adopted by init(8), which automati-
cally performs a wait to remove the zombies.''
[Excerpt from waitpid(2)]
So you can see, that if some process misbehaves and forgets about
its children, we, cinit, will adopt it. In the first versions of
cinit (cinit-0.0.1 <-> cinit-0.0.7) we ignored SIGCHLD. This way
the zombies stayed in the system. Since cinit-0.0.8 we have
sig_chld(), which removes the zombies.
So far so good. Now let's remove this feature. Yes, you heard right.
If cinit does not catch the zombies they will stay in the system.
Yes, that's ugly. And that's how it should be. You should see, which
software is broken and should contact the authors to fix it.
To restore the 'old' behaviour of cinit, change
generic/set_signals.c (ignore SIGCHLD)
Makefile: remove serv/sig_child.c from modules list
cinit in general will keep the behaviour of reaping the vestiges,
which broken software left behind (as it is cleaner for the system to
deallocate unused ressources).
cinit-0.3pre16/doc/ancient/security 0000664 0000000 0000000 00000002515 11260460574 0017330 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
security,
Nico Schottelius 2005-06-13 (Last Modified: 2005-06-14)
--------------------------------------------------------------------------------
A little note about cinit security and how to exploit it:
cinit trusts its socket, /etc/cinit/tmp/coala. If somebody not
authorised has access to it, your system is taken over.
Through this socket anybody with write access can:
- shutdown, restart and power-off the host
- spawn a local unprotected shell
- execute anything as the user cinit runs (most likely root)
Currently cinit does not care very much about the socket permissions.
On my system this creates a socket with srwxr-x-rx permissions, which
isi suitable for normal operation, which will not accept connect()
by others than root.
But you can also loosen the security and allow people from a specfic group
to control your system:
ei # chmod 770 /etc/cinit/tmp/coala
ei # chown root:cinit /etc/cinit/tmp/coala
Now everybody in the cinit group can control your system.
Please think twice before doing that, as you read above, anyone from
the cinit group may start a root shell on the initial console then!
For extra parnoid settings you can do the following:
ei # chmod 700 /etc/cinit/tmp/coala
ei # chown root:root /etc/cinit/tmp/coala
cinit-0.3pre16/doc/ancient/socket.poll_vs_o_async 0000664 0000000 0000000 00000002437 11260460574 0022144 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Socket: poll(2) vs. O_ASYNC,
Nico Schottelius 2005-06-22 (Last Modified: 2005-06-22)
--------------------------------------------------------------------------------
0. General problem
1. O_ASYNC
2. poll(2)
0. General problem
cinit has to react, as soon as there's data on the socket.
1. O_ASYNC
When you open a socket with O_ASYNC (or specify it with fcntl(2)) under
Linux, your process recieves the SIGIO signal from the kernel, as soon
as data is available.
The problem is the handling of signals seems not to be serialised:
The function, which is called on the SIGIO signal (called sigio() here)
calls other functions. Those functions way recieve SIGIO while working,
so the first data stream is not yet finished, though the next
stream is beeing read.
This gives very nice race-conditions, which are very nice to debug.
2. poll(2)
poll(2) is a standard Unix-call (XPG4-UNIX), which waits a specific
timeout (or infinite time if you specify a value less that zero) for
the socket (or the fd in general) to be in a state where
data is available to read (in fact poll can do much more, but we are
not interested only in POLLIN and POLLPRI).
While poll(2) seems to be a very bit slower than sigio it works reliable.
cinit-0.3pre16/doc/ancient/thoughts.closed 0000664 0000000 0000000 00000004156 11260460574 0020601 0 ustar 00root root 0000000 0000000 --------------------------------------------------------------------------------
Closed thoughts,
Nico Schottelius, 2005-05-XX (Last Modified: 2005-06-14)
--------------------------------------------------------------------------------
1. using SIDs (service IDs) to communicated with external processes
This was a very bad idea: The external program could exploit us by
specifying an arbitary big SID (as the SID is simply the index
of our service array).
2. using function pointers to handle messages
Seems like it works fine. We have handlers for each
message (do_*), which are called by client and server.
The function pointer is simply to read or write, dependending
if it is the client or the server. This way we don't need
to rewrite communications parts.
3. Using different storage
First all services were saved in a service array of the size
MAX_SVC. This has been replaced by a double-linked list.
Have a look at serv/list.c.
4. Using sockets for IPC (between cinit forks)
Works very fine, though we have to mount a temporarily fs before.
5. Removing the maximum number of direct dependencies
Is not planned, as it looks like the current number (32, see
conf/max_deps) seems to be much more than needed. And if
one really needs more, simply increase conf/max_deps.
6. Using a directory params with 1,2,3,4 for argv
This would make substituting a single argument easier, but only
if you know which one you have to change. This would add
an additional dirent(), which would not replace the current read(), but
add more open() and close()s. As this does not seem to make live
easier for system administrators, this is not implemented.
If you really like it, hack client/exec_svc.c
7. Using TCP/IP sockets
This would be a very small change in the code, but would allow
to control cinit over network. Since there is no authentication,
this would be highly insecure. On the other hand, cinit
could control the parallel start of many hosts, if they
should become 'one' computer at the end. As this is not needed
currently, it's not implemented.
cinit-0.3pre16/doc/braindumps/ 0000775 0000000 0000000 00000000000 11260460574 0016256 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/braindumps/README.text 0000664 0000000 0000000 00000000162 11260460574 0020120 0 ustar 00root root 0000000 0000000 DO NOT READ CONTENT IN THIS DIRECTORY.
(or at least do not blame me, if you get really confused after reading it)
cinit-0.3pre16/doc/braindumps/circular-dependencies.text 0000664 0000000 0000000 00000002456 11260460574 0023423 0 ustar 00root root 0000000 0000000 What todo with circular dependencies?
a needs b
b needs a
- try to start them?
status a: is_starting
status b: not_set
a wants b, so a service starter for b starts
status a: is_starting, waiting for b
status b: is_starting
service starter for b sees that a is needed
service starter for b sees that a is already being started
service starter for b begins to execute b
status a: is_starting, waiting for b
status b: is_starting, executing "on"
service starter b finishes
status a: is_starting, waiting for b
status b: FAILED | RESPAWN | ONCE
service a continues
b successful: execute on
b failed: register / print that we do not start, because
b failed
-> this would only catch possible deadlocks, if the dependency
tree / status check is done dynamically
-> in case of pre-building the dep-tree this situation must
be concerned:
- start both a and b?
- or stop due to circular dependency?
- Abort on detection of a circular dependency
* possible without pre-calculating?
- perhaps only with direct communication possible?
* pre calculate
- do not start that services?
cinit-0.3pre16/doc/braindumps/converting-debian 0000664 0000000 0000000 00000001140 11260460574 0021573 0 ustar 00root root 0000000 0000000 # If you would like to automatically convert a debian system, you could
# use this script as a start point
#
# how it could look like
#
# create cinit base configuration
# analyse enabled services
level=$(awk -F: '/^id/ { print $2 }' /etc/inittab)
rcdir="/etc/rc${level}.d/"
initdir=/etc/init.d
cd "$rcdir"
for svc in *; do
if [ -d "${debian_map_dir}/${svc}" ]; then
echo "Adding $svc"
else
fi
done
# Also add existing services in /etc/init.d
for ...
if [ ! -e $rcdir/$svc ]
if [ -d "${debian_map_dir}/${svc}" ]; then
echo "Adding, but not enabling"
fi
fi
done
cinit-0.3pre16/doc/braindumps/converting-general 0000664 0000000 0000000 00000000201 11260460574 0021763 0 ustar 00root root 0000000 0000000 kern=$(uname -s)
case "${kern}" in
$known_kern)
$scriptdir/$kern
;;
*)
echo "Unknown system"
;;
esac
cinit-0.3pre16/doc/braindumps/creating-new-configurations 0000664 0000000 0000000 00000000241 11260460574 0023611 0 ustar 00root root 0000000 0000000 scripts/create_baseconfig.sh # create base
scripts/cinit.install.standard.dirs # create common categories
- create fsck
- set hostname
- create getty(s)
cinit-0.3pre16/doc/braindumps/messages.text 0000664 0000000 0000000 00000000243 11260460574 0020772 0 ustar 00root root 0000000 0000000 This document describes the messages used between cinit and its
"clients" (i.e. ccontrol, cservice, cinit.halt, ...):
Signal messages
---------------
As signals
cinit-0.3pre16/doc/braindumps/possible_service_pre_calculation.text 0000664 0000000 0000000 00000001367 11260460574 0025757 0 ustar 00root root 0000000 0000000 - start at
* create a new service entry (if not exists) <---
* reads needs |
- follow dependencies ------------------------
* only if service does not yet exist! |
* read wants |
- follow dependencies ------------------------
* only if service does not yet exist!
* create
- needed by entry in dependencies
- needs entry in service
- wanted by entry in dependencies
- wants entry in service
* record
- (on,off)(,.env,.params)?
- alternatively put that code into service starter
* add services without further needs into a special
"begin" structure to be reused at fireing of the services?
cinit-0.3pre16/doc/braindumps/possible_service_status.text 0000664 0000000 0000000 00000001033 11260460574 0024124 0 ustar 00root root 0000000 0000000
- NOT_SET: this service has not yet been initialized
- RESPAWNING: happily respawning
- RESPAWN_DELAY: waiting delay before restarting
* HINT: using alarm()?
- senseful for single process service watcher
* HINT: using nanosleep()?
- senseful for per service process watcher
- NEED_FAILED
* add a (somehow terminated) list of services that failed?
* use global status to checkout which services failed?
- WANT_FAILED?
* NOT NECESSARY, it is a simple want, we do not need it.
cinit-0.3pre16/doc/braindumps/registering_needs_wants.text 0000664 0000000 0000000 00000001670 11260460574 0024104 0 ustar 00root root 0000000 0000000 Each service has a list of services it
- needs
- is needed by
- wants
- is wanted by
Each entry is a service pointer.
The simplest list could look like this:
service a:
needs:
b f g NULL
So the needs pointer is NULL terminated:
needs = realloc(count_links)
-> how to get the count?
0x02
0x
Better: A double linked list (like the main service list)?
Could look like:
service a:
needs:
*service
*next
*prev
This design could also be used for wants.
On the other hand, we've to register us at the needed/wanted service:
service b:
needed_by:
*service
*next
*prev
So each service needs four pointers:
needs
needed_by
wants
wanted_by
And on each request both lists have to be modified!
Example:
Service "a" adds "b" as needed:
- add "a" needs "b"
- add "b" needed_by "a"
cinit-0.3pre16/doc/braindumps/root-vm-testing 0000664 0000000 0000000 00000000430 11260460574 0021254 0 ustar 00root root 0000000 0000000 [19:33] denkbrett:root% cat uml-mount.sh
SDIR=$(dirname $0)
DDIR=$(dirname $0)/root
sudo mount "$SDIR/Debian-3.0r0.ext2" "$DDIR" -o loop,acl
denkbrett# tar cfj ~nico/projekte/cinit/conf-vm-2007-03-05.tar.bz2 cinit
denkbrett# chown -R nico cinit
denkbrett# chown nico ../sbin
cinit-0.3pre16/doc/braindumps/shutdown.text 0000664 0000000 0000000 00000005044 11260460574 0021042 0 ustar 00root root 0000000 0000000 cinit - braindumps - shutdown
=============================
Nico Schottelius
v0.1, for cinit-0.3, 2007-01-11
:Author Initials: NS
Just some braindumps. Do not read.
Introduction
------------
Shutting down the system.
When?
-----
- reboot
- halt
- power off
- further needed?
How / What?
------------
- Stop services in the correct order
* reuse the service tree / needs / needed_by!
* call off, if existent
* if respawning, send SIGTERM?
- not if off is existent?
* give some variables to off?
- $RESPAWN_PID: if respawning
- send SIGTERM to other apps?
* or put that into special? special/post_svc_shutdown
- call special/{halt,poweroff,reboot}
* no, implemented that directly into cinit!
- implement timely controlled shutdown:
* cinit.shutdown forks (?) itself and waits, then sends a signal
to cinit to initiate the shutdown process
* create mappers for target OS
- Linux
- {free,net,open}bsd
- others may contribute theirself
- also implement poweroff
* kill -TERM 1
- also implement reboot
* kill -HUP 1
- also implement halt
* kill -USR1 1
The implementation
-----------------
x shutdown is initiated
x disable communication (nobody can influence us anymore)
x install special signal handler?
- no. we do not care about zombies anymore, we are gone soon anyway
- simply reset to the default
- begin to shutdown services
* where to start?
* begin shutdown at the end of the tree, viewing/sorting it by the 'needed_by'
-> where to begin sort?
-> worst implementation: scan all services (easy for now)
-> result: list of services, that noone needs :-)
* stop those services and step above
- stop a service, as soon as noone needs it anymore
* check all needed_by links
* more or less the inverted gen_svc_tree
- how to shutdown a service
* if existing, call off
- if off does not exist:
* if respawn: send sigterm to the process
* also implement sigkill at this stage?
- think we can delay it to the end
- otherwise users can use off!
- implement environment for off ($cinit_respawn_pid, $cinit_service_name)
- do *NOT* care about the return value, we can't do anything for it
anymore anyway
- after all services are shutdown, kill all remaining services
* SIGTERM
* wait(defined_time_in_seconds)
* SIGKILL
- call the last command
* to cleanup the system
- umount -a (if needed)
- swapoff (if needed)
- sync (if needed)
- switch off
cinit-0.3pre16/doc/braindumps/sizes 0000664 0000000 0000000 00000000274 11260460574 0017341 0 ustar 00root root 0000000 0000000 sysvinit:
root 1 0.0 0.0 1944 648 ? Ss 02:12 0:00 init [2]
cinit-0.3pre8-glibc-linux:
compiler 25323 0.0 0.0 1564 392 pts/2 S+ 20:22 0:00 ./cinit
cinit-0.3pre16/doc/changes/ 0000775 0000000 0000000 00000000000 11260460574 0015522 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/changes/0.1 0000664 0000000 0000000 00000000057 11260460574 0015745 0 ustar 00root root 0000000 0000000 * Initial release
* Support for adding getties
cinit-0.3pre16/doc/changes/0.3pre15 0000664 0000000 0000000 00000000153 11260460574 0016621 0 ustar 00root root 0000000 0000000 Released: 2009-09-23
Changes:
* Changed child handling (no function calls in sig_child handler anymore)
cinit-0.3pre16/doc/changes/0.3pre16 0000664 0000000 0000000 00000000273 11260460574 0016625 0 ustar 00root root 0000000 0000000 Released: 2009-09-29
Changes:
* Re-integrated cinit-conf
* Merged READE and cinit website
* Cleaned up bin/: Executables can now be installed
* Cleaned up top level directory
cinit-0.3pre16/doc/changes/00-before-0.3pre15 0000664 0000000 0000000 00000010224 11260460574 0020276 0 ustar 00root root 0000000 0000000 cinit-0.3pre14: 2008-03-17
- Added test-suite for cmd
- Added support to shutdown services in cinit and cmd
(without needs and wants)
- Added linux-sysvinit wrapper for shutdown (See
scripts/wrapper/linux-sysvinit/shutdown)
- Rewrote most parts of cmd (to make it more beautiful)
- Changed license to GPL 3.0
cinit-0.3pre13: 2007-09-26
- Added -V (get cmd version), -h (help), -p (get pid) to cmd
- Cleaned up namemsage in msgq.h
- Added global service lock
- Splitted of svc.h to svc.h, svc-intern.h and svc-messages.h
- Prepared logic splitoff from cinit_ipc_listen()
- Fixed bug: fork() has a general race condition
(see src/test/fork-latency.c) through use of global lock
cinit-0.3pre12: 2007-09-06
- Added DESTDIR support
- Added support to get service status via cmd: cmd -s
* also supports relative paths to CINIT_DIR ("/etc/cinit")
- Fixed git clone problem: hooks are needed for dumb git
- Fixed bug: We did not wait for services to finsh, which we depend on being
ran once.
cinit-0.3pre11: 2007-09-01
- Added basic communication:
* client binary "cmd" with argument -v returns cinit-version
- Updated {halt,reboot,poweroff}.kill
cinit-0.3pre10:
- Fixed make install target
- Added halt.kill, poweroff.kill and reboot.kill (including manpages!)
- Fixed invalid comparision in core/cinit.c
- Be verbose: Print what we execute
- Updated documentation
cinit-0.3pre9: 2007-05-15
- Implemented sleeping before respawn (static delay)
- Report broken links on execution, but ignore empty services
- Cleaned up message queue error reporting
cinit-0.3pre8: 2007-04-06
- Updated and merged documentation: Codingstyle and Codingguide
- Cleaned sigaction-code (fixes segfault on glibc)
- Cleaned object listings
- Added notifications at shutdown
- Fixed status check
cinit-0.3pre7: 2007-02-17
- Many code cleanups
- Fixed glibc problem with sigaction (for details view src/core/set_signals.c)
- Added general shutdown support (will *NOT* yet stop services,
but still stop your system)
cinit-0.3pre6:
- Many code cleanups
- Added user documentation and cleaned up documentation in general
cinit-0.3pre5:
- Finished new SIGCHLD handler
- First cleanups for real release.
- This version is the first 0.3pre version that can handle respawn!
cinit-0.3pre4:
- Re-implemented execution of services.
- This version is the first 0.3pre version that COULD bootup your system!
cinit-0.3pre3:
- Finished execution all services via the reversed service tree.
cinit-0.3pre2:
- Finished generation of the dependency tree.
cinit-0.3pre1:
- cinit should now compile on mostly all unices
- introduced much new code
- THIS IS A DEVELOPER RELEASE, NOT USABLE IN PRODUCTION ENVIRONMENTS.
cinit-0.2.1: (Bugfix release)
- Fixed problem in contrib+tools/Makefile when installing
- added many new scripts to convert sys-v-init, which are still early beta
(see bin/cinit.merge.sysvinit-debian-sid)
cinit-0.2:
- Much more verbose error reporting
- You can now also disable 'once ran' services,
- You can restart services with csevice -r
- Online speech in German is available
- C_DELAY support - variable delay for sending SIGKILL after SIGTERM
- First /etc/csys configuration example (wasserstoff) is available
- a Mailing list was created
- Added tools to analyze cinit configuration
(cinit-vis.pl, cinit.graph.text.c)
- Added tools to import and export configuration to XML
(make.cconfig.from.xml.rb,cconfig.graph.xml.rb)
- Removed unecessary signalling
- Added many helper scripts to install services (cinit.install.service*)
- Fixed many small bugs in old helper scripts (cinit.add.getty, cinit.get-conf, ...)
- Added ccontrol, which allows to control cinit
- Added update (-u) via ccontrol
- Stripped cservice, which now "only" controls services
- Removed swapoff from cinit code, should be handled by off
- Much better error and processing descriptions
- A bit more verbose reporting
- Restructured run_svc, now with better error detection
- Removed Kernel panic, when halting system
cinit-0.3pre16/doc/devel/ 0000775 0000000 0000000 00000000000 11260460574 0015211 5 ustar 00root root 0000000 0000000 cinit-0.3pre16/doc/devel/Doxyfile 0000664 0000000 0000000 00000026101 11260460574 0016717 0 ustar 00root root 0000000 0000000 # Doxyfile 1.5.6
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = cinit
PROJECT_NUMBER = 0.3pre15
OUTPUT_DIRECTORY = /home/user/nico/oeffentlich/computer/projekte/cinit/doxygen
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/user/nico/oeffentlich/computer/projekte/cinit/cinit/src
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 3
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/user/nico/oeffentlich/computer/projekte/cinit/cinit/src
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.f90 \
*.f \
*.vhd \
*.vhdl \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.PY \
*.F90 \
*.F \
*.VHD \
*.VHDL
RECURSIVE = YES
EXCLUDE = /home/user/nico/oeffentlich/computer/projekte/cinit/cinit/src/ancient/ \
/home/user/nico/oeffentlich/computer/projekte/cinit/cinit/src/test/
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NONE
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = YES
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
cinit-0.3pre16/doc/devel/README.text 0000664 0000000 0000000 00000000617 11260460574 0017060 0 ustar 00root root 0000000 0000000 cinit/doc/devel
===============
Nico Schottelius
0.1, Initial Version from 2006-07-09
:Author Initials: NS
This directory contains cinit development documents.
Introduction
------------
This file describes the related documents in the current directory.
Who should read those documents?
--------------------------------
(cinit-)developers.
Content
-------
cinit-0.3pre16/doc/devel/cinit-0.4.text 0000664 0000000 0000000 00000005243 11260460574 0017530 0 ustar 00root root 0000000 0000000 cinit 0.4 - Redesign of cinit
============================================
Nico Schottelius
0.4.0, for cinit 0.4, Initial Version from 2006-03-11
:Author Initials: NS
cinit 0.2 ran fine and the general project of developing a
parallel executing init system is finished.
With cinit 0.4 there are new aims to reach.
Introduction
------------
. AIMS
- portability: no Linux-dependency anymore
- cleaner signal handling
- better documentation so more people can use it
Current problems
----------------
Temporary filesystem and socket problematic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The mount(2) system call is os-specific.
The temporary fs is os-specific.
Signal handlers are not clean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Race conditions when multiple signals arrive
Reboot code is os specific
~~~~~~~~~~~~~~~~~~~~~~~~~~
serv/sig_reboot.c contains umount, remount hard coded.
Solutions
---------
Temporary filesystem and socket problematic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove
- the mount call
- do not create an initial socket
Wait until we recieve a signal, then we create a socket
under the configured socket directory (see `conf/sockdir`).
Signal handlers are not clean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reboot code is os specific
~~~~~~~~~~~~~~~~~~~~~~~~~~
Misc
~~~~
- Configuration
/etc/cinit/config/
init -> link to initial service
pre_boot
pre_boot_args
post_boot
post_boot_args
/etc/cinit/services/
/etc/cinit/profiles/
links to the starting services
cinit - Internals
=================
Nico Schottelius
0.1 for cinit-0.3, Initial version: So Feb 19 10:25:46 CET 2006
:Author Initials: NS
Introduction
------------
This document describes the internals of cinit. It is thought
to be read by developers.
Child handler code in cinit-0.3
-------------------------------
In cinit versions <= cinit-0.2.1 the respawning services where
handled by an extra child handler, which was a fork of cinit. This
had some problems:
- We allocated more memory than necessary, unecessary parts of
cinit were copied
- The SIG_CHILD-handler was not written very clean, in some versions
it was completly missing.
. So in `cinit-0.3` we changed it the following way:
- no extra child handlers
- handle everything in the SIG_CHILD handling function
- when sig_child is recieved do:
- check against respawn list
- if it is a respawning service, [do the following in a seperate fork?]
check whether it successfully stoped
- if yes: restart immediatly
- if no: sleep $sleep_time and then restart
cinit-0.3pre16/doc/devel/cinit-status-translation.dia 0000664 0000000 0000000 00000011742 11260460574 0022660 0 ustar 00root root 0000000 0000000 ]msF_RUQyr-'ަvvNGD.!˺ں~P;Aa%aH5Ds~?t5i6{sF>$q6Igo~/o_y2^|b6WonO_?<<<.M{4O^_<Ư
볷L"wӫ"U<:gg,|o~bg˼^ΞkUĿ46\./{{SCR$lfǕn*ׇNWW0[kڲƏIg]6?>5A<.үWKˮ'`>ls8[rX*uY!ڻi $ !nvqZg{gd E)1a,YCX٥3Bwb0O8̋
ͧqa~Y+w7;|=zufŶķm6wجyK84ɗ_&Io~%cTST\]ujNzn3#E\n?h2-yUqگu
;7K
Ke0(.s.,\,⪳G|,Ã `2"q1H6v!m5IE'rM՞,m
mv7N;6^|r >vcX|I,Vaq,!o-;:\P!̩qҰ}j0OǛIvu0wCB.3Z3ւ`0^v|IFRL
X]gY^\Z)/;G}[ʌ?+v;wxȞaExE yu}t+<jf.}oWsi/(fڬI
."8;xOr6+/=Xn٤d翾96ϒtd3Xá/l$4XFňbIAkͬ-ڌk-~MtlaZ]!T,\|bp-!2j^P$V
+D"*I9'.?"7͠ZM@ݐә9]KPn|Kxn!ִJ(|MX8.:;1fL!8q~:.~=eaCE[(xVQP"Fll6N\AQuio `Aq0v(Af
({9&Dr"R̦% O81w⤛rHs>◥{c2q[{7*AbHJ};G!Y%zJ(::Ru^Bŷdld2{ɎtI=_=V5PP>M4+*6OzC]0TRVֺ"
MEuE-*۠<HuֱJЊMPpPls~eٞL@1U9oS|{H=Wf/)VuEHU<'nԁ[̞laxD0
[@iPP$2>V&0G3l!l]xn8#;",ή)MɵZda ^pJSz\F.5Nlvmޚ;)EqxXWbfQb؈8Z!%ka~Ԋ0e=x[˿?t)Ev 0s+HčGD$)ZG u+㮵=֍SCp#\ﲐ;ހzBNjey[kW80XfA{1Dlu2z2c0֔^thfd`TmW5O0!e͙="HrH_
.5^Fj&H,+Ƀ/Ѡ:Lǎz옢jHys.;FK6J@֘irGzeWNJC.BH@7Z[&q_F:Ǡ_D1:8ؐu9L-H12s7c eK0b? ` -#;+ A ڪ JQcG
mҚCGsTJo@9L#>2YԜYQ3#_BX~kA+FL0/K8sY9Y9jp
w|
07H:)Pp@CST$Ҭji%n2c)r[㦻BgaR~u%
0K% kSM!'nځ[Z:
?9