summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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