postinst 712 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh -e
  2. action="$1"
  3. oldversion="$2"
  4. if [ "$action" != configure ]; then
  5. exit 0
  6. fi
  7. if [ -x /etc/init.d/rsync ]; then
  8. if dpkg --compare-versions "$oldversion" lt "3.0.7-2"; then
  9. update-rc.d -f rsync remove
  10. fi
  11. update-rc.d rsync start 50 2 3 4 5 . >/dev/null
  12. if [ -x /usr/sbin/invoke-rc.d ]; then
  13. invoke-rc.d rsync restart
  14. else
  15. /etc/init.d/rsync restart
  16. fi
  17. fi
  18. # # Remove shutdown and reboot links; this init script does not need them.
  19. # # The wildcards are needed as we can't predict the number anymore...
  20. # if dpkg --compare-versions "$oldversion" lt "3.0.7-2"; then
  21. # rm -f /etc/rc0.d/K??rsync /etc/rc1.d/K??rsync /etc/rc6.d/K??rsync
  22. # fi
  23. exit 0