+install-data-hook:
+
+uninstall-hook:
+
+uninstall-startup: uninstall-am
+
+endif
+
+#
+# checking for NetBSD init scripts
+#
+
+if USE_NETBSD
+
+sysvdir = $(DESTDIR)$(sysconfdir)/rc.d
+sysv_SCRIPTS = afpd atalkd papd timelord
+
+afpd: rc.afpd.netbsd
+ cp -f $< $@
+
+atalkd: rc.atalkd.netbsd
+ cp -f $< $@
+ chmod a+x $@
+
+papd: rc.papd.netbsd
+ cp -f $< $@
+ chmod a+x $@
+
+timelord: rc.timelord.netbsd
+ cp -f $< $@
+ chmod a+x $@
+
+install-data-hook:
+
+uninstall-hook:
+
+uninstall-startup: uninstall-am
+
+endif
+
+#
+# checking for Solaris init scripts
+#
+
+if USE_SOLARIS
+
+sysvdir = $(DESTDIR)$(sysconfdir)/init.d
+sysv_SCRIPTS = atalk
+
+atalk: rc.atalk.sysv
+ cp -f rc.atalk.sysv $@
+ chmod a+x $@
+
+install-data-hook:
+ rm -f $(DESTDIR)$(sysconfdir)/rc2.d/S90atalk
+ -ln -s ../init.d/atalk $(DESTDIR)$(sysconfdir)/rc2.d/S90atalk
+ rm -f $(DESTDIR)$(sysconfdir)/rc0.d/K04atalk
+ -ln -s ../init.d/atalk $(DESTDIR)$(sysconfdir)/rc0.d/K04atalk
+
+uninstall-startup:
+ rm -f $(DESTDIR)$(sysconfdir)/init.d/atalk \
+ $(DESTDIR)$(sysconfdir)/rc2.d/S90atalk \
+ $(DESTDIR)$(sysconfdir)/rc0.d/K04atalk
+
+endif
+
+#
+# checking for "Gentoo" style sysv scripts:
+#
+
+if USE_GENTOO
+
+sysvdir = $(DESTDIR)$(sysconfdir)/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 $(DESTDIR)$(sysconfdir)/init.d/atalk
+