Skip to content

Commit

Permalink
miniupnpd/genconfig.sh : to avoid build race conditions, use a tempor…
Browse files Browse the repository at this point in the history
…ary file
  • Loading branch information
miniupnp committed Apr 24, 2013
1 parent e21e724 commit 8432646
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion 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
Expand Down
8 changes: 6 additions & 2 deletions 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -424,4 +426,6 @@ echo "" >> ${CONFIGFILE}

echo "#endif" >> ${CONFIGFILE}

${MV} ${CONFIGFILE} ${CONFIGFILE_FINAL}

exit 0

0 comments on commit 8432646

Please sign in to comment.