[ previous ] [ next ] [ threads ]
 To :  Yate mailing list <yate@v...>
 From :  Philipp Kempgen <philipp.kempgen@a...>
 Subject :  Re: [yate] init.d
 Date :  Tue, 02 Sep 2008 20:38:53 +0200
Diana Cionoiu schrieb:
> That's because we have no idea how to do them for other distro's. :)

> On Mon, 1 Sep 2008, Philipp Kempgen wrote:
> 
>> What do you think about providing init.d scripts in the packing
>> directory or in contrib?
>> (I know it's the job of the package maintener, that's why I say
>> contrib.)
>> I've seen packing/yate.init but that's RedHat-style only.

Here's what I've come up with
http://www2.amooma.com/philipp/yate.init.debian.txt

I'd love to see something like this in the Makefile:

install-init: check-root
	@if [ -f /etc/debian_version ]; then \
		$(INSTALL) -m 755 packaging/init.d/debian $(DESTDIR)/etc/init.d/yate; \
		if [ -z "$(DESTDIR)" ]; then /usr/sbin/update-rc.d yate start 80 2 3 4 5 . stop 20 0 1 6 .; fi; \
	elif [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
		$(INSTALL) -m 755 packaging/init.d/redhat $(DESTDIR)/etc/init.d/yate; \
		if [ -z "$(DESTDIR)" ]; then /sbin/chkconfig --add yate; fi; \
	else \
		echo "Sorry, we do not have an init script for your distribution."; \
	fi


   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
--