Skip to content
Browse files

In the Mageia 2 user dont see the document in the preview area (i hav…

…e only a grey window)

Changed temporary path from /tmp to ~/.cache
  • Loading branch information...
1 parent 4836bfb commit 100034774f70945395b3270303b90eb9e613e25f @SokoloffA SokoloffA committed Feb 27, 2013
Showing with 20 additions and 11 deletions.
  1. +20 −11 cups/boomaga
View
31 cups/boomaga
@@ -7,8 +7,6 @@
#
-TMP_DIR="/tmp"
-
CUPS_BACKEND_OK=0
CUPS_BACKEND_FAILED=1
@@ -29,15 +27,7 @@ user=$2
title=$3
count=$4
options=$5
-psFile=$6
-
-if [ -z ${psFile} ];
-then
- psFile=${TMP_DIR}/boomaga_in_file-${jobID}.ps
- cat - > ${psFile}
-fi
-chown ${user} ${psFile}
-
+inputFile=$6
uid=$(getent passwd ${user} | cut -d':' -f 3)
homeDir=$(getent passwd ${user} | cut -d':' -f 6)
@@ -57,6 +47,25 @@ fi
echo "DEBUG: User: $user" >&2
echo "DEBUG: Uid: $uid" >&2
+psFileDir=${homeDir}/.cache
+psFile=${psFileDir}/boomaga_in_file-${jobID}.ps
+
+if [ ! -d ${psFileDir} ];
+then
+ mkdir ${psFileDir}
+ chmod 700 ${psFileDir}
+ chown ${user} ${psFileDir}
+fi
+
+if [ -z ${inputFile} ];
+then
+ cat - > ${psFile}
+else
+ cp ${inputFile} ${psFile}
+fi
+chown ${user} ${psFile}
+
+
oldIfs=$IFS
IFS=$(echo -en "\n")
while read line; do

0 comments on commit 1000347

Please sign in to comment.
Something went wrong with that request. Please try again.