[DRE-commits] [chef] 10/17: Don't create a temporary file unless we're going to use it
Stefano Rivera
stefano at rivera.za.net
Wed Jan 15 15:55:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
stefanor pushed a commit to branch master
in repository chef.
commit 0e8f3393fa395f3dfdd428a8f5c8998c945135d9
Author: Stefano Rivera <stefanor at debian.org>
Date: Fri Jan 10 00:08:28 2014 +0200
Don't create a temporary file unless we're going to use it
---
debian/chef.postinst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/chef.postinst b/debian/chef.postinst
index 95e2644..fce3b55 100644
--- a/debian/chef.postinst
+++ b/debian/chef.postinst
@@ -6,12 +6,12 @@ set -e
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
TEMPLATE=/usr/share/chef/client.rb
-TMPFILE=`mktemp`
CONFIGFILE=/etc/chef/client.rb
case "$1" in
configure|reconfigure)
db_get chef/chef_server_url && server_url="$RET"
+ TMPFILE=`mktemp`
if [ -n "$server_url" ]; then
sed "s#chef_server_url \".*\"#chef_server_url \"$server_url\"#" $TEMPLATE > $TMPFILE
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/chef.git
More information about the Pkg-ruby-extras-commits
mailing list