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.

58 lines
1.6 KiB

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