From 132b77f93ddac621e2ae6ef32b67b3762c951ee8 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Fri, 16 Oct 2015 19:55:39 +0000 Subject: [PATCH] Drop usage of TMPDIR. While here, stop refering to /tmp/sysmerge.XXXXXXXXXX, that's a script internal we don't need to know about. --- usr.sbin/sysmerge/sysmerge.8 | 16 ++++------------ usr.sbin/sysmerge/sysmerge.sh | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/usr.sbin/sysmerge/sysmerge.8 b/usr.sbin/sysmerge/sysmerge.8 index 8c9ea75125f..4fc4713ba64 100644 --- a/usr.sbin/sysmerge/sysmerge.8 +++ b/usr.sbin/sysmerge/sysmerge.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysmerge.8,v 1.73 2015/09/18 17:03:44 ajacoutot Exp $ +.\" $OpenBSD: sysmerge.8,v 1.74 2015/10/16 19:55:39 ajacoutot Exp $ .\" .\" Copyright (c) 2008 Antoine Jacoutot .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 18 2015 $ +.Dd $Mdocdate: October 16 2015 $ .Dt SYSMERGE 8 .Os .Sh NAME @@ -33,9 +33,7 @@ script designed to help the administrator update configuration files after upgrading to a new release or snapshot. .Pp .Nm -works by comparing the reference root directory -.Pa ${TMPDIR}/sysmerge.XXXXXXXXXX -against currently installed files. +works by comparing a reference root directory against currently installed files. .Pp .Nm will work through the fileset, @@ -137,15 +135,9 @@ the default is .Xr vi 1 . .It Ev PAGER Specifies the pagination program to use. -.It Ev TMPDIR -Path in which to store temporary files. -If unset, this defaults to -.Pa /tmp . .El .Sh FILES -.Bl -tag -width "${TMPDIR}/sysmerge.XXXXXXXXXX" -compact -.It Pa ${TMPDIR}/sysmerge.XXXXXXXXXX -Directory in which the reference root directory is created. +.Bl -tag -width "/var/sysmerge/xetc.tgz" -compact .It Pa /etc/sysmerge.ignore Files and directories to ignore from comparison. .It Pa /var/sysmerge/backups diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh index 6e9bedd8b67..4498d746d16 100644 --- a/usr.sbin/sysmerge/sysmerge.sh +++ b/usr.sbin/sysmerge/sysmerge.sh @@ -1,6 +1,6 @@ #!/bin/ksh - # -# $OpenBSD: sysmerge.sh,v 1.214 2015/10/13 18:52:56 ajacoutot Exp $ +# $OpenBSD: sysmerge.sh,v 1.215 2015/10/16 19:55:39 ajacoutot Exp $ # # Copyright (c) 2008-2014 Antoine Jacoutot # Copyright (c) 1998-2003 Douglas Barton @@ -613,7 +613,7 @@ shift $(( OPTIND -1 )) # global constants _BKPDIR=/var/sysmerge/backups _RELINT=$(uname -r | tr -d '.') || exit 1 -_TMPROOT=$(mktemp -d -p ${TMPDIR:=/tmp} sysmerge.XXXXXXXXXX) || exit 1 +_TMPROOT=$(mktemp -d -p /tmp sysmerge.XXXXXXXXXX) || exit 1 readonly _BKPDIR _RELINT _TMPROOT [[ -z ${VISUAL} ]] && EDITOR=${EDITOR:=/usr/bin/vi} || EDITOR=${VISUAL} -- 2.20.1