[zaptel-commits] sruffell: branch 1.4 r3271 - /branches/1.4/Makefile

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Nov 30 18:06:04 CST 2007


Author: sruffell
Date: Fri Nov 30 18:06:04 2007
New Revision: 3271

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3271
Log:
Delete the old kernel modules before installing the new ones.  
Prevents conflicts in case the location of the driver changes 
when upgrading from an older version of the driver.

Modified:
    branches/1.4/Makefile

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=3271&r1=3270&r2=3271
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Fri Nov 30 18:06:04 2007
@@ -543,6 +543,15 @@
 	$(INSTALL) -d $(DESTDIR)$(MOD_DIR)
 	$(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
 else
+	@# Delete any existing drivers before installing the new ones.  This
+	@# prevents problems when upgrading from a previous version of zaptel 
+	@# where the drivers may have been in a different location. In this
+	@# case, when depmod is run, the old drivers may be found and used
+	@# before the new drivers.
+	@for mod in $(INSTALL_MODULES); do \
+		rm -f `cat $(DESTDIR)/lib/modules/$(KVERS)/modules.dep | \
+			cut -d : -f 1 | grep -m 1 $$mod`; \
+	done;
 	$(KMAKE_INST)
   ifneq (,$(wildcard datamods/syncppp.ko))
 	$(MAKE) -C datamods install




More information about the zaptel-commits mailing list