From a80b3812747a9837bcb27e9a7f5768abd978b072 Mon Sep 17 00:00:00 2001 From: dougb Date: Fri, 21 Dec 2007 19:34:26 +0000 Subject: In the following scenario: 1. Start mergemaster 2. Interrupt it 3. < Somehow the temproot directory disappears > 4. mergemaster -r Many bad things can happen, especially if the -i option is in use. Therefore, add a check to make sure it still exists before we start comparing files. Brought to my attention by: PR: bin/40538 Submitted by: Cyrille Lefevre --- usr.sbin/mergemaster/mergemaster.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index e73bf0d..e21d466 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -838,6 +838,13 @@ mm_install () { return $? } +if [ ! -d "${TEMPROOT}" ]; then + echo "*** FATAL ERROR: The temproot directory (${TEMPROOT})" + echo ' has disappeared!' + echo '' + exit 1 +fi + echo '' echo "*** Beginning comparison" echo '' -- cgit v1.1