[zaptel-commits] trunk r1080 - in /trunk: ./ Makefile build_tools/genmodconf

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Mon May 22 16:12:08 MST 2006


Author: kpfleming
Date: Mon May 22 18:12:07 2006
New Revision: 1080

URL: http://svn.digium.com/view/zaptel?rev=1080&view=rev
Log:
Merged revisions 1079 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r1079 | kpfleming | 2006-05-22 18:11:36 -0500 (Mon, 22 May 2006) | 4 lines

make a backup even when modifying non-combined rules files
generate a warning about editing non-combined rules files
ensure that the warning is the last output from the 'make install' process

........

Modified:
    trunk/   (props changed)
    trunk/Makefile
    trunk/build_tools/genmodconf

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.2-merged (original)
+++ branch-1.2-merged Mon May 22 18:12:07 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-916,918-936,938-949,958,962,970,990,1004,1011,1017,1031,1033,1060,1062,1064-1066,1069,1071,1076
+/branches/1.2:1-916,918-936,938-949,958,962,970,990,1004,1011,1017,1031,1033,1060,1062,1064-1066,1069,1071,1076,1079

Modified: trunk/Makefile
URL: http://svn.digium.com/view/zaptel/trunk/Makefile?rev=1080&r1=1079&r2=1080&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Mon May 22 18:12:07 2006
@@ -356,12 +356,12 @@
 	install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
 	install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
 	install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
-	build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel,$(MODULES))"
-	if [ -d /etc/modutils ]; then \
-		/sbin/update-modules ; \
-	fi
 	[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
 	[ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
+	build_tools/genmodconf $(BUILDVER) "$(ROOT_PREFIX)" "$(filter-out zaptel,$(MODULES))"
+	@if [ -d /etc/modutils ]; then \
+		/sbin/update-modules ; \
+	fi
 
 install-udev: devices
 

Modified: trunk/build_tools/genmodconf
URL: http://svn.digium.com/view/zaptel/trunk/build_tools/genmodconf?rev=1080&r1=1079&r2=1080&view=diff
==============================================================================
--- trunk/build_tools/genmodconf (original)
+++ trunk/build_tools/genmodconf Mon May 22 18:12:07 2006
@@ -36,7 +36,7 @@
 	target=${2}/etc/modutils/zaptel
     elif [ -f ${2}/etc/modules.conf ]; then
 	target=${2}/etc/modules.conf
-	backup=1
+	combined=1
     else
 	echo No suitable location for module rules can be found... exiting.
 	exit 1
@@ -52,10 +52,10 @@
 	target=${2}/etc/modules.d/zaptel
     elif [ -f ${2}/etc/modprobe.conf ]; then
 	target=${2}/etc/modprobe.conf
-	backup=1
+	combined=1
     elif [ -f ${2}/etc/conf.modules ]; then
 	target=${2}/etc/conf.modules
-	backup=1
+	combined=1
     else
 	echo No suitable location for module rules can be found... exiting.
 	exit 1
@@ -65,13 +65,15 @@
     exit 1
 fi
 
-if [ -n "${backup}" ]; then
+if [ -n "${combined}" ]; then
     if [ -f ${target} ]; then
 	mv ${target} ${target}.bak
 	cat ${target}.bak | grep -v "alias char-major-250" | grep -v "alias char-major-196" > ${target}	
     fi
 else
-    rm -f ${target}
+    if [ -f ${target} ]; then
+	mv ${target} ${target}.bak
+    fi
     echo "# automatically generated file; do not edit" > ${target}
 fi
 
@@ -98,3 +100,15 @@
     echo "alias wct2xxp wct4xxp" >> ${target};
 fi;
     
+if [ -z "${combined}" ]; then
+    echo "***"
+    echo "*** WARNING:"
+    echo "*** If you had custom settings in ${target},"
+    echo "*** they have been moved to ${target}.bak."
+    echo "***"
+    echo "*** In the future, do not edit ${target}, but"
+    echo "*** instead put your changes in another file"
+    echo "*** in the same directory so that they will not"
+    echo "*** be overwritten by future Zaptel updates."
+    echo "***"
+fi



More information about the zaptel-commits mailing list