Bug#675162: lsb-base: mysql doesn't start

"Didier 'OdyX' Raboud" <[email protected]>
Newsgroups gmane.linux.debian.devel.lsb
Organization Debian, the Universal OS
Message-ID <[email protected]>
severity 675162 serious
tags 675162 +patch +pending
thanks

Le 30.05.2012 11:50, Kamen Naydenov a écrit :
> Package: lsb-base
> Version: 4.1+Debian5
> Severity: normal
> 
> Dear Maintainer,
> 
> after lsb-base upgrade (Wed May 30 12:41:22 EEST 2012: [UPGRADE] lsb-base:amd64
> 4.1+Debian4 -> 4.1+Debian5) mysql fail to start on boot.
> I try ot run it, and receive following error:
> LANG=C sudo invoke-rc.d mysql start
> /lib/lsb/init-functions: line 428: FANCYTTY: unbound variable
> 
> After that I check that mysql works running it directly invoking
> /usr/bin/mysqld_safe

Hi Kamen, and thanks for your bugreport,

this is the newborn incarnation of the #390085 fixed in lsb-base 3.1-17.
I can confirm the reported behaviour and will apply the attached patch
to the next upload of lsb, hence hereby tagging +patch and +pending. By
the way, this bug is of serious severity as it breaks unrelated packages.

Cheers,

OdyX
0001-init-functions-Cope-with-init-scripts-that-use-set-u.patch (text/plain, 1016 B)
From 0340d15805a60be8cc09cc209fe57cd22357889c Mon Sep 17 00:00:00 2001
From: Didier Raboud <[email protected]>
Date: Wed, 30 May 2012 12:58:54 +0200
Subject: [PATCH] init-functions: Cope with init scripts that use `set -u`.

When sourcing /etc/default/rcS for FANCYTTY, cope with its eventual
non-existence by enforcing `set +u` in the $() subshell.

Git-Dch: Full
Closes: #675162
Reported-by: Kamen Naydenov <[email protected]>
---
 init-functions |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/init-functions b/init-functions
index d8a7e98..8736693 100644
--- a/init-functions
+++ b/init-functions
@@ -425,5 +425,5 @@ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/nul
     [ -r $hook ] && . $hook || true
 done
 
-FANCYTTY=$([ -e /etc/default/rcS ] && . /etc/default/rcS && echo $FANCYTTY)
+FANCYTTY=$(set +u; [ -e /etc/default/rcS ] && . /etc/default/rcS && echo $FANCYTTY)
 [ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || true
-- 
1.7.2.5
signature.asc (application/pgp-signature, 663 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQGcBAEBAgAGBQJPxgJtAAoJEIvPpx7KFjRV4XoL/2fZYNEi9w0ioeBczXkkqua5
TBV9J1I1Q+G7qnU9dTLzKQ5ErwuAtCd3BBXav2qCZCb/qAeo0K/z3fOzM3APu6N3
X+WmXsbkgxhgXkFqiPCIWemhDzpwPYBBnS38U1aX2BJis0sqO0YRPEo1VyETG6Ud
0ztj84VsYPhX1GJEdgtLhUefA0o+n59PMxJ44DF3s9GYHndvWjnmJWYgi7km56qI
1ezRqQl+YS8HKTo6hGvxdpInCWPn2InyqzbANvYhffSkh8kU38a9KyEMev3ANxtT
ll/Uwwu/avbvNSpO7I1BKK5cE7pCmnLMUFvCmwf118NXbz9DLOLZTAbb1DQv2FR/
+HFytpmd14BWDKcqNbdc0JNvbvMS1ssqMIiCBqX2sjzT1Ts8ReAJzqYbfJec5PtD
gnGfwJqWM1MwhlQHbFMESlU4hPYaCayn6DtlIme7w5uEygE+iElmB8H1T7NqUUvf
buY0QJEYIzsXasD1AkurMBzUh0pfxk9fW7fBd4PjLg==
=wAbg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.