From 8432646a760988838377945d29c98fd54c456476 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Wed, 24 Apr 2013 19:04:00 +0200 Subject: [PATCH] miniupnpd/genconfig.sh : to avoid build race conditions, use a temporary file --- miniupnpd/Changelog.txt | 5 ++++- miniupnpd/genconfig.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 08a46d9..3ef2d39 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,7 @@ -$Id: Changelog.txt,v 1.333 2013/04/20 09:03:17 nanard Exp $ +$Id: Changelog.txt,v 1.334 2013/04/24 17:03:16 nanard Exp $ + +2013/04/24: + to avoid build race conditions, genconfig.sh now use a temporary file 2013/04/20: use scope in get_lan_for_peer() for IPv6 addresses diff --git a/miniupnpd/genconfig.sh b/miniupnpd/genconfig.sh index 3e72848..8ff268b 100755 --- a/miniupnpd/genconfig.sh +++ b/miniupnpd/genconfig.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: genconfig.sh,v 1.61 2012/10/03 21:07:29 nanard Exp $ +# $Id: genconfig.sh,v 1.62 2013/04/24 17:03:16 nanard Exp $ # miniupnp daemon # http://miniupnp.free.fr or http://miniupnp.tuxfamily.org/ # (c) 2006-2012 Thomas Bernard @@ -29,7 +29,9 @@ esac done RM="rm -f" -CONFIGFILE="config.h" +MV="mv" +CONFIGFILE="config.h.tmp" +CONFIGFILE_FINAL="config.h" CONFIGMACRO="CONFIG_H_INCLUDED" # version reported in XML descriptions @@ -424,4 +426,6 @@ echo "" >> ${CONFIGFILE} echo "#endif" >> ${CONFIGFILE} +${MV} ${CONFIGFILE} ${CONFIGFILE_FINAL} + exit 0