pax_global_header 0000666 0000000 0000000 00000000064 11303432267 0014513 g ustar 00root root 0000000 0000000 52 comment=fc6cae7e91f946c2059cdc3ef305229cfee7feb5
cinit-0.3pre19/ 0000775 0000000 0000000 00000000000 11303432267 0013344 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/ 0000664 0000000 0000000 00000000262 11303432267 0013406 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.3pre19/.ditz-config 0000664 0000000 0000000 00000000162 11303432267 0015561 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.3pre19/.ditz-plugins 0000664 0000000 0000000 00000000006 11303432267 0015772 0 ustar 00root root 0000000 0000000 - git
cinit-0.3pre19/.gitignore 0000664 0000000 0000000 00000000520 11303432267 0015331 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.3pre19/Makefile 0000664 0000000 0000000 00000007357 11303432267 0015020 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=bin 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;
# Fix installation of conf/, check that bin/ is working and then
# release
install:
.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
################################################################################
# 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
### User Mode Linux / DIRECTORY
UML_DIR_OS_DEBIAN=lenny
UML_ROOT_DIR=~/cinit/vm/uml/$(UML_DIR_OS_DEBIAN)
UML_ROOT_DIR_ABS=$(shell cd $(UML_ROOT_DIR) && pwd -P)
CONFDIR=etc/cinit/
uml-install-debian:
mkdir -p $(UML_ROOT_DIR)
sudo /usr/sbin/debootstrap $(UML_DIR_OS_DEBIAN) $(UML_ROOT_DIR)
me=$$(whoami); sudo chown -R $$me $(UML_ROOT_DIR)
# only install binaries, no need to test documentation
uml-install-config:
rsync -av --delete ./$(CONFDIR) $(UML_ROOT_DIR)/$(CONFDIR)
uml-install-cinit:
dir=$$(cd $(UML_ROOT_DIR); pwd -P); make -C src DESTDIR=$$dir install
uml-dir-start-cinit: uml-install-config
dir=$$(cd $(UML_ROOT_DIR); pwd -P); linux root=/dev/root rootflags=$$dir rootfstype=hostfs init=/sbin/cinit
uml-dir-start-plain:
./scripts/vm/uml-dir-start-plain.sh $(UML_ROOT_DIR_ABS)
### User Mode Linux / IMAGE
UML_IMG_FILE=~/cinit/vm/uml/Debian-3.0r0.ext2
uml-img-start-cinit:
./scripts/vm/uml-img-start-cinit.sh $(UML_IMG_FILE)
uml-img-start-plain:
./scripts/vm/uml-img-start-plain.sh $(UML_IMG_FILE)
# 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.107
UBUNTUCONF=./etc/cinit-ubuntu
UBUNTUINSTALL="cd cinit && make clean && sudo make install"
UBUNTUTEST="sudo reboot"
ubuntu-sync:
rsync -av --delete ./ $(UBUNTUHOST):cinit
ubuntu-install: ubuntu-sync
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.3pre19/README 0000664 0000000 0000000 00000023061 11303432267 0014226 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.3pre19.tar.bz2|archives/cinit-0.3pre19.tar.bz2]]
([browse source](browse_source/cinit-0.3pre19/))
[[changes|browse_source/cinit-0.3pre19/doc/changes/0.3pre19]]
* [[cinit-0.3pre18.tar.bz2|archives/cinit-0.3pre18.tar.bz2]]
([browse source](browse_source/cinit-0.3pre18/))
[[changes|browse_source/cinit-0.3pre18/doc/changes/0.3pre18]]
* [[cinit-0.3pre17.tar.bz2|archives/cinit-0.3pre17.tar.bz2]]
([browse source](browse_source/cinit-0.3pre17/))
[[changes|browse_source/cinit-0.3pre17/doc/changes/0.3pre17]]
* [[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.3pre19/bin/ 0000775 0000000 0000000 00000000000 11303432267 0014114 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/bin/Makefile 0000664 0000000 0000000 00000001715 11303432267 0015560 0 ustar 00root root 0000000 0000000 #
# 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.
#
#
# Static vars
#
SBIN=$(shell ls cinit-cmd* cinit-helper*)
BIN=$(shell ls cinit-conf*)
#
# Targets
#
all clean dist distclean:
install:
install ${SBIN} ${DESTDIR}/sbin
install ${BIN} ${DESTDIR}/bin
cinit-0.3pre19/bin/cinit-cmd.reboot 0000775 0000000 0000000 00000000272 11303432267 0017203 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.3pre19/bin/cinit-cmd.shutdown 0000775 0000000 0000000 00000001130 11303432267 0017556 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.3pre19/bin/cinit-conf.config.shell 0000775 0000000 0000000 00000001726 11303432267 0020453 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Create a minimal "usable" config
#
set -e
. "$(dirname $0)/cinit-conf.read-conf"
cinit-conf.svc.init
cinit-conf.svc.categories
cinit-conf.svc.mount.proc
cinit-conf.svc.mount.root
cinit-conf.svc.shell
cinit-conf.svc-boot-enable "local-services/shell"
cinit-0.3pre19/bin/cinit-conf.dump.as.c.header 0000775 0000000 0000000 00000003316 11303432267 0021114 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2005-2009 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 .
#
#
# Dump configuration usable as a c-header file.
#
################################################################################
# standard vars stolen from cconf
set -e
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set +e
CONFS="$(cinit-conf.get-confdir)"
echo "/* Warning: Autogenerated by $0, do not edit. */"
for conf in "${CONFS}/"*; do
NAME="$(basename ${conf} | tr a-z A-Z)"
value=$(head -n 1 ${conf})
# check if numeric: no quotes needed
is_numeric=$(echo $value | awk '/^((0[xX])[0-9a-fA-F]+)|([0-9]+)$/ { print }')
is_string="$(echo $value | grep '^"')"
#
# Check for quote type
#
if [ ! "$is_numeric" -a ! "$is_string" ]; then
one_char=$(echo -n $value | wc -c)
if [ "$one_char" -eq 1 ]; then
value="'$value'"
else
# is a string
value="\"$value\""
fi
fi
echo "#define" "$NAME" "$value"
done
cinit-0.3pre19/bin/cinit-conf.get-confdir 0000775 0000000 0000000 00000003121 11303432267 0020270 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2005-2009 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)
#
set -x
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
# try environment first
if [ "$CINIT_CONF_CONF_DIR" ]; then
CONFDIR="$CINIT_CONF_CONF_DIR"
elif [ -d "${__abs_mydir}/../conf/" ]; then
CONFDIR="${__abs_mydir}/../conf/"
elif [ -d "${HOME}/.cinit-conf/" ]; then
CONFDIR="${HOME}/.cinit-conf/"
elif [ -d "/etc/cinit/build-conf/" ]; then
CONFDIR="/etc/cinit/build-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.3pre19/bin/cinit-conf.migrate.archlinux 0000775 0000000 0000000 00000034466 11303432267 0021533 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Try to migrate archlinux to cinit
#
set -e
################################################################################
#
# Base layout, same for every OS
#
cinit-conf.svc.init
cinit-conf.svc.categories
# Arch Linux has a minimal /etc/inittab, nice to migrate!
# Arch only starts /etc/rc.sysinit. Even nicer to migrate!
# These are covered already by our existing scripts
#/bin/mount -n -t tmpfs none /dev -o mode=0755
#/bin/mount -n -t proc none /proc
#/bin/mount -n -t sysfs none /sys
# Copy static device nodes to /dev
# /bin/cp -a /lib/udev/devices/* /dev/
cinit-conf.svc.udev.copy-static
# start up our mini logger until syslog takes over
/sbin/minilogd
# anything more serious than KERN_WARNING goes to the console
# 'verbose' cmdline parameter enables more messages
if /bin/grep -q " verbose" /proc/cmdline; then
/bin/dmesg -n 8
else
/bin/dmesg -n 3
fi
# enable rtc access
/sbin/modprobe rtc-cmos >/dev/null 2>&1
RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null)
RTC_MAJOR="${RTC_MAJOR%% *}"
if [ -n "$RTC_MAJOR" ]; then
/bin/mknod /dev/rtc0 c $RTC_MAJOR 0
/bin/ln -s /dev/rtc0 /dev/rtc
fi
HWCLOCK_PARAMS="--hctosys"
if [ "$HARDWARECLOCK" = "UTC" ]; then
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
elif [ "$HARDWARECLOCK" = "localtime" ]; then
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
else
HWCLOCK_PARAMS=""
fi
# Set clock early to fix some bugs with filesystem checks
# Clock is set again later to match rc.conf
if [ -n "$HWCLOCK_PARAMS" -a -f /etc/localtime ]; then
/sbin/hwclock $HWCLOCK_PARAMS --noadjfile
fi
echo > /proc/sys/kernel/hotplug
if [ -x /sbin/udevadm ]; then
stat_busy "Starting UDev Daemon"
/sbin/udevd --daemon
stat_done
else
# Static /dev, our last resort
status "Using static /dev filesystem" true
fi
# Trigger udev uevents
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
stat_busy "Triggering UDev uevents"
/sbin/udevadm trigger
stat_done
fi
# Load modules from the MODULES array defined in rc.conf
if ! [ "$load_modules" = "off" ]; then
if [ -f /proc/modules ]; then
stat_busy "Loading Modules"
for mod in "${MODULES[@]}"; do
if [ "$mod" = "${mod#!}" ]; then
/sbin/modprobe $mod
fi
done
stat_done
fi
if [ -d /proc/acpi ]; then
stat_busy "Loading standard ACPI modules"
ACPI_MODULES="ac battery button fan processor thermal"
k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')"
j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')"
#add disabled MODULES (!) to blacklist - much requested feature
for m in ${j}; do
[ "$m" != "${m#!}" ] && k="${k} ${m#!}"
done
# add disablemodules= from commandline to blacklist
k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')"
for n in ${ACPI_MODULES}; do
if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
/sbin/modprobe $n > /dev/null 2>&1
fi
done
stat_done
fi
fi
# Wait for udev uevents
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
stat_busy "Waiting for UDev uevents to be processed"
udevstart="$(/bin/date +%s%0N)"
/sbin/udevadm settle
stat_done
udevend="$(/bin/date +%s%0N)"
printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms"
fi
# bring up the loopback interface
if [ -d /sys/class/net/lo ]; then
stat_busy "Bringing up loopback interface"
/sbin/ifconfig lo 127.0.0.1 up
if [ $? -ne 0 ]; then
stat_fail
else
stat_done
fi
fi
# If necessary, find md devices and manually assemble RAID arrays
if [ -f /etc/mdadm.conf -a "$(/bin/grep ^ARRAY /etc/mdadm.conf 2>/dev/null)" ]; then
# udev won't create these md nodes, so we do it ourselves
for dev in $(/bin/grep ^ARRAY /etc/mdadm.conf | /bin/awk '{print $2}'); do
path=$(echo $dev | /bin/sed 's|/[^/]*$||')
node=$(echo $dev | /bin/sed "s|^$path/||")
minor=$(echo $node | /bin/sed 's|^[^0-9]*||')
[ ! -e $path/$node ] && /bin/mknod $path/$node b 9 $minor
done
status "Activating RAID arrays" /sbin/mdadm --assemble --scan
fi
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
if [ -x /sbin/lvm -a -d /sys/block ]; then
# Kernel 2.6.x, LVM2 groups
/sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Activating LVM2 groups"
/sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
/sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
if [ $? -ne 0 ]; then
stat_fail
else
stat_done
fi
fi
fi
# Set up non-root encrypted partition mappings
if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then
/sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Unlocking encrypted volumes:"
csfailed=0
CS=/sbin/cryptsetup.static
do_crypt() {
if [ $# -ge 3 ]; then
cname="$1"
csrc="$2"
cpass="$3"
shift 3
copts="$*"
stat_append "${cname}.."
# For some fun reason, the parameter ordering varies for
# LUKS and non-LUKS devices. Joy.
if [ "${cpass}" = "SWAP" ]; then
# This is DANGEROUS! The only possible safety check
# is to not proceed in case we find a LUKS device
# This may cause dataloss if it is not used carefully
if $CS isLuks $csrc 2>/dev/null; then
false
else
$CS -d /dev/urandom $copts create $cname $csrc >/dev/null
if [ $? -eq 0 ]; then
stat_append "creating swapspace.."
/sbin/mkswap -f -L $cname /dev/mapper/$cname >/dev/null
fi
fi
elif [ "${cpass}" = "ASK" ]; then
printf "\nOpening '${cname}' volume:\n"
if $CS isLuks $csrc 2>/dev/null; then
$CS $copts luksOpen $csrc $cname < /dev/console
else
$CS $copts create $cname $csrc < /dev/console
fi
elif [ "${cpass:0:1}" != "/" ]; then
if $CS isLuks $csrc 2>/dev/null; then
echo "$cpass" | $CS $copts luksOpen $csrc $cname >/dev/null
else
echo "$cpass" | $CS $copts create $cname $csrc >/dev/null
fi
else
if $CS isLuks $csrc 2>/dev/null; then
$CS -d $cpass $copts luksOpen $csrc $cname >/dev/null
else
$CS -d $cpass $copts create $cname $csrc >/dev/null
fi
fi
if [ $? -ne 0 ]; then
csfailed=1
stat_append "failed "
else
stat_append "ok "
fi
fi
}
while read line; do
eval do_crypt "$line"
done /dev/null
/sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
fi
fi
fi
status "Mounting Root Read-only" /bin/mount -n -o remount,ro /
FORCEFSCK=
[ -f /forcefsck ] && FORCEFSCK="-- -f"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs"
fsck_reboot() {
echo "Automatic reboot in progress..."
/bin/umount -a
/bin/mount -n -o remount,ro /
/sbin/reboot -f
exit 0
}
if [ -x /sbin/fsck ]; then
stat_busy "Checking Filesystems"
FSCK_OUT=/dev/stdout
FSCK_ERR=/dev/null
/sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
fsckret=$?
if [ ${fsckret} -gt 1 ]; then
stat_fail
fi
if [ $((${fsckret}&2)) -eq 2 ]; then
echo
echo "********************** REBOOT REQUIRED *********************"
echo "* *"
echo "* The system will be rebooted automatically in 15 seconds. *"
echo "* *"
echo "************************************************************"
echo
/bin/sleep 15
fsck_reboot
fi
if [ ${fsckret} -gt 1 -a ${fsckret} -ne 32 ]; then
echo
echo "***************** FILESYSTEM CHECK FAILED ****************"
echo "* *"
echo "* Please repair manually and reboot. Note that the root *"
echo "* file system is currently mounted read-only. To remount *"
echo "* it read-write type: mount -n -o remount,rw / *"
echo "* When you exit the maintenance shell the system will *"
echo "* reboot automatically. *"
echo "* *"
echo "************************************************************"
echo
/sbin/sulogin -p
fsck_reboot
fi
stat_done
fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
/bin/rm -f /etc/mtab*
# make sure / gets written to /etc/mtab
/bin/mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
if [ -e /proc/mounts ]; then
/bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
fi
# now mount all the local filesystems
/bin/mount -a -t $NETFS -O no_netdev
stat_done
status "Activating Swap" /sbin/swapon -a
stat_busy "Configuring System Clock"
if [ ! -f /var/lib/hwclock/adjtime ]; then
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
fi
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
/bin/rm -f /etc/localtime
/bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
fi
if [ -n "$HWCLOCK_PARAMS" ]; then
/sbin/hwclock --adjust #Adjust for system drift
/sbin/hwclock $HWCLOCK_PARAMS
fi
stat_done
RANDOM_SEED=/var/lib/misc/random-seed
if [ -f $RANDOM_SEED ]; then
stat_busy "Initializing Random Seed"
/bin/cat $RANDOM_SEED > /dev/urandom
stat_done
fi
stat_busy "Removing Leftover Files"
/bin/rm -f /etc/nologin &>/dev/null
/bin/rm -f /etc/shutdownpid &>/dev/null
/bin/rm -f /var/lock/* &>/dev/null
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
/bin/rm -f /forcefsck &>/dev/null
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
: > /var/run/utmp
/bin/chmod 0664 /var/run/utmp
# Keep {x,k,g}dm happy with xorg
/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
stat_done
#status "Updating Shared Library Links" /sbin/ldconfig
if [ "$HOSTNAME" != "" ]; then
status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
fi
# Set the NIS domain name, if necessary
[ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
if [ "$NISDOMAINNAME" != "" ]; then
status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
fi
status "Updating Module Dependencies" /sbin/depmod -A
# Flush old locale settings
: >/etc/profile.d/locale.sh
/bin/chmod 755 /etc/profile.d/locale.sh
# Set user defined locale
[ -z "$LOCALE" ] && LOCALE="en_US"
stat_busy "Setting Locale: $LOCALE"
echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
stat_done
# Adding persistent network/cdrom generated rules
if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
stat_busy "Adding persistent cdrom udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
stat_done
fi
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
fi
/bin/dmesg >| /var/log/dmesg.log
# End of file
# vim: set ts=2 noet:
# The part before here is migrated, the rest came from the template
exit 0
# /etc/event.d/rc-default guesses 2, so we also assume it's 2.
default_runlevel=2
################################################################################
# Sys-v-init on Linux and variants (=upstart) execute rcS before rc2.
#
# Upstart on jaunty is starts /etc/event.d/rc-default, which
# starts /etc/event.d/rcS which starts /etc/init.d/rcS which
# starts /etc/init.d/rc S which starts the shell scripts in
# /etc/rcS.d/ (does not sound very efficient to me).
# cinit@cinit-desktop:/etc/event.d$ ls -1 /etc/rcS.d/ | sed 's/^/# /'
# README: not migrated:
# S01mountkernfs.sh: sysfs, proc; ignored spufs, /var/run, /lib/init: migrated
cinit-conf.svc.mount.proc
cinit-conf.svc.mount.sys
# S01readahead: ignored
# S02hostname.sh: migrated
cinit-conf.svc.hostname.linux $(hostname)
# S06keyboard-setup: migrated
cinit-conf.svc.keymap.linux
# S07linux-restricted-modules-common: ignored
# S10udev: migrated
cinit-conf.svc.mount.udev
cinit-conf.svc.local-tuning.udev.ubuntu
# S11mountdevsubfs.sh: migrated!
cinit-conf.svc.mount.dev-shm
cinit-conf.svc.mount.dev-pts
# S13pcmciautils: ignored
# S15module-init-tools: not migrated: I think modules should be put into services
# S17procps: migrated
cinit-conf.svc.sysctl.linux
# S20checkroot.sh: migrated for /
cinit-conf.svc.mount.root
# S22mtab.sh: manually create mtab; migrated (though a little bit hacky)
cinit-conf.svc.mtab-clean.linux
# S25brltty: ignored: don't have a braille terminal here to test it
# S30checkfs.sh: ignored, not yet supported, have to find other mountpoints first
# S35mountall.sh: ignored: same as S30checkfs.sh
# S36mountall-bootclean.sh: migrated
# /var/run is not a tempdir, do not clean it
cinit-conf.svc.tmp.clean "/tmp" "/var/tmp" "/var/lock"
cinit-conf.svc.tmp.create "/tmp" "/var/tmp" "/var/lock"
# S37apparmor: ignored
# S37mountoverflowtmp: ignored, that's a boottime bugfix
# S37udev-finish: no need to migrate, if having correct dependencies.
# S39readahead-desktop: ignored, as it seems not to work here
# S39ufw: disabled here by default -> skip
# S40networking
cinit-conf.svc.network.debian
# S45mountnfs.sh: migrated, only much smaller
cinit-conf.svc.mount.nfs
# S46mountnfs-bootclean.sh: already done (cinit-conf.svc.tmp.*)
# S49console-setup: migrated
cinit-conf.svc.setup.console.linux
# S55bootmisc.sh
# S55urandom
# S70screen-cleanup
# S70x11-common
cat << eof
Ubuntu upstart migration completed.
WARNING:
This is a "lazy" migration: Ubuntu init scripts are migrated
similar, but not identical. Some services have been skipped, because
they are not necessary with cinit or in general.
Check /etc/cinit before rebooting with cinit!
KNOWN BUGS:
S20checkroot.sh: Only / is being fscked, other partitions are ignored.
HINT:
Make sure init=/sbin/cinit is set in your bootloader.
eof
cinit-0.3pre19/bin/cinit-conf.migrate.upstart.ubuntu.jaunty 0000775 0000000 0000000 00000011343 11303432267 0024057 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Try to migrate upstarts config from ubuntu jaunty to cinit config
#
set -e
# /etc/event.d/rc-default guesses 2, so we also assume it's 2.
default_runlevel=2
################################################################################
#
# Base layout, same for every OS
#
cinit-conf.svc.init
cinit-conf.svc.categories
cinit-conf.svc.init.dependencies
################################################################################
# Sys-v-init on Linux and variants (=upstart) execute rcS before rc2.
#
# Upstart on jaunty is starts /etc/event.d/rc-default, which
# starts /etc/event.d/rcS which starts /etc/init.d/rcS which
# starts /etc/init.d/rc S which starts the shell scripts in
# /etc/rcS.d/ (does not sound very efficient to me).
# cinit@cinit-desktop:/etc/event.d$ ls -1 /etc/rcS.d/ | sed 's/^/# /'
# README: not migrated:
# S01mountkernfs.sh: sysfs, proc; ignored spufs, /var/run, /lib/init: migrated
cinit-conf.svc.mount.proc
cinit-conf.svc.mount.sys
# S01readahead: ignored
# S02hostname.sh: migrated
cinit-conf.svc.hostname.linux $(hostname)
# S06keyboard-setup: migrated
cinit-conf.svc.keymap.linux
# S07linux-restricted-modules-common: ignored
# S10udev: migrated
cinit-conf.svc.mount.udev
cinit-conf.svc.local-tuning.udev.ubuntu
# S11mountdevsubfs.sh: migrated!
cinit-conf.svc.mount.dev-shm
cinit-conf.svc.mount.dev-pts
# S13pcmciautils: ignored
# S15module-init-tools: not migrated: I think modules should be put into services
# S17procps: migrated
cinit-conf.svc.sysctl.linux
# S20checkroot.sh: migrated for /
cinit-conf.svc.mount.root
# S22mtab.sh: manually create mtab; migrated (though a little bit hacky)
cinit-conf.svc.mtab-clean.linux
# S25brltty: ignored: don't have a braille terminal here to test it
# S30checkfs.sh: ignored, not yet supported, have to find other mountpoints first
# S35mountall.sh: ignored: same as S30checkfs.sh
# S36mountall-bootclean.sh: migrated
# /var/run is not a tempdir, do not clean it
cinit-conf.svc.tmp.clean "/tmp" "/var/tmp" "/var/lock"
cinit-conf.svc.tmp.create "/tmp" "/var/tmp" "/var/lock"
# S37apparmor: ignored
# S37mountoverflowtmp: ignored, that's a boottime bugfix
# S37udev-finish: no need to migrate, if having correct dependencies.
# S39readahead-desktop: ignored, as it seems not to work here
# S39ufw: disabled here by default -> skip
# S40networking
cinit-conf.svc.network.debian
# S45mountnfs.sh: migrated, only much smaller
cinit-conf.svc.mount.nfs
# S46mountnfs-bootclean.sh: already done (cinit-conf.svc.tmp.*)
# S49console-setup: migrated
cinit-conf.svc.setup.console.linux
# S55bootmisc.sh: skipped
# S55urandom: skipped, should be done later!
# S70screen-cleanup: skipped, unclean, should be done later!
# S70x11-common: also skipped, want to finish this script.
################################################################################
#
# /etc/rc2.d/ migration
#
# cinit@cinit-desktop:/etc/rc2.d$ ls -1
# README
# S01policykit: ignored
# S10acpid: migrated (without module loading)
cinit-conf.svc.acpid
# Skipping the following ones currently
# S10sysklogd
# S11klogd
# S12dbus
# S16ssh
cinit-conf.svc.sshd
# S20apport
# S20hotkey-setup
# S24hal
# S25bluetooth
# S30gdm
# S50NetworkManager
# S50avahi-daemon
# S50cups
# S50pulseaudio
# S50rsync
# S50saned
# S50system-tools-backends
# S70bootlogs.sh
# S70dns-clean
# S70pppd-dns
# S89anacron
# S89atd
# S89cron
# S90binfmt-support
# S98usplash
# S99acpi-support
# S99laptop-mode
# S99ondemand
# S99rc.local
# S99rmnologin
# S99stop-readahead
################################################################################
#
# Enable local login with six getties
#
cinit-conf.svc.agetty 6
cat << eof
Ubuntu upstart migration completed.
WARNING:
This is a "lazy" migration: Ubuntu init scripts are migrated
similar, but not identical. Some services have been skipped, because
they are not necessary with cinit or in general.
Check /etc/cinit before rebooting with cinit!
KNOWN BUGS:
S20checkroot.sh: Only / is being fscked, other partitions are ignored.
HINT:
Make sure init=/sbin/cinit is set in your bootloader.
eof
cinit-0.3pre19/bin/cinit-conf.read-conf 0000775 0000000 0000000 00000004040 11303432267 0017726 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:="$(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}"}
# T_*: theorethic (not real, usable for linking)
: ${T_CINIT_DIR:="${CINIT_DIR}"}
: ${T_CINITCONF_DIR:="${T_CINIT_DIR}/${CINITCONFDIR}"}
: ${T_SVC_DIR:="${T_CINIT_DIR}/${SVCDIR}"}
cinit-0.3pre19/bin/cinit-conf.svc-boot-enable 0000775 0000000 0000000 00000002457 11303432267 0021062 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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-conf. If not, see .
#
# Enable a service at boottime: add it to init wants list
#
set -e
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
. "${__abs_mydir}/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "${__myname}: services... "
echo ""
echo " I add the services to init, so they will be started at boot."
echo ""
exit 1
fi
SVC="init"
cinit-conf.svc.dependency.add "${SVC}" "wants" "$@"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc-create.template 0000775 0000000 0000000 00000003277 11303432267 0021751 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Create an almost empty service
#
set -e
# init variables
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "`basename $0`: service-name(s)"
echo " I create templates for your services"
exit 1
fi
for svc in $@; do
INSTDIR="${R_SVC_DIR}/${svc}"
if [ -e "$INSTDIR" ]; then
echo "$svc already exists, skipping."
continue
fi
echo -n "Creating template $svc ..."
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${INSTDIR}"
# needs
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${INSTDIR}/${C_NEEDS}"
# wants
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${INSTDIR}/${C_WANTS}"
# README
cat << eof > "${INSTDIR}/README"
This service was created by $0.
Please update this README to match the real content.
Add entries to ${C_NEEDS} for the services this services really needs
(it will not start if one failed to start).
Add services to ${C_WANTS} for the services this services wants
(it will start if one or more fail)."
eof
echo "done."
done
cinit-0.3pre19/bin/cinit-conf.svc-delete 0000775 0000000 0000000 00000002213 11303432267 0020123 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Delete services
#
set -e
# init variables
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "`basename $0`: service-name(s)"
echo " I delete your services"
exit 1
fi
for svc in "$@"; do
SERVICE="${R_SVC_DIR}/${svc}"
if [ ! -e "$SERVICE" ]; then
echo "${svc}: does not exists, cannot remove.."
continue
fi
echo -n "Removing $svc ..."
rm -rf "${SERVICE}"
echo "done."
done
cinit-0.3pre19/bin/cinit-conf.svc-off 0000775 0000000 0000000 00000002412 11303432267 0017434 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Select program to start on service stop
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "${__abs_mydir}/cinit-conf.read-conf"
if [ $# -ne 2 ]; then
echo "${__myname}: service path-to-executable"
exit 1
fi
svc="$1"; shift
executable="$1"; shift
echo "${svc}:${C_OFF}->${executable}"
ln -sf "${executable}" "${R_SVC_DIR}/${svc}/${C_OFF}"
cinit-0.3pre19/bin/cinit-conf.svc-on 0000775 0000000 0000000 00000002042 11303432267 0017275 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Select program to start on service start
#
set -e
# init variables
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 2 ]; then
echo "$(basename $0): service path-to-executable"
exit 1
fi
svc="$1"; shift
executable="$1"; shift
echo "${svc}:${C_ON}->${executable}"
ln -sf "${executable}" "${R_SVC_DIR}/${svc}/${C_ON}"
cinit-0.3pre19/bin/cinit-conf.svc-param.add 0000775 0000000 0000000 00000002151 11303432267 0020511 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Select program to start on service start
#
set -e
# init variables
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 3 ]; then
echo "$(basename $0): service (${C_ON}|${C_OFF}) params..."
exit 1
fi
svc="$1"; shift
type="$1"; shift
while [ $# -gt 0 ]; do
param="$1"; shift
file="${svc}/${type}${C_PARAMS}"
echo "${file}+=${param}"
echo "${param}" >> "${R_SVC_DIR}/${file}"
done
cinit-0.3pre19/bin/cinit-conf.svc-respawn.off 0000775 0000000 0000000 00000002455 11303432267 0021121 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Disable respawing for a service
#
set -e
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
# init variables
. "${__mydir}/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "${__myname}: service-name(s)"
echo " Services will lose their respawn mark"
exit 1
fi
for svc in "$@"; do
echo -n "${svc}:respaw->off"
rm -f "${R_SVC_DIR}/${svc}/${C_RESPAWN}"
echo "finished."
done
cinit-0.3pre19/bin/cinit-conf.svc-respawn.on 0000775 0000000 0000000 00000002450 11303432267 0020756 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Enable respawing for a service
#
set -e
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
# init variables
. "${__mydir}/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "${__myname}: service-name(s)"
echo " Services will be marked respawning"
exit 1
fi
for svc in "$@"; do
echo -n "${svc}:respaw->on"
touch "${R_SVC_DIR}/${svc}/${C_RESPAWN}"
echo "finished."
done
cinit-0.3pre19/bin/cinit-conf.svc.acpid 0000775 0000000 0000000 00000002655 11303432267 0017754 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Start acpid
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "${__abs_mydir}/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " I start the old acpid"
echo ""
exit 23
fi
SVC="local-services/acpid"
BINARY_PATH="$(which acpid)"
NEEDS="mount/root mount/proc"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-f"
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.agetty 0000775 0000000 0000000 00000003726 11303432267 0020171 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Enable agetty (6 times is fine)
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 1 ]; then
echo "${__myname}: "
echo ""
echo " Allow login to your system using agetty"
echo ""
exit 23
fi
num_getties="$1"; shift
SVCBASE="local-services/agetty"
# agetty is called getty within debian/ubuntu -> FIXME: also search for agetty
BINARY_PATH="$(which getty)"
NEEDS="mount/root mount/proc"
# Create container to hold all the getties
cinit-conf.svc-create.template "${SVCBASE}"
i=0
while [ "$i" -lt "$num_getties" ]; do
SVC="${SVCBASE}/$i"
tty="tty${i}"
speed="38400"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc.respawn.on "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "${speed}" "${tty}"
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
# add each getty to the "super-getty-service"
cinit-conf.svc.dependency.add "${SVCBASE}" "needs" "${SVC}"
i=$(($i+1))
done
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.categories 0000775 0000000 0000000 00000001521 11303432267 0021010 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Create default categories
#
. "$(dirname $0)/cinit-conf.read-conf"
cinit-conf.svc-create.template $SERVICE_CATEGORIES
cinit-0.3pre19/bin/cinit-conf.svc.dependency.add 0000775 0000000 0000000 00000003567 11303432267 0021544 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 2008-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-conf. If not, see .
#
# cinit: create dependency: service a needs or wants service b
#
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 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"; shift
DEP="$1"; shift
# 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
SVC_A_LDIR="${R_SVC_DIR}/${SVC_A}/${DEP}"
# Try to create dependency directory, if it does not exist
if [ ! -d "${SVC_A_LDIR}" ]; then
echo "${SVC_A}:+${DEP}"
mkdir "${SVC_A_LDIR}"
fi
# allow multiple dependencies to be added in one run
while [ $# -gt 0 ]; do
SVC_B="$1"; shift
# remove slashes in the name for destination
SVC_B_LNAME="$(echo "$SVC_B" | sed 's#/#-#g')"
SVC_B_SOURCE="${T_SVC_DIR}/${SVC_B}"
SVC_A_LDEST="${SVC_A_LDIR}/${SVC_B_LNAME}"
echo "${SVC_A} ${DEP} ${SVC_B} (${SVC_B_LNAME})"
ln -sf "${SVC_B_SOURCE}" "${SVC_A_LDEST}"
done
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.fsck.linux 0000775 0000000 0000000 00000003050 11303432267 0020746 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Filesystemcheck
# Warning: Ubuntu has UUIDs:
# root@ubuntu:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# [...]
# UUID=405998e4-63ba-4190-8a69-488bd81b9d39 / ext3 relatime,errors=remount-ro 0 1
#
# But the mtab of the running system contains the useful entry
#
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 2 ]; then
echo "$(basename $0): servicename device"
exit 1
fi
SVC="$1"; shift
DEVICE="$1"; shift
BINARY_PATH="$(which fsck)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "${DEVICE}"
cinit-0.3pre19/bin/cinit-conf.svc.getty.add 0000775 0000000 0000000 00000003102 11303432267 0020543 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.3pre19/bin/cinit-conf.svc.getty.remove 0000775 0000000 0000000 00000001000 11303432267 0021303 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.3pre19/bin/cinit-conf.svc.hostname.linux 0000775 0000000 0000000 00000002212 11303432267 0021635 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Setup the hostname
#
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}
SVC="network/hostname"
cinit-conf.svc-create.template "${SVC}"
ln -sf "$HOSTNAME_BIN" "${R_SVC_DIR}/${SVC}/${C_ON}"
echo "$HOSTNAME" > "${R_SVC_DIR}/${SVC}/${C_ON}${C_PARAMS}"
cinit-conf.svc.dependency.add "${SVC}" needs "mount/proc"
cinit-0.3pre19/bin/cinit-conf.svc.init 0000775 0000000 0000000 00000000540 11303432267 0017626 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.3pre19/bin/cinit-conf.svc.init.dependencies 0000775 0000000 0000000 00000002111 11303432267 0022247 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# cinit: add standard sub-configuration directories to init wants
#
set -e
. "$(dirname $0)/cinit-conf.read-conf"
cinit-conf.svc.dependency.add init wants getty
cinit-conf.svc.dependency.add init wants local-services
cinit-conf.svc.dependency.add init wants local-tuning
cinit-conf.svc.dependency.add init wants mount
cinit-conf.svc.dependency.add init wants network
cinit-0.3pre19/bin/cinit-conf.svc.keymap.linux 0000775 0000000 0000000 00000002217 11303432267 0021312 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Setup console keymap
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="local-tuning/keymap"
BINARY_PATH="$(which setupcon)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-k"
# FIXME: what are the correct dependencies?
cinit-conf.svc.dependency.add "${SVC}" "needs" "mount/proc"
cinit-0.3pre19/bin/cinit-conf.svc.linux.debian.ntpdate 0000775 0000000 0000000 00000002526 11303432267 0022707 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Start ntpdate
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "${__abs_mydir}/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: (no args)"
exit 1
fi
. /etc/default/ntpdate
if [ -z "$NTPSERVERS" ]; then
echo "No ntp servers found, aborting"
exit 1
fi
BINARY_PATH="$(which ntpdate)"
SVC="local-services/ntpdate"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-0.3pre19/bin/cinit-conf.svc.linux.network.lo 0000775 0000000 0000000 00000001040 11303432267 0022117 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.3pre19/bin/cinit-conf.svc.local-tuning.udev.ubuntu 0000775 0000000 0000000 00000002322 11303432267 0023542 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Configure the udev service
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
BINARY_PATH="$(which udevadm)"
SVC="local-tuning/udev"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "settle"
# dependencies
cinit-conf.svc.dependency.add "${SVC}" needs "mount/sys"
cinit-conf.svc.dependency.add "${SVC}" needs "mount/udev"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.dev-pts 0000775 0000000 0000000 00000003126 11303432267 0021411 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Mount /dev/shm, as specified in Ubuntu:
#
# domount tmpfs shmfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT
#
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="mount/dev-pts"
BINARY_PATH="$(which mount)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
# Ubuntu: domount devpts "" /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
# root@cinit-desktop:/home/cinit/cinit# grep -e TTYGRP -e TTYMODE /etc/default/*
# /etc/default/devpts:TTYGRP=5
# /etc/default/devpts:TTYMODE=620
# root@cinit-desktop:/home/cinit/cinit# awk -F: '$3 ~ /^5$/ { print $1 }' /etc/group
# tty
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-n" "-t" "devpts" "devpts" "/dev/pts" "-onoexec,nosuid,gid=5,mode=620"
cinit-conf.svc.dependency.add "${SVC}" "needs" "mount/udev"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.dev-shm 0000775 0000000 0000000 00000002355 11303432267 0021375 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Mount /dev/shm, as specified in Ubuntu:
#
# domount tmpfs shmfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT
#
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="mount/dev-shm"
BINARY_PATH="$(which mount)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-n" "-t" "tmpfs" "-onosuid,nodev" "shmfs" "/dev/shm"
cinit-conf.svc.dependency.add "${SVC}" "needs" "mount/udev"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.getsource 0000775 0000000 0000000 00000001507 11303432267 0022030 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.3pre19/bin/cinit-conf.svc.mount.nfs 0000775 0000000 0000000 00000003121 11303432267 0020610 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Mount NFS shares
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " Enable NFS mounts"
echo ""
exit 23
fi
SVC="mount/nfs"
BINARY_PATH="$(which mount)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-a" "-t" "nfs"
BINARY_PATH="$(which umount)"
cinit-conf.svc-off "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_OFF}" "-a" "-t" "nfs"
# NFS mounts always need the network to be up
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS "network"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.proc 0000775 0000000 0000000 00000002255 11303432267 0020774 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Mount /proc
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
# - mount /proc
SVC="mount/proc"
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${R_SVC_DIR}/${SVC}"
ln -sf /bin/mount "${R_SVC_DIR}/${SVC}/${C_ON}"
echo proc > "${R_SVC_DIR}/${SVC}/${C_ON}${C_PARAMS}"
echo -t >> "${R_SVC_DIR}/${SVC}/${C_ON}${C_PARAMS}"
echo proc >> "${R_SVC_DIR}/${SVC}/${C_ON}${C_PARAMS}"
echo /proc >> "${R_SVC_DIR}/${SVC}/${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.root 0000775 0000000 0000000 00000002350 11303432267 0021010 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# mount / read/write (and fsck it before)
#
set -e
. "$(dirname $0)/cinit-conf.read-conf"
# mount root read/write
SVC="mount/root"
BINARY_PATH="$(which mount)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-n" "-o" "remount,rw" "/"
SVC_FSCK="${SVC}/fsck"
BINARY_PATH="$(which fsck)"
DEV="$(mount | awk '$3 ~ /\/$/ { print $1 }')"
cinit-conf.svc.fsck.linux "${SVC_FSCK}" "${DEV}"
cinit-conf.svc.dependency.add "${SVC}" "needs" "${SVC_FSCK}"
cinit-0.3pre19/bin/cinit-conf.svc.mount.swap 0000775 0000000 0000000 00000001712 11303432267 0021000 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.3pre19/bin/cinit-conf.svc.mount.sys 0000775 0000000 0000000 00000001135 11303432267 0020643 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.3pre19/bin/cinit-conf.svc.mount.sysfs 0000775 0000000 0000000 00000002156 11303432267 0021200 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Mount sysfs
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
DDIR="${R_SVC_DIR}/mount/sys/"
# - mount /sys
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${DDIR}"
ln -sf /bin/mount "${DDIR}${C_ON}"
echo sysfs > "${DDIR}${C_ON}${C_PARAMS}"
echo -t >> "${DDIR}${C_ON}${C_PARAMS}"
echo sysfs >> "${DDIR}${C_ON}${C_PARAMS}"
echo /sys >> "${DDIR}${C_ON}${C_PARAMS}"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mount.udev 0000775 0000000 0000000 00000002116 11303432267 0020770 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Setup console keymap
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="mount/udev"
BINARY_PATH="$(which mount)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-n" "-t" "tmpfs" "-o" "mode=0755" "udev" "/dev"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.mtab-clean.linux 0000775 0000000 0000000 00000002774 11303432267 0022037 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Initialise the /etc/mtab file on Linux:
# Ubuntu Jaunty manually creates it, we just ignore it
# and link it to /proc/mounts.
#
# This is probably not the perfect way, as /proc/mounts
# contains more stuff than useful. Maybe we can add a
# "add mount to mtab" dependency to all mount/X/ services,
# that depends on mount/root.
#
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
SVC="local-tuning/cleanup-mtab"
BINARY_PATH="$(which ln)"
# Is mount/proc needed or is it sane to link to an empty /etc/mtab
# by linking that to a non-existing file?
NEEDS="mount/root mount/proc"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-sf" "/proc/mounts" "/etc/mtab"
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.network.debian 0000775 0000000 0000000 00000003240 11303432267 0021575 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Start network
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " I start all your network devices"
echo ""
exit 23
fi
SVC="network/devices"
BINARY_PATH="$(which ifup)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-a"
# FIXME: Is it really senseful to call ifdown at shutdown?
# Or is that useless anyway? Besides some DHCP_RELEASEs
BINARY_PATH="$(which ifdown)"
cinit-conf.svc-off "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_OFF}" "-a"
# no known dependencies
#cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.setup.console.linux 0000775 0000000 0000000 00000002556 11303432267 0022633 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
# Setup the Linux console
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " Setup Linux console"
echo ""
exit 23
fi
SVC="local-tuning/setup-console"
BINARY_PATH="$(which setupcon)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "--force"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.shell 0000775 0000000 0000000 00000002747 11303432267 0020005 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Start a shell - the debugging example
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " I start a local shell"
echo ""
exit 23
fi
SVC="local-services/shell"
BINARY_PATH="$(which sh)"
WANTS="mount/root mount/proc"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-i"
cinit-conf.svc-respawn.on "${SVC}"
cinit-conf.svc.dependency.add "${SVC}" "wants" $WANTS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.sshd 0000775 0000000 0000000 00000002741 11303432267 0017631 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Start sshd
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -ne 0 ]; then
echo "${__myname}: "
echo ""
echo " I start the OpenSSH server (not just sshd, Mike)."
echo ""
exit 23
fi
SVC="remote-services/sshd"
BINARY_PATH="$(which sshd)"
#NEEDS="mount/root mount/proc"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-D"
# no known dependencies
#cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.sysctl.linux 0000775 0000000 0000000 00000003403 11303432267 0021343 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Load sysctl values
#
# Ubuntu: for file in /etc/sysctl.conf /etc/sysctl.d/*.conf
#
. "$(dirname $0)/cinit-conf.read-conf"
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="local-tuning/sysctl"
BINARY_PATH="$(which sysctl)"
# main service
cinit-conf.svc-delete "${SVC}"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-p" "/etc/sysctl.conf"
# create "sub"-services
for file in /etc/sysctl.d/*.conf; do
bsvc="${file##*/}"
bsvc="${bsvc%*.conf}"
svc="${SVC}/${bsvc}"
cinit-conf.svc-create.template "${svc}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${svc}" "${C_ON}" "-p" "${file}"
cinit-conf.svc.dependency.add "${SVC}" "needs" "${svc}"
done
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.tmp.clean 0000775 0000000 0000000 00000003254 11303432267 0020551 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Cleanup temp directories
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "${__myname}: tmpdirs... "
echo ""
echo " I remove those tempdirs on bootup."
echo ""
exit 23
fi
SVC="local-tuning/tmp-clean"
BINARY_PATH="$(which rm)"
# FIXME: We would need all the related partions to be r/w
# So probably add a warning somewhere or add another argument,
# specifyng other needs
NEEDS="mount/root"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-rf"
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
# all other arguments are temp directories
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "$@"
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.tmp.create 0000775 0000000 0000000 00000003214 11303432267 0020726 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Recreate temp directories
#
################################################################################
# standard vars stolen from cconf
__pwd="$(pwd -P)"
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
set -e
. "$(dirname $0)/cinit-conf.read-conf"
if [ $# -lt 1 ]; then
echo "${__myname}: tmpdirs... "
echo ""
echo " I create those tempdirs on bootup."
echo ""
exit 23
fi
SVC="local-tuning/tmp/create"
BINARY_PATH="$(which mkdir)"
# FIXME: We would need all the related partions to be r/w
# So probably add a warning somewhere or add another argument,
# specifyng other needs
NEEDS="mount/root"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
# all other arguments are temp directories
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-m" "1777" "$@"
cinit-conf.svc.dependency.add "${SVC}" "needs" $NEEDS
exit 0
cinit-0.3pre19/bin/cinit-conf.svc.udev.copy-static 0000775 0000000 0000000 00000002125 11303432267 0022065 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# 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 .
#
#
# Copny static files to /dev
#
. "$(dirname $0)/cinit-conf.read-conf"
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
SVC="local-tuning/udev/copy-static"
BINARY_PATH="$(which cp)"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-a" "/lib/udev/devices/" "/dev/"
exit 0
cinit-0.3pre19/bin/cinit-conf.sys-v-init.get-current-runlevel 0000775 0000000 0000000 00000001411 11303432267 0024201 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.3pre19/bin/cinit-conf.sys-v-init.migrate-fstab 0000775 0000000 0000000 00000001561 11303432267 0022643 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.3pre19/bin/cinit-helper.wait.for.daemon 0000775 0000000 0000000 00000001171 11303432267 0021417 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.3pre19/bugs/ 0000775 0000000 0000000 00000000000 11303432267 0014304 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/bugs/README 0000664 0000000 0000000 00000000046 11303432267 0015164 0 ustar 00root root 0000000 0000000 This directory is maintained by ditz.
cinit-0.3pre19/bugs/issue-0c63a541a2261c7322d6c59a6adb091301020c8d.yaml 0000664 0000000 0000000 00000001512 11303432267 0023470 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.3pre19/bugs/issue-0d8142c646aa04e8e713fc8f886a44475581c670.yaml 0000664 0000000 0000000 00000001160 11303432267 0023470 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.3pre19/bugs/issue-120cbf62dbdd9a7a026bcbb7d2863599c7183f70.yaml 0000664 0000000 0000000 00000001561 11303432267 0024037 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.3pre19/bugs/issue-1cc421b885608485f73c9041c5c0af71df76331a.yaml 0000664 0000000 0000000 00000000735 11303432267 0023540 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.3pre19/bugs/issue-1e83dca921062d97b96830caf24e7898ad4fbbe2.yaml 0000664 0000000 0000000 00000000754 11303432267 0024057 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.3pre19/bugs/issue-25822475f5d01c35eb9edd8d75c065c83032701b.yaml 0000664 0000000 0000000 00000001021 11303432267 0023525 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.3pre19/bugs/issue-278e5a7b4c338f18f92d5bb1a2789d76d0e11ad9.yaml 0000664 0000000 0000000 00000002566 11303432267 0024003 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.3pre19/bugs/issue-29d45f06044e5329dca7f351a17676e65d4e3b38.yaml 0000664 0000000 0000000 00000001111 11303432267 0023542 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.3pre19/bugs/issue-2a4a3675810b44b05ce51c021690fb3f21725e55.yaml 0000664 0000000 0000000 00000001060 11303432267 0023425 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.3pre19/bugs/issue-2fda514da472aa15fa57d2df06e8d5cc909016d0.yaml 0000664 0000000 0000000 00000001002 11303432267 0024071 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.3pre19/bugs/issue-3a620ff450d0c685a5567d25d77230763c835c8e.yaml 0000664 0000000 0000000 00000001002 11303432267 0023456 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Allow non-parallel bootup
desc: For easier debugging and people who are confused with parallel startup
type: :task
component: core
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-10-24 14:18:44.270577 Z
references: []
id: 3a620ff450d0c685a5567d25d77230763c835c8e
log_events:
- - 2009-10-24 14:18:44.990439 Z
- Nico Schottelius
- created
- ""
git_branch:
cinit-0.3pre19/bugs/issue-3cc14c82109544e198e5cce002c0d94a66e6f4d7.yaml 0000664 0000000 0000000 00000000704 11303432267 0023677 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.3pre19/bugs/issue-40bb0e1478cb8e1fd7ef577b0acf8f7b2f516d6d.yaml 0000664 0000000 0000000 00000001341 11303432267 0024264 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.3pre19/bugs/issue-4e460e6061fb5d39549b85d42fc33f57de7a1396.yaml 0000664 0000000 0000000 00000000706 11303432267 0023642 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.3pre19/bugs/issue-5bd7befd45553864b1d2ebc12509e06440a402d0.yaml 0000664 0000000 0000000 00000000724 11303432267 0023655 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.3pre19/bugs/issue-5c4769f4f4f23b8a544ae3e20866d8fc2676a7e7.yaml 0000664 0000000 0000000 00000000750 11303432267 0023732 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.3pre19/bugs/issue-638fcf34a8d68c88ed48313ffd3b8a9ecb2fbbd4.yaml 0000664 0000000 0000000 00000000746 11303432267 0024372 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Export cinit.mkheader to cconf
desc: To buid up the complete build suite.
type: :task
component: build
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-11-18 16:03:16.116135 Z
references: []
id: 638fcf34a8d68c88ed48313ffd3b8a9ecb2fbbd4
log_events:
- - 2009-11-18 16:03:16.685812 Z
- Nico Schottelius
- created
- ""
git_branch:
cinit-0.3pre19/bugs/issue-8391cdbcb30d007bfb692504d9469a93f7c15b97.yaml 0000664 0000000 0000000 00000001002 11303432267 0023700 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.3pre19/bugs/issue-85687a7f79046db51429db38e7b1da5234a3675e.yaml 0000664 0000000 0000000 00000001302 11303432267 0023554 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.3pre19/bugs/issue-863a9d56ed460fb45e91d2c555d57133d2286f72.yaml 0000664 0000000 0000000 00000001331 11303432267 0023554 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.3pre19/bugs/issue-8d5e1aee59a52ab1b3b0b02b02f07823d4f4b8d8.yaml 0000664 0000000 0000000 00000001454 11303432267 0024076 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.3pre19/bugs/issue-b5428a5e8b064827fac8f1bc905cd5b304961f77.yaml 0000664 0000000 0000000 00000001125 11303432267 0023706 0 ustar 00root root 0000000 0000000 --- !ditz.rubyforge.org,2008-03-06/issue
title: Add dumpstate function
desc: |-
It should write a cconfig tree similar to the configuration
Additionally it should contain a "state" field
This feature is the base for hot-upgrading cinit.
type: :task
component: cinit
release: future
reporter: Nico Schottelius
status: :unstarted
disposition:
creation_time: 2009-10-05 20:57:25.373348 Z
references: []
id: b5428a5e8b064827fac8f1bc905cd5b304961f77
log_events:
- - 2009-10-05 20:57:25.943152 Z
- Nico Schottelius
- created
- ""
cinit-0.3pre19/bugs/issue-bb27c9b51f82dd54eba8baa40aa5e8bba326ea01.yaml 0000664 0000000 0000000 00000000714 11303432267 0024364 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.3pre19/bugs/issue-c8d020845511594b4b90bb38a2a839ef6ce4c9c8.yaml 0000664 0000000 0000000 00000001014 11303432267 0023700 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.3pre19/bugs/issue-d3732fffad054c5a1f781f28a60015346ad28dd6.yaml 0000664 0000000 0000000 00000001006 11303432267 0023744 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.3pre19/bugs/issue-d7a7970bd20e1dc0b04f314fee5f39ba90d3d904.yaml 0000664 0000000 0000000 00000000734 11303432267 0024110 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.3pre19/bugs/issue-dbc5e27c03e3dd22add144409f6dfe8b81d2c8d1.yaml 0000664 0000000 0000000 00000001204 11303432267 0024243 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.3pre19/bugs/issue-e40b9f0761d0a1e0ca47cc8e0e52d4ec16f51669.yaml 0000664 0000000 0000000 00000001021 11303432267 0024020 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.3pre19/bugs/issue-e435cb93810ea790f795fedc2e9afc6475c9c0a8.yaml 0000664 0000000 0000000 00000000742 11303432267 0024146 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.3pre19/bugs/issue-f10682d63b1059f876c6cdde2323a596dba89d3c.yaml 0000664 0000000 0000000 00000002677 11303432267 0024003 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.3pre19/bugs/issue-fa88d3f9dca2df7ccaf8fb9ce2daab3e9255dae3.yaml 0000664 0000000 0000000 00000000677 11303432267 0024741 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.3pre19/bugs/issue-fea40277e32b0bd747d7f47a68d41009fc046fd9.yaml 0000664 0000000 0000000 00000000726 11303432267 0023771 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.3pre19/bugs/project.yaml 0000664 0000000 0000000 00000002250 11303432267 0016635 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.3pre19/conf/ 0000775 0000000 0000000 00000000000 11303432267 0014271 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/conf/.README 0000664 0000000 0000000 00000000452 11303432267 0015230 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.3pre19/conf/c_confdir 0000664 0000000 0000000 00000000075 11303432267 0016144 0 ustar 00root root 0000000 0000000 conf
The directory below cinit_dir for cinit configuration.
cinit-0.3pre19/conf/c_delay 0000664 0000000 0000000 00000000161 11303432267 0015612 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.3pre19/conf/c_desaster 0000664 0000000 0000000 00000000251 11303432267 0016326 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.3pre19/conf/c_env 0000664 0000000 0000000 00000000220 11303432267 0015300 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.3pre19/conf/c_init 0000664 0000000 0000000 00000000044 11303432267 0015457 0 ustar 00root root 0000000 0000000 init
The name of the init service.
cinit-0.3pre19/conf/c_last 0000664 0000000 0000000 00000000343 11303432267 0015461 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.3pre19/conf/c_needs 0000664 0000000 0000000 00000000111 11303432267 0015605 0 ustar 00root root 0000000 0000000 needs
Name of the service sub-directory containing the needed services.
cinit-0.3pre19/conf/c_off 0000664 0000000 0000000 00000000073 11303432267 0015270 0 ustar 00root root 0000000 0000000 off
Name of the file we start, when stopping the service.
cinit-0.3pre19/conf/c_on 0000664 0000000 0000000 00000000072 11303432267 0015131 0 ustar 00root root 0000000 0000000 on
Name of the file we start, when starting the service.
cinit-0.3pre19/conf/c_panic 0000664 0000000 0000000 00000000244 11303432267 0015610 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.3pre19/conf/c_params 0000664 0000000 0000000 00000000132 11303432267 0015775 0 ustar 00root root 0000000 0000000 .params
The extension to c_on and c_off, which will contain the parameters \n seperated.
cinit-0.3pre19/conf/c_respawn 0000664 0000000 0000000 00000000125 11303432267 0016173 0 ustar 00root root 0000000 0000000 respawn
If this file exists in a service directory, cinit will respawn the service.
cinit-0.3pre19/conf/c_sock 0000664 0000000 0000000 00000000137 11303432267 0015456 0 ustar 00root root 0000000 0000000 coala
The name of the socket cinit will use (currently: below tmpdir,
see doc/ipc.thoughts).
cinit-0.3pre19/conf/c_tmp 0000664 0000000 0000000 00000000127 11303432267 0015316 0 ustar 00root root 0000000 0000000 tmp
The name of the temporary directory, where we'll mount tmpfs to create the socket
cinit-0.3pre19/conf/c_tmpfs 0000664 0000000 0000000 00000000141 11303432267 0015643 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.3pre19/conf/c_tmpmount 0000664 0000000 0000000 00000000232 11303432267 0016376 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.3pre19/conf/c_wants 0000664 0000000 0000000 00000000111 11303432267 0015643 0 ustar 00root root 0000000 0000000 wants
Name of the service sub-directory containing the wanted services.
cinit-0.3pre19/conf/cc 0000664 0000000 0000000 00000000034 11303432267 0014576 0 ustar 00root root 0000000 0000000 gcc
The c-compiler to use.
cinit-0.3pre19/conf/cflags 0000664 0000000 0000000 00000000340 11303432267 0015450 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.3pre19/conf/cinit_dir 0000664 0000000 0000000 00000000106 11303432267 0016155 0 ustar 00root root 0000000 0000000 /etc/cinit
This is where all configuration for cinit will be stored.
cinit-0.3pre19/conf/cinitconfdir 0000664 0000000 0000000 00000000063 11303432267 0016666 0 ustar 00root root 0000000 0000000 conf
General cinit-configuration (below cinitdir)
cinit-0.3pre19/conf/destdir 0000664 0000000 0000000 00000000301 11303432267 0015644 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.3pre19/conf/gettydir 0000664 0000000 0000000 00000000220 11303432267 0016041 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.3pre19/conf/install_directory 0000664 0000000 0000000 00000000075 11303432267 0017750 0 ustar 00root root 0000000 0000000 -d
Parameter to pass to install_prog to create directories.
cinit-0.3pre19/conf/install_prog 0000664 0000000 0000000 00000000147 11303432267 0016713 0 ustar 00root root 0000000 0000000 /usr/bin/install
Program we use to install. install_directory contains parameter
to create directory.
cinit-0.3pre19/conf/ipc_method 0000664 0000000 0000000 00000000164 11303432267 0016330 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.3pre19/conf/ld 0000664 0000000 0000000 00000000026 11303432267 0014611 0 ustar 00root root 0000000 0000000 gcc
Comment missing.
cinit-0.3pre19/conf/ldflags 0000664 0000000 0000000 00000000037 11303432267 0015630 0 ustar 00root root 0000000 0000000
No flags specified normally.
cinit-0.3pre19/conf/max_delay 0000664 0000000 0000000 00000000124 11303432267 0016154 0 ustar 00root root 0000000 0000000 30
Maximum number of seconds to sleep between retrying to start it
(respawn only).
cinit-0.3pre19/conf/max_deps 0000664 0000000 0000000 00000000212 11303432267 0016007 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.3pre19/conf/msgq_pathname 0000664 0000000 0000000 00000000123 11303432267 0017034 0 ustar 00root root 0000000 0000000 /bin/sh
Used to generate an unique identifier for the message queue.
See ftok(3).
cinit-0.3pre19/conf/msgq_to_clients 0000664 0000000 0000000 00000000153 11303432267 0017405 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.3pre19/conf/msgq_to_server 0000664 0000000 0000000 00000000152 11303432267 0017251 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.3pre19/conf/os 0000664 0000000 0000000 00000000240 11303432267 0014631 0 ustar 00root root 0000000 0000000 linux
Select the operating system compiling for.
Current possibilities:
- linux
Currently Planned possibilities:
- freebsd
- openbsd
- netbsd
cinit-0.3pre19/conf/p_asciidoc 0000664 0000000 0000000 00000000166 11303432267 0016314 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.3pre19/conf/p_docbooktoman 0000664 0000000 0000000 00000000174 11303432267 0017214 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.3pre19/conf/p_docbooktotexi 0000664 0000000 0000000 00000000175 11303432267 0017413 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.3pre19/conf/prefix 0000664 0000000 0000000 00000000300 11303432267 0015502 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.3pre19/conf/profile 0000664 0000000 0000000 00000000470 11303432267 0015655 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.3pre19/conf/service_categories 0000664 0000000 0000000 00000000214 11303432267 0020056 0 ustar 00root root 0000000 0000000 local-tuning local-services mount network remote-services
List of directories normally created below /etc/cinit/svc/ as 'pseudo-services'.
cinit-0.3pre19/conf/sleep_before_kill 0000664 0000000 0000000 00000000347 11303432267 0017665 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.3pre19/conf/sleep_kill 0000664 0000000 0000000 00000000377 11303432267 0016346 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.3pre19/conf/sleep_kill_svc 0000664 0000000 0000000 00000000255 11303432267 0017214 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.3pre19/conf/sleep_rerun 0000664 0000000 0000000 00000000137 11303432267 0016540 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.3pre19/conf/sleep_svc 0000664 0000000 0000000 00000000101 11303432267 0016167 0 ustar 00root root 0000000 0000000 5
How many seconds to sleep before respawning a failed process.
cinit-0.3pre19/conf/sock_queue 0000664 0000000 0000000 00000000127 11303432267 0016357 0 ustar 00root root 0000000 0000000 32
Maximum process waiting in the socket queue. The default is much
more than enough.
cinit-0.3pre19/conf/strip 0000664 0000000 0000000 00000000110 11303432267 0015345 0 ustar 00root root 0000000 0000000 strip -R .comment -R .note
Strip out unecessary parts of the binaries.
cinit-0.3pre19/conf/sulogin 0000664 0000000 0000000 00000000274 11303432267 0015677 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.3pre19/conf/svcdir 0000664 0000000 0000000 00000000074 11303432267 0015507 0 ustar 00root root 0000000 0000000 svc
Directory below /etc/cinit that contains the services.
cinit-0.3pre19/conf/version 0000664 0000000 0000000 00000000041 11303432267 0015674 0 ustar 00root root 0000000 0000000 "0.3pre19"
The version of cinit
cinit-0.3pre19/contrib+tools/ 0000775 0000000 0000000 00000000000 11303432267 0016140 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/contrib+tools/Makefile 0000664 0000000 0000000 00000002301 11303432267 0017574 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.3pre19/contrib+tools/README 0000664 0000000 0000000 00000000663 11303432267 0017025 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.3pre19/contrib+tools/README.ruby 0000664 0000000 0000000 00000000416 11303432267 0020001 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.3pre19/contrib+tools/cconfig.graph.xml.rb 0000775 0000000 0000000 00000006675 11303432267 0022015 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.3pre19/contrib+tools/cinit-vis.pl 0000775 0000000 0000000 00000003112 11303432267 0020402 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.3pre19/contrib+tools/cinit.graph.text.c 0000664 0000000 0000000 00000012471 11303432267 0021502 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.3pre19/contrib+tools/cinit.h 0000664 0000000 0000000 00000000565 11303432267 0017425 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.3pre19/contrib+tools/error.c 0000664 0000000 0000000 00000005707 11303432267 0017446 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.3pre19/contrib+tools/error.h 0000664 0000000 0000000 00000000733 11303432267 0017445 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.3pre19/contrib+tools/make.cconfig.from.xml.rb 0000775 0000000 0000000 00000014503 11303432267 0022560 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.3pre19/contrib+tools/mini_printf.c 0000777 0000000 0000000 00000000000 11303432267 0025715 2../src/generic/mini_printf.c ustar 00root root 0000000 0000000 cinit-0.3pre19/contrib+tools/usage.c 0000777 0000000 0000000 00000000000 11303432267 0023271 2../src/generic/usage.c ustar 00root root 0000000 0000000 cinit-0.3pre19/doc/ 0000775 0000000 0000000 00000000000 11303432267 0014111 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/doc/.buildwarn 0000664 0000000 0000000 00000001057 11303432267 0016104 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.3pre19/doc/COPYING 0000664 0000000 0000000 00000104513 11303432267 0015150 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.3pre19/doc/CREDITS 0000664 0000000 0000000 00000001644 11303432267 0015136 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.3pre19/doc/Makefile 0000664 0000000 0000000 00000005020 11303432267 0015546 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]
rm -f */*.docbook
#
# Be nice with the users and generate documentation for them
#
dist: distclean documentation
cinit-0.3pre19/doc/README.text 0000664 0000000 0000000 00000002452 11303432267 0015757 0 ustar 00root root 0000000 0000000 cinit documentation
====================
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
----------------------------------------
changes/
~~~~~~~~
Changelogs from this and previous releases.
devel/
~~~~~~
Developer related documents. Contains information for adding code,
for developing external tools to cinit or code guidelines for writing
patches to cinit.
examples/
~~~~~~~~~
Example configurations to start with.
man/
~~~~
Manpages for cinit and the utilities.
todo/
~~~~~
Stuff that should be done, that has not yet been migrated to ditz.
user/
~~~~~
The most important part: Documentation for users (aka sysadmins,
hackers, endusers?): Explains howto install, configure, use and
debug cinit.
do-not-read/
~~~~~~~~~~~~
Stuff that is only kept for various strange reasons. Do not read it.
do-not-read/ancient
^^^^^^^^^^^^^^^^^^^
Old documents, only thought to irritate you.
They are not interesting for most people and may contain
obsoleted or wrong information.
do-not-read/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.
cinit-0.3pre19/doc/changes/ 0000775 0000000 0000000 00000000000 11303432267 0015521 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/doc/changes/0.1 0000664 0000000 0000000 00000000057 11303432267 0015744 0 ustar 00root root 0000000 0000000 * Initial release
* Support for adding getties
cinit-0.3pre19/doc/changes/0.3pre15 0000664 0000000 0000000 00000000153 11303432267 0016620 0 ustar 00root root 0000000 0000000 Released: 2009-09-23
Changes:
* Changed child handling (no function calls in sig_child handler anymore)
cinit-0.3pre19/doc/changes/0.3pre16 0000664 0000000 0000000 00000000273 11303432267 0016624 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.3pre19/doc/changes/0.3pre17 0000664 0000000 0000000 00000000153 11303432267 0016622 0 ustar 00root root 0000000 0000000 Released: 2009-10-05
Changes:
* Populated bin/ with a lot of scripts to migrate ubuntu/upstart to cinit
cinit-0.3pre19/doc/changes/0.3pre18 0000664 0000000 0000000 00000000271 11303432267 0016624 0 ustar 00root root 0000000 0000000 Released: 2009-11-05
Changes:
* Added script to partially migrate Ubuntu Jaunty almost completly to cinit
* Added script to create minimal configuration (cinit-conf.config.shell)
cinit-0.3pre19/doc/changes/0.3pre19 0000664 0000000 0000000 00000000374 11303432267 0016631 0 ustar 00root root 0000000 0000000 Released: 2009-11-26
Changes:
* Add install target for bin/
* Consistent naming in bin/ (conf, cmd, helper)
* Cleanup up some cinit-conf scripts
* Cleanup documentation directory
* Cleanup scripts directory
* Cleanup src installation
cinit-0.3pre19/doc/changes/00-before-0.3pre15 0000664 0000000 0000000 00000010224 11303432267 0020275 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.3pre19/doc/devel/ 0000775 0000000 0000000 00000000000 11303432267 0015210 5 ustar 00root root 0000000 0000000 cinit-0.3pre19/doc/devel/Doxyfile 0000664 0000000 0000000 00000026101 11303432267 0016716 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.3pre19/doc/devel/README.text 0000664 0000000 0000000 00000000617 11303432267 0017057 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.3pre19/doc/devel/cinit-0.4.text 0000664 0000000 0000000 00000005243 11303432267 0017527 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.3pre19/doc/devel/cinit-status-translation.dia 0000664 0000000 0000000 00000011742 11303432267 0022657 0 ustar 00root root 0000000 0000000 ‹ í]msÛF’þî_ÁR¾ÜUQãyÌrí-'ÑÞ¦vÏvÅNíGDÂ.¡!˺ںß~ÓPâ;A†äa%aH5ÑDs¦»Ÿ~›?ÿåÛítð5Éçi6{sF>$³q6Ig×oÎ~ûü×óèì/o_ýy’Æ2ÿ^çñíÀ|b6‡WoÎnŠâîO¯_?<< éã<.²MÓ{4O^ÿ_<Ư
Ñë³·¯ƒåLâ"†÷ªwã¢ÈÓ«û"ÌâÛäÍÙU<þý:Ïîg“³’ª¢gÓ,|§oÎ~øbg¯«Ë¼^¹ÎžkßÅ×ÉUžÄ¿ï¾46›\ú.É×/{{—ÍSCR<Þmì¸üw‰¦¢š¢ÙõÛÞñʯT½ñ|m_t'“â6ίÓÙ&#›i)Š"J©†Ð‘ÆŠ+²Éñì®NËnzZvùiÙ¥óË»,/ò8-6Y^eÙ4‰g%×"¿Ošó™ã©YbûnËá.¾¤E‘øþ_âé¼Î
”o?í¶cwîužNöoÜŠWyH'ÅÍå7Oâ*¯þèéê_Óyz5M¶}ûtV´vùÇv.¿þëXíýüqÇÕP^m§y˜D‰HÄñæáú>$óËl•fÇ•n*²×‡¤¾NWW0å[kÆÚ²˜ÆI¾Ðé™ÙÀ·gƒêÇ]Ö6´?>›ô5úA<.Ò¯‹WKòË®þ'•`>ñlç“Áùàsò8[rXÎéäÍÙ¼*ÙuY˜«¥¹!Ú»ìiý $Åðœ !Ö¶©nvq¸ºZg›{ˆg×Ód™ EŒ)1¢a,YC–ˆâÀÞX£Ù¥ê3±B·æwü”ÎÒb0Oò¯é8Ì‹¸¸ŸŒ
šÍ§qa~‰Y+w7;|“=z—uÈfŶ¯ï¾Ä·éôñÍÙm6Ëæwñج¢yñKÊ8¯åçÊîó4É—÷Èñ_â&I¯o¶~%¥‹°ˆcTS‰×T¹ñ\]¤ujN«zn3Œ±#ãE\Ïn“í?h2»¿-yÕå²U‹·q¾Ú¯´¾už¿
;°Ë7K
µKeýößÿ0ÚÊ(.Ãõs’ß.é,\é,⪳G|Èüª,à `2"q1äH6ãv›ñ!m5IÇE³«'Óäörœå³M€ÕžÀ,ë‰m
m‹vô¥7N;×6^|r »ú>ßüvïõcX|I§Ó,Vaûq,ìù’Îâéúõ÷!ÇÝû£±oã›-;—:ï\†ôP!¯—Ì©™áÂqÒ°}µÂj¨‘0O¤Ç›ØIvuö0õ¸‡éw±‡ëï±ÏàC¦àB.í3Zí3Ö‚…Ô`²0^vÌ|IFRLؘ
X¡]ÝgY^Ü\Z)/;Gº•}[‡æèûÊŒã?+v;wxƒÿóßÈž¿a‡ïß™¿E²×x†ëŽE‚žµÃ yu}½©út+¸<æújÈfÞ.}çoW¯„siê°€/×(£f¿„½•Ú¬„«I
ºÔü.—éÌèÿ"™8;xOËr6+/=ßX°‹¿nâÙ¤Š™Ådƒç¿¾9‹6–ϒê³tõ³d3ò¶ö…êXÉá/îl$åû4ŽÒXFŽÅˆb¤™IíAÌkíïͬËÓ·æÆ-ÚŒký-™~MŠtûlaáÕ÷ÚZ]ˆ!¨Õå ÖT,\³ê|‚bpÑ-“!ˆ2j^P¤ú‹…$V
+D"*–”€×øŠ¾ç×Ió9¿¼ÿåóå'óÏß.?¼ÿé"7ßÆÍ ZM@á¤ùËÝÓ™9ó]òÇKÏPn’ùæ|K‹Öx¸›néŽ!Ö´J¿é(×|°M¡©¬Xô8¤í.½:Æ;¬Š´³Ï1ŒüfÑL¨°!8¡¬‹ŠqŸ’úó›ì~:äÉü.~˜å=·¿eaÕCEœ[í(ô‘xVQÐP„"Fú«¡®l»øõƒl6N‚¦òØÝ\žAQu´io ”´Ñ`§Aq0¿½ÜvŒ(AÌf
({Þ9°&¶ÝDrÑ"ÉR“̦…% ñÏÿñÏÆñO…8‰ˆ1Äwð³â¤›rêHìs¿”>â—¥¡{c2Òâq[¹{7*AbHØJ»};GÀΗ‘ùÝ!Y%zÝJî(³:õ:RËêu^B½ÎÅ·dlé“d2€Î{èÉŽ°€tI¨»=ŒéÚ_Ì=«V5PPƒ>M“4+£*Í6OzC„]0Tô„íßR¶VÊÖº£Ð"Ä
MØEuE-*Û <ÔèÏHê‰uàÖ±JáЊMÖÊPp‹Pl¿ÙsîÆ~ŠeÙž¯ˆLÁÔ³@1Uê9úØo³·S|{Hš=ƒWƒÙf/˜½ƒ†Èì)VuEH£U<›½'nÔ[ÇÌžlÑìÑÍÞÎaxD´0
ºô[@i¸P¥ðæÙöP¬†$2>V½ˆç&¾0¯G3ñˆl!«Ílø]xÞnÒ8“#;"Ê,ήî±Ú)íM™¹’ɵ‚ÝZda ^pJƒSz\F›¡¨¬÷Ð.5NlvmÞš;)òE…qxûÇXçžWôbfQÛb؈8žZ‰!%ka»à~ºˆ¬ÞÔŠˆ«0‚êÅeÁÿ=xš[ñþââçË¿¾ûå?‡tø)Òá”E v° ñ0¹¢s“+HÔļG”D$õ)ZG u+㮵è=Öê¡S¨¹÷C„ pŽ#Õ\‹ï²; Þ€zÛB½¬ÔNjeÛyƒ¾–[äÀkøW8³0Xô™fAÜ{È1Dluã2€z¶Ó2c0§Ö”ð^thf³d`TÝm–W5¼O¤Ó0!þØeËÒÍ™=ì"§¸…H¢rH©_ÿ™
.5^F½j&H§ÓÁ,+–ÚɃ¶ò¶/Ñ ¯:ÚL¾§ÇŽ’z옢jHyÓsÝ.;FK6J@£Ö˜iórGzíeW¯ÛNJÅõóC„<ÃKê¶{ˆgEè¶;Ezb)†T (¤NÖoGiKU˜Ê¯?-‘ûd{F†%ãD{,ß&µm
:R•·]‹Îlu mÒ}G¥aaÚIˆ’·Ô§GìFÂæYxïÒ+y‘æ¼:!ÇG—Jv†×ý6éQ÷sÅÅ)l%p©,¥Y3Ôâ:ÙtY'Œ¥¨e,í©c-„àkî5—E›tÁ\sÌåÑý}²²—”
ÿí}²2˜™uÜ`Ò¶«¢Ÿ“üv[Ó½1]—¡E¨Íñ9¹WCŠÅ²‰Äˆá
è`¤{Át—]¦×Âèï9\™Î/¿¤³xê¬:Úr`Eç("»¯üž`Ù˜çh›@3Þݽ\Ó‰Ý*ºætÝÐŒ.´6ø°Çù° ‰©7óíÁV¬Ìžå/ÃUã)Œºòaqš¹T¶PYÆ"ä¹&2¢%.FD"™Wà÷9yï,»:®¯DX®ä9CòþE%ï«:¶¾÷ž¾gHcØ®‰¾?]ú^µ¾×U†€úíy#²¥Sa‡»TKˆ^'ñ·ÈnZ1É{vQmÂæžEèv .€:(%"UŠOøïu+yÉÆ¼:vr •þ†µìH#÷“mª€Á‘m^¤˜h
|LäˆqÆÉq$z=9Ð]~at`FRçÖPÔ†$ˆç-§T‰BhDÙH iùRÔc/s—ðvSÂHnº÷=Víàú”º2xšÁÓž&CR3-@7E+{΋¯¹àư·Ž%8s˜+h¼Æ“Ïd-t+³Jû
¿ÝÊ6EllóŸP
¼TÞçé‚®‚«ã¢*$Ùr럎Búà…Íüðþ§‹Ë„d43cºÂ{a¾`÷æ2çn~^)æ7ðÄ˦@wbd-!—À´ÏåsÛE·I!BÛ¤³®Q)>.BH@À7ï™”•ZÒþ[&qåþÉ_FÈ:€¥Ç _ƒD½1¿ý:8¥¯Ø²ÆíêuÌå9L-ÙH12¼Ì‚¢Çås7cß ƒeüàïK„¿0b? `ß ø›-Ë#;ƒ+”Ð ÜA ÌÚª¼ð€Ï âJQcÄG´
m÷ýÒšè×èCGë‚›s€®TJôÐo@¿Ñï9L#€§ö>2è‰YÔœYÇñïQ3ƒØî#éüá_ÞB·µ°XÊä…ß~kA+FØØL…0/KŽ8îsYò«ƒ9Y9jŽüpð
þõâÓÇwÿ|ÿËûÿ
0Ø7¦©HÚ:)Pp@ÁÝCÁîST$Ò¬jÑöiÕ%ÔþÙn2cí)Ær[Øã¦»ÂÛBgîšaR›Îè~àøuë%ñ
Ê0K%€á †k»SˆÚM!¦¼£á'nÚ[×àðZë:
ó?æ9æ