summaryrefslogtreecommitdiff
blob: b0998f4201798e71a22448f1c473005daee473d0 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
===================================================================
RCS file: /cvsroot/firehol/firehol/firehol.sh,v
retrieving revision 1.224
retrieving revision 1.226
diff -u -r1.224 -r1.226
--- firehol/firehol/firehol.sh	2005/01/24 22:24:48	1.224
+++ firehol/firehol/firehol.sh	2005/01/25 21:28:19	1.226
@@ -10,7 +10,7 @@
 #
 # config: /etc/firehol/firehol.conf
 #
-# $Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+# $Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 #
 
 # Make sure only root can run us.
@@ -114,7 +114,7 @@
 # Find our minor version
 firehol_minor_version() {
 ${CAT_CMD} <<"EOF" | ${CUT_CMD} -d ' ' -f 3 | ${CUT_CMD} -d '.' -f 2
-$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 EOF
 }
 
@@ -144,7 +144,7 @@
 # Directories and files
 
 # These files will be created and deleted during our run.
-FIREHOL_DIR="/tmp/firehol-tmp-$$"
+FIREHOL_DIR="/tmp/.firehol-tmp-$$-${RANDOM}-${RANDOM}"
 FIREHOL_CHAINS_DIR="${FIREHOL_DIR}/chains"
 FIREHOL_OUTPUT="${FIREHOL_DIR}/firehol-out.sh"
 FIREHOL_SAVED="${FIREHOL_DIR}/firehol-save.sh"
@@ -211,7 +211,7 @@
 # Externally defined services can be placed in "${FIREHOL_CONFIG_DIR}/services/"
 if [ ! -d "${FIREHOL_CONFIG_DIR}/services" ]
 then
-	"${MKDIR_CMD}" -p "${FIREHOL_CONFIG_DIR}/services"
+	"${MKDIR_CMD}" "${FIREHOL_CONFIG_DIR}/services"
 	if [ $? -ne 0 ]
 	then
 		echo >&2
@@ -239,14 +239,14 @@
 		exit 1
 	fi
 fi
-"${MKDIR_CMD}" -p "${FIREHOL_DIR}"				|| exit 1
-"${MKDIR_CMD}" -p "${FIREHOL_CHAINS_DIR}"			|| exit 1
+"${MKDIR_CMD}" "${FIREHOL_DIR}"				|| exit 1
+"${MKDIR_CMD}" "${FIREHOL_CHAINS_DIR}"			|| exit 1
 
 
 # Make sure we have a directory for our data.
 if [ ! -d "${FIREHOL_SPOOL_DIR}" ]
 then
-	"${MKDIR_CMD}" -p "${FIREHOL_SPOOL_DIR}"		|| exit 1
+	"${MKDIR_CMD}" "${FIREHOL_SPOOL_DIR}"			|| exit 1
 	"${CHOWN_CMD}" root:root "${FIREHOL_CONFIG_DIR}"	|| exit 1
 	"${CHMOD_CMD}" 700 "${FIREHOL_CONFIG_DIR}"		|| exit 1
 fi
@@ -1055,7 +1055,7 @@
 	local x=
 	for x in ${servers}
 	do
-		local tmp="${FIREHOL_DIR}/firehol.rpcinfo.$$"
+		local tmp="${FIREHOL_DIR}/firehol.rpcinfo.$$.${RANDOM}"
 		
 		set_work_function "Getting RPC information from server '${x}'"
 		
@@ -1169,7 +1169,7 @@
 	local x=
 	for x in ${servers}
 	do
-		local tmp="${FIREHOL_DIR}/firehol.rpcinfo.$$"
+		local tmp="${FIREHOL_DIR}/firehol.rpcinfo.$$.${RANDOM}"
 		
 		set_work_function "Getting RPC information from server '${x}'"
 		
@@ -2567,9 +2567,9 @@
 if [ -f "/proc/config" ]
 then
 	KERNEL_CONFIG="/proc/config"
-	${CAT_CMD} /proc/config >/tmp/kcfg.$$
-	source /tmp/kcfg.$$
-	${RM_CMD} -f /tmp/kcfg.$$
+	${CAT_CMD} /proc/config >${FIREHOL_DIR}/kcfg
+	source ${FIREHOL_DIR}/kcfg
+	${RM_CMD} -f ${FIREHOL_DIR}/kcfg
 	
 elif [ -f "/lib/modules/`${UNAME_CMD} -r`/build/.config" ]
 then
@@ -5121,7 +5121,7 @@
 		else
 		
 		${CAT_CMD} <<EOF
-$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 (C) Copyright 2003, Costa Tsaousis <costa@tsaousis.gr>
 FireHOL is distributed under GPL.
 
@@ -5307,7 +5307,7 @@
 	
 	${CAT_CMD} <<EOF
 
-$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 (C) Copyright 2003, Costa Tsaousis <costa@tsaousis.gr>
 FireHOL is distributed under GPL.
 Home Page: http://firehol.sourceforge.net
@@ -5601,7 +5601,7 @@
 	
 	"${CAT_CMD}" >&2 <<EOF
 
-$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+$Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 (C) Copyright 2003, Costa Tsaousis <costa@tsaousis.gr>
 FireHOL is distributed under GPL.
 Home Page: http://firehol.sourceforge.net
@@ -5684,7 +5684,7 @@
 	echo "# "
 
 	${CAT_CMD} <<EOF
-# $Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
+# $Id: firehol-1.224-to-226.patch,v 1.1 2005/01/27 17:44:47 centic Exp $
 # (C) Copyright 2003, Costa Tsaousis <costa@tsaousis.gr>
 # FireHOL is distributed under GPL.
 # Home Page: http://firehol.sourceforge.net