ruinit is an init (sysvinit replacement) that works in daemontools' way but under gpl git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1482 c5f82cb5-29bc-0310-9cd0-bff59a50e3bcrocklinux
@ -0,0 +1,27 @@ |
|||||
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
# |
||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
# Please add additional copyright information _after_ the line containing |
||||
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
# |
||||
|
# ROCK Linux: rock-src/package/mnemoc/runit/config-djb.in |
||||
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
# |
||||
|
# 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 2 of the License, or |
||||
|
# (at your option) any later version. A copy of the GNU General Public |
||||
|
# License can be found at Documentation/COPYING. |
||||
|
# |
||||
|
# Many people helped and are helping developing ROCK Linux. Please |
||||
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
# file for details. |
||||
|
# |
||||
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
if pkgcheck runit X || pkgcheck daemontools X; then |
||||
|
menu_begin MENU_DJB 'Package Options - D.J. Bernstein´s software and -like' |
||||
|
bool 'Use /package, /command and /service directories' ROCKCFG_PKG_DJB_LAYOUT 1 |
||||
|
menu_end |
||||
|
fi |
||||
@ -0,0 +1,119 @@ |
|||||
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
# |
||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
# Please add additional copyright information _after_ the line containing |
||||
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
# |
||||
|
# ROCK Linux: rock-src/package/mnemoc/runit/djb-config |
||||
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
# |
||||
|
# 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 2 of the License, or |
||||
|
# (at your option) any later version. A copy of the GNU General Public |
||||
|
# License can be found at Documentation/COPYING. |
||||
|
# |
||||
|
# Many people helped and are helping developing ROCK Linux. Please |
||||
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
# file for details. |
||||
|
# |
||||
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
# why to use this secure stuff? |
||||
|
# because we can be updating. |
||||
|
|
||||
|
pkg_djb_securecopy() { |
||||
|
echo "'$1/$3' -> '$2/$3'" |
||||
|
rm -f $2/$3'{new}' |
||||
|
cp -p $1/$3 $2/$3'{new}' |
||||
|
mv -f $2/$3'{new}' $2/$3 |
||||
|
} |
||||
|
|
||||
|
pkg_djb_securelink() { |
||||
|
echo "create symbolic link '$1/$3' to '$2/$3'" |
||||
|
rm -f $2/$3'{new}' |
||||
|
ln -s $1/$3 $2/$3'{new}' |
||||
|
mv -f $2/$3'{new}' $2/$3 |
||||
|
} |
||||
|
|
||||
|
pkg_djb_installpackage() { |
||||
|
# requires ./package/commands |
||||
|
# and files in ./command |
||||
|
|
||||
|
local package=$1 |
||||
|
local altdir=$2 |
||||
|
|
||||
|
if [ "$ROCKCFG_PKG_DJB_LAYOUT" == "1" ]; then |
||||
|
echo 'Copying commands to package directory...' |
||||
|
mkdir -p $pkg_djb_packagedir/$package/$pkg-$ver/command |
||||
|
for i in `cat ./package/commands`; do |
||||
|
pkg_djb_securecopy ./command \ |
||||
|
$pkg_djb_packagedir/$package/$pkg-$ver/command $i |
||||
|
done |
||||
|
|
||||
|
echo "Creating symlink $pkg -> $pkg-$ver..." |
||||
|
rm -f $pkg_djb_packagedir/$package/$pkg |
||||
|
ln -sv $pkg-$ver $pkg_djb_packagedir/$package/$pkg |
||||
|
|
||||
|
echo "Making command links in $pkg_djb_commanddir..." |
||||
|
mkdir -p $pkg_djb_commanddir |
||||
|
for i in `cat package/commands`; do |
||||
|
pkg_djb_securelink $pkg_djb_packagedir/$package/$pkg-$ver/command \ |
||||
|
$pkg_djb_commanddir $i |
||||
|
done |
||||
|
|
||||
|
if [ $ROCKCFG_PKG_DJB_COMPAT -eq 1 ]; then |
||||
|
echo "Making compatibility links in $pkg_djb_compatdir..." |
||||
|
mkdir -p $pkg_djb_compatdir |
||||
|
for i in `cat package/commands`; do |
||||
|
pkg_djb_securelink $pkg_djb_packagedir/$package/$pkg-$ver/command \ |
||||
|
$pkg_djb_compatdir $i |
||||
|
done |
||||
|
fi |
||||
|
else |
||||
|
echo 'Copying commands to package directory...' |
||||
|
pkg_djb_commanddir=$altdir |
||||
|
mkdir -p $pkg_djb_commanddir |
||||
|
for i in `cat ./package/commands`; do |
||||
|
pkg_djb_securecopy ./command $pkg_djb_commanddir $i |
||||
|
done |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
pkg_djb_installdoc() { |
||||
|
local package=$1 |
||||
|
|
||||
|
if [ "$ROCKCFG_PKG_DJB_LAYOUT" == "1" ]; then |
||||
|
echo 'Copying package files to package directory...' |
||||
|
mkdir -p $pkg_djb_packagedir/$package/$pkg-$ver/package |
||||
|
for i in `ls ./package`; do |
||||
|
case $i in |
||||
|
compile|install*|upgrade) |
||||
|
/bin/true ;; |
||||
|
*) pkg_djb_securecopy ./package \ |
||||
|
$pkg_djb_packagedir/$package/$pkg-$ver/package $i ;; |
||||
|
esac |
||||
|
done |
||||
|
else |
||||
|
echo 'Copying package files to doc directory...' |
||||
|
mkdir -p $docdir |
||||
|
for i in `ls ./package`; do |
||||
|
case $i in |
||||
|
compile|install*|upgrade) |
||||
|
/bin/true ;; |
||||
|
*) pkg_djb_securecopy ./package $docdir $i ;; |
||||
|
esac |
||||
|
done |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
pkg_djb_packagedir="$root/package" |
||||
|
pkg_djb_commanddir="$root/command" |
||||
|
pkg_djb_compatdir="$root/usr/local/bin" |
||||
|
|
||||
|
if [ "$ROCKCFG_PKG_DJB_LAYOUT" == "1" ]; then |
||||
|
pkg_djb_servicedir="$root/service" |
||||
|
else |
||||
|
pkg_djb_servicedir="$root/etc/service" |
||||
|
fi |
||||
@ -0,0 +1,47 @@ |
|||||
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
# |
||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
# Please add additional copyright information _after_ the line containing |
||||
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
# |
||||
|
# ROCK Linux: rock-src/package/mnemoc/runit/parse-config |
||||
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
# |
||||
|
# 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 2 of the License, or |
||||
|
# (at your option) any later version. A copy of the GNU General Public |
||||
|
# License can be found at Documentation/COPYING. |
||||
|
# |
||||
|
# Many people helped and are helping developing ROCK Linux. Please |
||||
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
# file for details. |
||||
|
# |
||||
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
# |
||||
|
# prepare root links for DJB filesystem hierarchy inside chrooted env. |
||||
|
# |
||||
|
|
||||
|
if [ "$ROCKCFG_PKG_DJB_LAYOUT" == "1" ]; then |
||||
|
for x in package service command; do |
||||
|
mkdir -p $xroot/$x |
||||
|
var_append flistroot ' ' $x |
||||
|
done |
||||
|
if [ "$pkg" == "runit" ]; then |
||||
|
for x in package service command; do |
||||
|
add_flist $xroot/$x/ |
||||
|
done |
||||
|
chmod 1755 $xroot/package |
||||
|
fi |
||||
|
elif [ "$ROCKCFG_PKG_DJB_LAYOUT" == "0" ]; then |
||||
|
mkdir -p $xroot/etc/service |
||||
|
if [ "$pkg" == "runit" ]; then |
||||
|
add_flist $xroot/etc/service |
||||
|
fi |
||||
|
else |
||||
|
# nothing about DJB layout on config =( |
||||
|
true |
||||
|
fi |
||||
|
|
||||
@ -0,0 +1,34 @@ |
|||||
|
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
[COPY] |
||||
|
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
[COPY] Please add additional copyright information _after_ the line containing |
||||
|
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
[COPY] |
||||
|
[COPY] ROCK Linux: rock-src/package/mnemoc/runit/runit.cache |
||||
|
[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
[COPY] |
||||
|
[COPY] This program is free software; you can redistribute it and/or modify |
||||
|
[COPY] it under the terms of the GNU General Public License as published by |
||||
|
[COPY] the Free Software Foundation; either version 2 of the License, or |
||||
|
[COPY] (at your option) any later version. A copy of the GNU General Public |
||||
|
[COPY] License can be found at Documentation/COPYING. |
||||
|
[COPY] |
||||
|
[COPY] Many people helped and are helping developing ROCK Linux. Please |
||||
|
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
[COPY] file for details. |
||||
|
[COPY] |
||||
|
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
[TIMESTAMP] 1064105482 Sat Sep 20 20:51:22 2003 |
||||
|
[CONFIG-ID] 2.0.0-rc2-x86-pentium2-32-mnemosyne-expert |
||||
|
[ROCKVER] 2.0.0-rc2 |
||||
|
|
||||
|
[LOGS] 1-runit.log 5-runit.log 9-runit.log |
||||
|
|
||||
|
[BUILDTIME] 5801 (9) |
||||
|
[SIZE] 1.84 MB, 86 files |
||||
|
|
||||
|
[DEP] bash binutils bzip2 ccache coreutils findutils gawk gcc33 glibc23 |
||||
|
[DEP] grep gzip linux24-header make runit sed sysfiles tar |
||||
|
|
||||
@ -0,0 +1,98 @@ |
|||||
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
# |
||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
# Please add additional copyright information _after_ the line containing |
||||
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
# |
||||
|
# ROCK Linux: rock-src/package/mnemoc/runit/runit.conf |
||||
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
# |
||||
|
# 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 2 of the License, or |
||||
|
# (at your option) any later version. A copy of the GNU General Public |
||||
|
# License can be found at Documentation/COPYING. |
||||
|
# |
||||
|
# Many people helped and are helping developing ROCK Linux. Please |
||||
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
# file for details. |
||||
|
# |
||||
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
prefix='' |
||||
|
set_confopt |
||||
|
|
||||
|
. $base/package/mnemoc/runit/djb-config |
||||
|
|
||||
|
pkg_runit_main() { |
||||
|
./package/compile |
||||
|
pkg_djb_installpackage admin $sbindir |
||||
|
|
||||
|
# main scripts and virtual consoles |
||||
|
if [ "`echo $sysconfdir/*`" == "$sysconfdir/*" ]; then |
||||
|
echo "Creating main scripts and virtual consoles..." |
||||
|
|
||||
|
mkdir -p $sysconfdir |
||||
|
cp -vp ./etc/debian/[123] $sysconfdir/ |
||||
|
cp -vp ./etc/debian/ctrlaltdel $sysconfdir/ |
||||
|
|
||||
|
local agettyargs |
||||
|
for i in 1 2 3 4 5 6; do |
||||
|
echo "Creating getty tty$i..." |
||||
|
mkdir -p $sysconfdir/getty-$i |
||||
|
if [ $i -eq 1 ]; then |
||||
|
agettyargs='-i -I '"'"'\012\015\012Maintenance Console:\012'"'" |
||||
|
else |
||||
|
agettyargs='-f /etc/issue.ansi' |
||||
|
fi |
||||
|
cat << EOT > $sysconfdir/getty-$i/run |
||||
|
#!/bin/sh |
||||
|
${pkg_djb_commanddir#$root}/utmpset -w vc/$i |
||||
|
exec /sbin/agetty $agettyargs 38400 vc/$i linux |
||||
|
EOT |
||||
|
chmod +x $sysconfdir/getty-$i/run |
||||
|
done |
||||
|
fi |
||||
|
|
||||
|
# getties to svscan |
||||
|
echo "Make getties available to svscan..." |
||||
|
for i in 1 2 3 4 5 6; do |
||||
|
ln -sfv ${sysconfdir%$root}/getty-$i $pkg_djb_servicedir/ |
||||
|
done |
||||
|
|
||||
|
if [ ${pkg_djb_commanddir} != $sbindir ]; then |
||||
|
echo "Copying init files to /sbin..." |
||||
|
cp -vf ${pkg_djb_commanddir}/runit* $sbindir/ |
||||
|
fi |
||||
|
|
||||
|
} |
||||
|
|
||||
|
pkg_runit_doc() { |
||||
|
if [ $createdocs -eq 1 ]; then |
||||
|
#rm -fv $docdir/debian $docdir/*.bak |
||||
|
|
||||
|
pkg_djb_installdoc admin |
||||
|
|
||||
|
gzip -9 ./man/*.8 |
||||
|
echo "Installing man pages ... " |
||||
|
cp -vf ./man/*.8.gz $mandir/man8/ |
||||
|
#cp -vf ./man/*.8 $mandir/man8/ |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
if [ $ROCKCFG_PKG_DJB_LAYOUT -eq 0 ]; then |
||||
|
hook_add prepatch 5 "for x in ./etc/debian/*; do \ |
||||
|
if [ -f $x ]; then \ |
||||
|
sed -e 's,/service,/etc/service,g' -e 's,/command:,,g' $x > $x.new ; \ |
||||
|
mv -f $x.new $x ; \ |
||||
|
fi ; \ |
||||
|
done" |
||||
|
fi |
||||
|
|
||||
|
sysconfdir="$sysconfdir/runit" |
||||
|
srcdir="admin/$pkg-$ver" |
||||
|
|
||||
|
custmain="pkg_runit_main" |
||||
|
postdoc="pkg_runit_doc" |
||||
|
|
||||
|
createdocs=1 |
||||
@ -0,0 +1,49 @@ |
|||||
|
|
||||
|
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
||||
|
[COPY] |
||||
|
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
||||
|
[COPY] Please add additional copyright information _after_ the line containing |
||||
|
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
||||
|
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
||||
|
[COPY] |
||||
|
[COPY] ROCK Linux: rock-src/package/mnemoc/runit/runit.desc |
||||
|
[COPY] ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
||||
|
[COPY] |
||||
|
[COPY] This program is free software; you can redistribute it and/or modify |
||||
|
[COPY] it under the terms of the GNU General Public License as published by |
||||
|
[COPY] the Free Software Foundation; either version 2 of the License, or |
||||
|
[COPY] (at your option) any later version. A copy of the GNU General Public |
||||
|
[COPY] License can be found at Documentation/COPYING. |
||||
|
[COPY] |
||||
|
[COPY] Many people helped and are helping developing ROCK Linux. Please |
||||
|
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
||||
|
[COPY] file for details. |
||||
|
[COPY] |
||||
|
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
||||
|
|
||||
|
[I] runit - a UNIX init scheme with service supervision |
||||
|
|
||||
|
[T] runit is a daemontools alike replacement for SysV-init and other init |
||||
|
[T] schemes. It currently runs on GNU/Linux, OpenBSD, FreeBSD, and can easily |
||||
|
[T] be adapted to other Unix operating systems. runit implements a simple |
||||
|
[T] three-stage concept. Stage 1 performs the system's one-time initialization |
||||
|
[T] tasks. Stage 2 starts the system's uptime services (via the runsvdir |
||||
|
[T] program). Stage 3 handles the tasks necessary to shutdown and halt or |
||||
|
[T] reboot. |
||||
|
|
||||
|
[U] http://smarden.org/runit/index.html |
||||
|
|
||||
|
[A] Gerrit Pape <pape@smarden.org> |
||||
|
[M] Alejandro Mery <amery@geeks.cl> |
||||
|
|
||||
|
[C] base/system |
||||
|
|
||||
|
[L] OpenSource |
||||
|
[S] Stable |
||||
|
[V] 0.11.1 |
||||
|
[P] O -1---5---9 700.000 |
||||
|
|
||||
|
[CV-URL] http://smarden.org/runit/install.html |
||||
|
|
||||
|
[D] 310056452 runit-0.11.1.tar.gz http://smarden.org/runit/ |
||||
|
|
||||