[zaptel-commits] branch 1.2 r1079 - in /branches/1.2: Makefile
build_tools/genmodconf
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Mon May 22 16:11:37 MST 2006
Author: kpfleming
Date: Mon May 22 18:11:36 2006
New Revision: 1079
URL: http://svn.digium.com/view/zaptel?rev=1079&view=rev
Log:
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:
branches/1.2/Makefile
branches/1.2/build_tools/genmodconf
Modified: branches/1.2/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.2/Makefile?rev=1079&r1=1078&r2=1079&view=diff
==============================================================================
--- branches/1.2/Makefile (original)
+++ branches/1.2/Makefile Mon May 22 18:11:36 2006
@@ -335,12 +335,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: branches/1.2/build_tools/genmodconf
URL: http://svn.digium.com/view/zaptel/branches/1.2/build_tools/genmodconf?rev=1079&r1=1078&r2=1079&view=diff
==============================================================================
--- branches/1.2/build_tools/genmodconf (original)
+++ branches/1.2/build_tools/genmodconf Mon May 22 18:11:36 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