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

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/mnemoc/runit/runit.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. prefix=''
  23. set_confopt
  24. . $base/package/mnemoc/runit/djb-config
  25. pkg_runit_main() {
  26. ./package/compile
  27. pkg_djb_installpackage admin $sbindir
  28. # main scripts and virtual consoles
  29. if [ "`echo $sysconfdir/*`" == "$sysconfdir/*" ]; then
  30. echo "Creating main scripts and virtual consoles..."
  31. mkdir -p $sysconfdir
  32. cp -vp ./etc/debian/[123] $sysconfdir/
  33. cp -vp ./etc/debian/ctrlaltdel $sysconfdir/
  34. local agettyargs
  35. for i in 1 2 3 4 5 6; do
  36. echo "Creating getty tty$i..."
  37. mkdir -p $sysconfdir/getty-$i
  38. if [ $i -eq 1 ]; then
  39. agettyargs='-i -I '"'"'\012\015\012Maintenance Console:\012'"'"
  40. else
  41. agettyargs='-f /etc/issue.ansi'
  42. fi
  43. cat << EOT > $sysconfdir/getty-$i/run
  44. #!/bin/sh
  45. ${pkg_djb_commanddir#$root}/utmpset -w vc/$i
  46. exec /sbin/agetty $agettyargs 38400 vc/$i linux
  47. EOT
  48. chmod +x $sysconfdir/getty-$i/run
  49. done
  50. fi
  51. # getties to svscan
  52. echo "Make getties available to svscan..."
  53. for i in 1 2 3 4 5 6; do
  54. ln -sfv ${sysconfdir%$root}/getty-$i $pkg_djb_servicedir/
  55. done
  56. if [ ${pkg_djb_commanddir} != $sbindir ]; then
  57. echo "Copying init files to /sbin..."
  58. cp -vf ${pkg_djb_commanddir}/runit* $sbindir/
  59. fi
  60. }
  61. pkg_runit_doc() {
  62. if [ $createdocs -eq 1 ]; then
  63. #rm -fv $docdir/debian $docdir/*.bak
  64. pkg_djb_installdoc admin
  65. gzip -9 ./man/*.8
  66. echo "Installing man pages ... "
  67. cp -vf ./man/*.8.gz $mandir/man8/
  68. #cp -vf ./man/*.8 $mandir/man8/
  69. fi
  70. }
  71. if [ $ROCKCFG_PKG_DJB_LAYOUT -eq 0 ]; then
  72. hook_add prepatch 5 "for x in ./etc/debian/*; do \
  73. if [ -f $x ]; then \
  74. sed -e 's,/service,/etc/service,g' -e 's,/command:,,g' $x > $x.new ; \
  75. mv -f $x.new $x ; \
  76. fi ; \
  77. done"
  78. fi
  79. sysconfdir="$sysconfdir/runit"
  80. srcdir="admin/$pkg-$ver"
  81. custmain="pkg_runit_main"
  82. postdoc="pkg_runit_doc"
  83. createdocs=1