Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37749446
en ru br
Репозитории ALT
S:5.9.11-alt1
5.1: 4.3.7-alt1.M51.1
4.1: 4.2.17-alt0.M41.1
4.0: 4.2.17-alt0.M40.1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: strongswan

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: strongswan-4.3.3-alt-tmpfile.patch
Скачать


diff -Naur strongswan-4.3.3-orig/testing/do-tests.in strongswan-4.3.3/testing/do-tests.in
--- strongswan-4.3.3-orig/testing/do-tests.in	2009-07-20 15:50:50 +0300
+++ strongswan-4.3.3/testing/do-tests.in	2009-07-26 15:24:43 +0300
@@ -332,6 +332,7 @@
 	# run tcpdump in the background
 	#
 
+	tmp=${TMP:-/tmp}
 	if [ "$TCPDUMPHOSTS" != "" ]
 	then
 	    echo -e "TCPDUMP\n" >> $CONSOLE_LOG 2>&1
@@ -340,7 +341,7 @@
 	    do
 		host=`echo $host_iface | awk -F ":" '{print $1}'`
 		iface=`echo $host_iface | awk -F ":" '{if ($2 != "") { print $2 } else { printf("eth0") }}'`
-		tcpdump_cmd="tcpdump -i $iface not port ssh and not port domain and not arp > /tmp/tcpdump.log 2>&1 &"
+		tcpdump_cmd="tcpdump -i $iface not port ssh and not port domain and not arp > $tmp/tcpdump.log 2>&1 &"
 		echo "${host}# $tcpdump_cmd" >> $CONSOLE_LOG
 		ssh root@`eval echo \\\$ipv4_$host '$tcpdump_cmd'`
 		eval TDUP_${host}="true"
@@ -391,13 +392,15 @@
 	    command=$2
 	    pattern=$3
 	    hit=$4
+	    tmp=ENVIRON["TMP"]
+	    if (tmp == "") { tmp = "/tmp"; }
 	    if (command != "")
 	    {
 		if (command == "tcpdump")
 		{
 		    printf("if [ \044TDUP_%s == \"true\" ]; then stop_tcpdump %s; fi; \n", host, host)
-		    printf("echo \"%s# cat /tmp/tcpdump.log | grep \047%s\047  [%s]\"; ", host, pattern, hit)
-		    printf("ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\"; ", host, pattern)
+		    printf("echo \"%s# cat %s/tcpdump.log | grep \047%s\047  [%s]\"; ", host, tmp, pattern, hit)
+		    printf("ssh root@\044ipv4_%s cat %s/tcpdump.log | grep \"%s\"; ", host, tmp, pattern)
 		}
 		else
 		{
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin