summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-22 23:12:07 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-05-22 23:12:07 +0000
commit9ed7100299999ec8bfb0c62467f3362627a9f9c5 (patch)
treeddfd5680291099b1614f7c136a62890bf95f5578
parent117fcbf3e26236b41ec3fb932e4f73b4b34f289e (diff)
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 ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1080 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--Makefile6
-rwxr-xr-xbuild_tools/genmodconf24
2 files changed, 22 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index fe1a24d..b13b1dc 100644
--- a/Makefile
+++ b/Makefile
@@ -356,12 +356,12 @@ endif
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
+ [ `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 \
+ @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)
install-udev: devices
diff --git a/build_tools/genmodconf b/build_tools/genmodconf
index cafc869..32435ee 100755
--- a/build_tools/genmodconf
+++ b/build_tools/genmodconf
@@ -36,7 +36,7 @@ if [ "${1}" == "linux24" ]; then
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 @@ elif [ "${1}" == "linux26" ]; then
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 @@ else
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 @@ if ! grep -q "alias wct2xxp" ${target}; then
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