File: bug-231117-hostopt-not-reset-propery.patch

package info (click to toggle)
wwwconfig-common 0.3.0
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 488 kB
  • sloc: sh: 952; makefile: 5
file content (39 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (6)
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
Package: wwwconfig-common
Version: 0.0.34-0.1~jeroen1
Severity: minor
Tags: patch

$hostopt is in mysql.get not reset if dbserver is local. If mysq.get was
previously called with a remote host, you cannot connect to the local
mysql anymore with wwwconfig-common unless you reset hostopt yourself
(which would be hack).

--Jeroen

diff -ur wwwconfig-common-0.0.34/mysql.get wwwconfig-common-0.0.34.2/mysql.get
--- wwwconfig-common-0.0.34/mysql.get	2003-08-04 14:47:43.000000000 +0200
+++ wwwconfig-common-0.0.34.2/mysql.get	2004-02-04 17:36:09.000000000 +0100
@@ -12,10 +12,10 @@
 #		$dbadmpass - the administrator password.
 # Sets:		$mysqlcmd so that administration access are prepared
 
-if [ -z "$dbserver" ] ; then
+if [ -z "$dbserver" ] || [ "$dbserver" = "localhost" ]; then
+	hostopt=""
     dbserver=localhost
-fi
-if [ "$dbserver" != "localhost" ] ; then
+else
     hostopt="-h '$dbserver'"
 fi
 if [ -z "$dbadmpass" ] ; then

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux frodo 2.6.0 #1 Sun Feb 1 17:50:42 CET 2004 i686
Locale: LANG=nl_NL@euro, LC_CTYPE=nl_NL@euro

-- no debconf information