[debian-edu-commits] debian-edu/ 23/30: debian/educlient.postinst: Don't process files again if already processed.
Mike Gabriel
sunweaver at debian.org
Fri Oct 9 03:44:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch multi-distro-support
in repository educlient.
commit b655020383f9980cf89bde3550228127ce58c52b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Tue Aug 25 19:47:25 2015 +0200
debian/educlient.postinst: Don't process files again if already processed.
---
debian/educlient.postinst | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/debian/educlient.postinst b/debian/educlient.postinst
index 49f7292..528d530 100755
--- a/debian/educlient.postinst
+++ b/debian/educlient.postinst
@@ -62,6 +62,12 @@ for working_dir in ${ETC_DISTRIB_VERSION} ${ETC_DISTRIB_COMMON} ${ETC_COMMON};
COPY_DIVERT_FILES=$(find . -type f | cut -c 3-)
for i in $COPY_DIVERT_FILES
do
+
+ # already processed this file, than skip
+ if grep -q "/etc/$i" /etc/debian-edu/educlient.files-*; then
+ continue
+ fi
+
if [ -e "/etc/$i" ]; then
# remove previously made diversions
@@ -72,13 +78,13 @@ for working_dir in ${ETC_DISTRIB_VERSION} ${ETC_DISTRIB_COMMON} ${ETC_COMMON};
dpkg-divert --package educlient --add --divert /etc/$i.educlient-orig --rename /$i
echo "dpkg-divert --package educlient --add --divert /etc/$i.educlient-orig --rename /etc/$i"
ln -s ${working_dir}/etc/$i /etc/$i
- echo "ln -s ${working_dir}/etc/$i /etc/$i"
+ echo "ln -s ${working_dir}/$i /etc/$i"
echo /etc/$i >> /etc/debian-edu/educlient.files-diverted
else
cp ${working_dir}/etc/$i /etc/$i
- echo "cp ${working_dir}/etc/$i /etc/$i"
+ echo "cp ${working_dir}/$i /etc/$i"
echo /etc/$i >> /etc/debian-edu/educlient.files-added
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/educlient.git
More information about the debian-edu-commits
mailing list