summaryrefslogtreecommitdiff
blob: e8f5c7e245f96e1d4bf6190ac365c8fddb493ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff -Nru mgetty-1.1.36.orig/fax/faxspool.in mgetty-1.1.36/fax/faxspool.in
--- mgetty-1.1.36.orig/fax/faxspool.in	2008-08-31 13:06:48.000000000 +0000
+++ mgetty-1.1.36/fax/faxspool.in	2008-09-07 09:44:01.000000000 +0000
@@ -675,9 +675,7 @@
     if [ x$file = x- ]
     then
 	$echo "spooling $file (stdin)..."
-	trap "rm /tmp/faxsp.$$" 0
-        cat - >/tmp/faxsp.$$
-	file=/tmp/faxsp.$$
+	file=$spooldir/faxsp
     else
 	$echo "spooling $file..."
     fi
@@ -924,7 +922,7 @@
 then
     $echo "\nnothing to do (no cover page, no data)." >&2
     cd $FAX_SPOOL_OUT
-    rmdir $spooldir
+    rm -rf $spooldir
     exit 52
 fi
 
@@ -965,7 +963,7 @@
 # clean up
 rm $job.q
 cd ..
-rmdir $spooldir
+rm -rf $spooldir
 
 if [ -z "`find $LAST_RUN -ctime -1 -print 2>/dev/null`" ]
 then