Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rc): make sure to clean up tmp rc.conf #264

Merged
merged 1 commit into from Aug 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/freenas/etc/rc.conf.local
Expand Up @@ -769,9 +769,10 @@ if [ ! "${_NEWSUM}" = "${_OLDSUM}" -a ! -f "${NEED_UPDATE_SENTINEL}" ]; then
# this script possible, e.g. devd carp script
# To make it atomic generate to a tmp file first then move it.
# See #23047
tmpfile=$(/usr/bin/mktemp /var/tmp/rc.conf.XXXXXXXXX)
tmpfile=$(/usr/bin/mktemp /var/tmp/rc.conf.tmp.XXXXXXXXX)
_gen_conf > ${tmpfile}
mv ${tmpfile} ${FREENAS_RC}
rm -f /var/tmp/rc.conf.tmp.*
echo ${_NEWSUM} > ${FREENAS_CONFIG_MD5}
fi

Expand Down