- 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
+ 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
+
+endif
+
+#
+# checking for "Debian" style sysv scripts:
+#
+
+if USE_DEBIAN
+
+sysvdir = $(DESTDIR)$(sysconfdir)/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 $(DESTDIR)$(sysconfdir)/init.d/atalk
+ update-rc.d atalk remove
+
+endif
+
+#
+# defaults, no init scripts installed
+#
+
+if USE_UNDEF
+
+install-data-hook: