diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-04-05 04:12:12 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-04-05 04:12:12 +0000 |
commit | 812ac2d417f2798532f732e033002e28829dddf3 (patch) | |
tree | c15b2d848260ff865904213131d4fd08ac8e960b /Makefile | |
parent | 4591cf1a44de298a42eb9bd2c07528b7cca1a932 (diff) |
only attempt to run chkconfig if we can find it (bug #3955)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@617 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -50,6 +50,10 @@ ifeq (${BUILDVER},linux26) DYNFS=$(shell ps ax | grep -v grep | grep udevd && echo "yes") endif +CHKCONFIG=$(shell sh -c 'type -p chkconfig' 2> /dev/null) +ifeq ($(CHKCONFIG),) +CHKCONFIG=: +endif TZOBJS=zonedata.lo tonezone.lo LIBTONEZONE=libtonezone.so.1.0 @@ -315,7 +319,6 @@ install: all devices $(LIBTONEZONE) if ! grep "alias char-major-196" $(MODCONF); then \ echo "alias char-major-196 $(PRIMARY)" >> $(MODCONF); \ fi - for x in $(MODULES); do \ if ! grep -q "post-install $$x" $(MODCONF); then \ if ! grep -q "install $$x " $(MODCONF); then \ @@ -340,10 +343,10 @@ install: all devices $(LIBTONEZONE) config: if [ -d $(INSTALL_PREFIX)/etc/rc.d/init.d ]; then \ install -D -m 755 zaptel.init $(INSTALL_PREFIX)/etc/rc.d/init.d/zaptel; \ - chkconfig --add zaptel; \ + $(CHKCONFIG) --add zaptel; \ elif [ -d $(INSTALL_PREFIX)/etc/init.d ]; then \ install -D -m 755 zaptel.init $(INSTALL_PREFIX)/etc/init.d/zaptel; \ - chkconfig --add zaptel; \ + $(CHKCONFIG) --add zaptel; \ fi if [ -d /etc/default ] && [ ! -f /etc/default/zaptel ]; then \ install -D -m 644 zaptel.sysconfig $(INSTALL_PREFIX)/etc/default/zaptel; \ @@ -362,7 +365,7 @@ update: else \ echo "Not CVS"; \ fi - + clean: rm -f torisatool makefw tor2fw.h radfw.h rm -f ${BINS} |