From 9d3a1ca0073fe553c0921eb17234db3bff9970e5 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 28 Jun 2004 19:28:40 +0000 Subject: [PATCH] Shorewall 1.4.10f git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1423 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Lrp/usr/share/shorewall/functions | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Lrp/usr/share/shorewall/functions b/Lrp/usr/share/shorewall/functions index 46439c88e..73990d0d3 100644 --- a/Lrp/usr/share/shorewall/functions +++ b/Lrp/usr/share/shorewall/functions @@ -238,6 +238,31 @@ mktempfile() { fi } + +# +# create a temporary directory +# +mktempdir() { + + [ -z "$MKTEMP" ] && find_mktemp + + case "$MKTEMP" in + BSD) + mktemp -d /tmp/shorewall.XXXXXX + ;; + STD) + mktemp -td shorewall.XXXXXX + ;; + None) + mkdir /tmp/shorewall-$$ && echo /tmp/shorewall-$$ + ;; + *) + echo " ERROR:Internal error in mktempdir" + ;; + esac +} + + # # Read a file and handle "INCLUDE" directives #