OpenSDE Packages Database (without history before r20070)
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.

62 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../bcron/bcron.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. # This package is mutually exclusive with cron.
  16. if pkginstalled cron; then
  17. echo_error "CLASH: cron and $pkg don't go together."
  18. fi
  19. pkgprefix -t bglibs
  20. sysconfdir=$sysconfdir/$pkg
  21. bcron_bglibsconf() {
  22. echo $root$( pkgprefix libdir bglibs ) > conf-bglibs
  23. echo $root$( pkgprefix includedir bglibs ) > conf-bgincs
  24. echo $root$bindir > conf-bin
  25. }
  26. # to get rid of the ./installer we patched the makefile to use
  27. # normal installing procedures
  28. var_append makeinstopt ' ' BINDIR=$root$bindir
  29. bcron_prepare() {
  30. local spool=$root/var/spool/cron
  31. mkdir -p $spool/{crontabs,tmp}
  32. [ -e $spool/trigger ] || mkfifo $spool/trigger
  33. add_flist $spool/trigger
  34. for i in crontabs tmp trigger; do
  35. chown 53:53 $spool/$i
  36. chmod go-rwx $spool/$i
  37. done
  38. }
  39. bcron_install_cron() {
  40. local crondir=$confdir/../cron
  41. cp $crondir/crontab $root/etc/
  42. cp $crondir/cron.run.sh $root/usr/sbin/cron.run
  43. chmod 600 $root/etc/crontab
  44. chmod 755 $root/usr/sbin/cron.run
  45. }
  46. hook_add preconf 1 'bcron_bglibsconf'
  47. hook_add postmake 5 'bcron_prepare'
  48. hook_add postmake 6 'bcron_install_cron'
  49. for y in $( ls -1 package/*/cron/*.cron 2> /dev/null ); do
  50. hook_add postinstall 6 "install_cron '$y'"
  51. done