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.

63 lines
2.0 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/parse-config
  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. #
  23. # prepare root links for DJB filesystem hierarchy inside chrooted env.
  24. #
  25. if [ "$ROCKCFG_PKG_DJB_LAYOUT" == "1" ]; then
  26. for x in package service command; do
  27. mkdir -p $xroot/$x
  28. var_append flistroot ' ' $x
  29. done
  30. if [ "$pkg" == "runit" ]; then
  31. hook_add premake 1 'for x in package service command; do \
  32. add_flist $xroot/$x/; \
  33. done ; \
  34. chmod 1755 $xroot/package'
  35. fi
  36. elif [ "$ROCKCFG_PKG_DJB_LAYOUT" == "0" ]; then
  37. mkdir -p $xroot/var/service
  38. if [ "$pkg" == "runit" ]; then
  39. hook_add premake 1 'add_flist $xroot/var/service'
  40. fi
  41. fi
  42. #
  43. # add init scripts
  44. #
  45. if pkgcheck runit X; then
  46. runitconfdir=$base/package/mnemoc/runit
  47. for x in $( cd $runitconfdir/packages; ls -1 $pkg-*.txt 2> /dev/null ); do
  48. y=${x#$pkg-}; y=${y%.txt}; y=${y//_/\/}
  49. if [ "${y#runit-}" != "$y" ]; then
  50. y=\$root/etc/runit/${y#runit-}
  51. else
  52. y=\$sysconfdir/$y
  53. fi
  54. echo_status "runit: Setting conf to install $y"
  55. hook_add postmake 8 "mkdir -p ${y%/*}; \
  56. rock_substitute $runitconfdir/packages/$x > $y; \
  57. chmod 744 $y;"
  58. done
  59. unset runitconfdir
  60. fi