mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

98 lines
2.7 KiB

# --- 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