+install-data-hook:
+
+uninstall-hook:
+
+uninstall-startup: uninstall-am
+
+endif
+
+#
+# checking for Solaris init scripts
+#
+
+if USE_SOLARIS
+
+sysvdir = /etc/init.d
+sysv_SCRIPTS = atalk
+
+atalk: rc.atalk.sysv
+ cp -f rc.atalk.sysv $@
+ chmod a+x $@
+
+install-data-hook:
+ rm -f /etc/rc2.d/S90atalk
+ -ln -s ../init.d/atalk /etc/rc2.d/S90atalk
+ rm -f /etc/rc0.d/K04atalk
+ -ln -s ../init.d/atalk /etc/rc0.d/K04atalk
+
+uninstall-startup:
+ rm -f /etc/init.d/atalk /etc/rc2.d/S90atalk /etc/rc0.d/K04atalk
+
+endif
+
+#
+# checking for "Gentoo" style sysv scripts:
+#
+
+if USE_GENTOO
+
+sysvdir = /etc/init.d
+sysv_SCRIPTS = atalk
+
+atalk: rc.atalk.gentoo
+ cp -f rc.atalk.gentoo atalk
+ chmod a+x atalk
+
+install-data-hook:
+ -rc-update add atalk default
+
+uninstall-startup:
+ -rc-update del atalk default
+ rm -f /etc/init.d/atalk
+
+endif
+
+#
+# checking for "Debian" style sysv scripts:
+#
+
+if USE_DEBIAN
+
+sysvdir = /etc/init.d
+sysv_SCRIPTS = atalk
+
+atalk: rc.atalk.debian
+ cp -f rc.atalk.debian atalk
+ chmod a+x atalk
+
+install-data-hook:
+ update-rc.d atalk defaults 90 10
+
+uninstall-startup:
+ rm -f /etc/init.d/atalk
+ update-rc.d atalk remove
+
+endif
+
+#
+# defaults, no init scripts installed
+#
+
+if USE_UNDEF
+
+install-data-hook:
+
+uninstall-hook:
+
+uninstall-startup: uninstall-am
+