[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#630329: marked as done (live-config fails if sysv-rc= boot option is used)



Your message dated Mon, 13 Jun 2011 07:32:11 +0000
with message-id <E1QW1d5-0002xl-9C@franck.debian.org>
and subject line Bug#630329: fixed in live-config 3.0~a22-1
has caused the Debian Bug report #630329,
regarding live-config fails if sysv-rc= boot option is used
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
630329: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630329
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: live-config
Version: 2.0.15-1
Severity: minor

*** Please type your report below this line *** When using 
live-config.sysv-rc= boot option to disable a service at boot like 
"live-config.sysv-rc=cron" the following error happens on boot:

startpar: service(s) returned failure: live-config ... failed!

Using debug in boot options we can see:


+ update-rc.d -f cron remove
+ grep -v update-rc.d: using dependency based boot sequencing
+ Trap
+ _RETURN=1
+ echo :ERROR
:ERROR
+ return 1

After boot, the service is indeed removed and is not running.

The code in /lib/live/config/scripts/config/015-sysv-rc is:


	if [ -n "${LIVE_SYSV_RC}" ]
	then
		for SERVICE in $(echo ${LIVE_SYSV_RC} | sed -e 's|,| |g')
		do
			update-rc.d -f ${SERVICE} remove | \
			grep -v "update-rc.d: using dependency based boot sequencing"
		done
	fi

After some google research I read that "grep -v" always returns 1 when 
it has an "inverted match" (grep -v).

Because of the pipe, update-rc.d error can't be extracted without some 
bashism or digging into some output redirections as described in [1]. 
In my testings I've found that update-rc.d always returns 0:

	sudo /usr/sbin/update-rc.d bogus_service_name remove
	update-rc.d: using dependency based boot sequencing
	echo $?
	0

Even if all /etc/rc?.d/ directories are removed from the system 
update-rc.d always returns 0. Great. So it's useless to get update-rc.d 
exit status.

Because of that I would suggest to append a "|| true" in the end of the 
line, as a workaround for the grep -v exit status.

			update-rc.d -f ${SERVICE} remove | \
			grep -v "update-rc.d: using dependency based boot sequencing" || true

I think this is better than using a "> /dev/null 2>&1" because any 
future changes in update-rc.d will still be shown in debug output.

Using the following live-build hook stops the original starpar error.

cat config/chroot_local-hooks/99-fix-grep-v-live-config-sysv-rc 

#!/bin/sh

# fix bug in live-config
sed  -i '/grep/ s|$| \|\| true|' /lib/live/config/01?-sysv-rc

A patch to live-config that applies this solution:

>From 47539ee6fe5cbb916f2446d7c5846302ffabeab9 Mon Sep 17 00:00:00 2001
From: Rui Miguel P. Bernardo <rui.bernardo.pt@gmail.com>
Date: Sun, 12 Jun 2011 22:55:47 +0100
Subject: [PATCH] Fix non 0 exit status of grep -v ini sysv-rc.

---
 scripts/config/015-sysv-rc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/config/015-sysv-rc b/scripts/config/015-sysv-rc
index 83e96cf..8191782 100755
--- a/scripts/config/015-sysv-rc
+++ b/scripts/config/015-sysv-rc
@@ -38,7 +38,7 @@ Configure_sysv_rc ()
 		for SERVICE in $(echo ${LIVE_SYSV_RC} | sed -e 's|,| |g')
 		do
 			update-rc.d -f ${SERVICE} remove | \
-			grep -v "update-rc.d: using dependency based boot sequencing"
+			grep -v "update-rc.d: using dependency based boot sequencing" || true
 		done
 	fi
 
-- 
1.7.2.5

Thank you


Rui Miguel P. Bernardo

[1]: http://tldp.org/LDP/abs/html/io-redirection.html	tldp.org documentation


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=pt_PT.UTF-8, LC_CTYPE=pt_PT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-config depends on:
ii  live-config-sysvinit [live-co 2.0.15-1   Debian Live - System Configuration

Versions of packages live-config recommends:
ii  sudo                 1.7.4p4-2.squeeze.2 Provide limited super user privile
ii  user-setup           1.38                Set up initial user and password

Versions of packages live-config suggests:
ii  wget                          1.12-2.1   retrieves files from the web

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: live-config
Source-Version: 3.0~a22-1

We believe that the bug you reported is fixed in the latest version of
live-config, which is due to be installed in the Debian FTP archive:

live-config-runit_3.0~a22-1_all.deb
  to main/l/live-config/live-config-runit_3.0~a22-1_all.deb
live-config-systemd_3.0~a22-1_all.deb
  to main/l/live-config/live-config-systemd_3.0~a22-1_all.deb
live-config-sysvinit_3.0~a22-1_all.deb
  to main/l/live-config/live-config-sysvinit_3.0~a22-1_all.deb
live-config-upstart_3.0~a22-1_all.deb
  to main/l/live-config/live-config-upstart_3.0~a22-1_all.deb
live-config_3.0~a22-1.debian.tar.gz
  to main/l/live-config/live-config_3.0~a22-1.debian.tar.gz
live-config_3.0~a22-1.dsc
  to main/l/live-config/live-config_3.0~a22-1.dsc
live-config_3.0~a22-1_all.deb
  to main/l/live-config/live-config_3.0~a22-1_all.deb
live-config_3.0~a22.orig.tar.gz
  to main/l/live-config/live-config_3.0~a22.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 630329@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <daniel@debian.org> (supplier of updated live-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 13 Jun 2011 09:17:11 +0200
Source: live-config
Binary: live-config live-config-runit live-config-systemd live-config-sysvinit live-config-upstart
Architecture: source all
Version: 3.0~a22-1
Distribution: unstable
Urgency: low
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Changed-By: Daniel Baumann <daniel@debian.org>
Description: 
 live-config - Debian Live - System Configuration Scripts
 live-config-runit - Debian Live - System Configuration Scripts (runit backend)
 live-config-systemd - Debian Live - System Configuration Scripts (systemd backend)
 live-config-sysvinit - Debian Live - System Configuration Scripts (sysvinit backend)
 live-config-upstart - Debian Live - System Configuration Scripts (upstart backend)
Closes: 630329
Changes: 
 live-config (3.0~a22-1) unstable; urgency=low
 .
   [ Rui Miguel P. Bernardo ]
   * Fix non 0 exit status of grep -v ini sysv-rc (Closes: #630329).
Checksums-Sha1: 
 f7d8dc6ac5207c1d20870753622074fef5d46ab8 1355 live-config_3.0~a22-1.dsc
 e2e20f1e346eae8c9cfdbd2884f78ad366895794 99661 live-config_3.0~a22.orig.tar.gz
 5af86a160cb7f1e9f477b80480023dcd1832dd9d 9008 live-config_3.0~a22-1.debian.tar.gz
 9d346a18ae24d4a418dd320e403a484bc1bd6ea2 52588 live-config_3.0~a22-1_all.deb
 1052202cb3ebb346fd6747edca59f14375ab8a4d 8602 live-config-runit_3.0~a22-1_all.deb
 7a6d293c44b4285a46e20d081da6a0fad4ea546c 8332 live-config-systemd_3.0~a22-1_all.deb
 1c4ed52a54bd081c6397853112c9a6e86d86ef50 9418 live-config-sysvinit_3.0~a22-1_all.deb
 d5f85aad52d490cbed1bc19b22937f8cde3430ba 9256 live-config-upstart_3.0~a22-1_all.deb
Checksums-Sha256: 
 612defa0f2d8f3d7827fdeb1f5f21dbef8218491d58183c4cb1df0c2dac088d8 1355 live-config_3.0~a22-1.dsc
 b29697c497852130d9929eed828dc99c91c5531a0b03024bbb6a0f7087d4c4e8 99661 live-config_3.0~a22.orig.tar.gz
 e12f8b918e47a9461dfc51e6befb86e236e4bb51718f8de7a1720916aba1eef3 9008 live-config_3.0~a22-1.debian.tar.gz
 f57552b8a3662fe30e55e92e8e5320bfa5b6e0809b86f797548bfac5f462c4a2 52588 live-config_3.0~a22-1_all.deb
 75d595f4894132809ea74aa8fb8a5503ff9c334c7fcb6498a2e0ba3c88da0bf6 8602 live-config-runit_3.0~a22-1_all.deb
 5e1941690daf1cd85294a2683cb99d7e4c10f8153a35dc2cfaa336943a5ab063 8332 live-config-systemd_3.0~a22-1_all.deb
 bb569082dbb31778db014eb7e36f0439c7075cf609d3e6ae8ebc1d7219cdbc7b 9418 live-config-sysvinit_3.0~a22-1_all.deb
 93ccb545874ebe381736150d4003f7521cb14323f0c486f0e414f249002e5ff8 9256 live-config-upstart_3.0~a22-1_all.deb
Files: 
 3a0a4045275bf4f0a5e0186e8ae0d018 1355 misc optional live-config_3.0~a22-1.dsc
 6804105e10202367f004f48c5884f5a6 99661 misc optional live-config_3.0~a22.orig.tar.gz
 f29e6ded1f2000f3753586274986da9c 9008 misc optional live-config_3.0~a22-1.debian.tar.gz
 570685961b3cc13faddab541310bfb62 52588 misc optional live-config_3.0~a22-1_all.deb
 9cde93f8909a64fa5c6b59a3520bf435 8602 misc optional live-config-runit_3.0~a22-1_all.deb
 1c385b655f6d1d3c60ce7fece854d787 8332 misc optional live-config-systemd_3.0~a22-1_all.deb
 63f46199773461d7d8fc948aa05f7395 9418 misc optional live-config-sysvinit_3.0~a22-1_all.deb
 343cb889189b5b8626e8a3e2f916a329 9256 misc optional live-config-upstart_3.0~a22-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk31uoQACgkQ+C5cwEsrK56QcQCghoGOpys0Ja4QpKEfuK5zY5x1
KcMAoLjSIY9nVOj42lLKLU3NHRnLlX6D
=3MeE
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: