From 59324de7395d6725bf40777712b420ef570a5767 Mon Sep 17 00:00:00 2001 From: Chris Lawrence Date: Sat, 24 Sep 2005 19:16:00 -0400 Subject: [PATCH] lsb 3.0-9 Debian release. --- debian/changelog | 10 ++++++++++ debian/lsb-base.README.Debian | 4 ++-- init-functions | 4 ++-- lsb_release | 10 ++++++---- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 42155d6..8b1cf88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +lsb (3.0-9) unstable; urgency=low + + * Fix silly Pythonic else in init-functions. (Closes: #329936) + * s/log_action_start_msg/log_action_begin_msg/ in README.Debian. + (Thanks to Marco d'Itri for pointing these two out.) + * If bits of /etc/lsb-release are missing (but not the whole file), use + detected information in its place. + + -- Chris Lawrence Sat, 24 Sep 2005 19:16:00 -0400 + lsb (3.0-8) unstable; urgency=low * Bring in lsb-release (binary) package; rewritten to handle -v properly diff --git a/debian/lsb-base.README.Debian b/debian/lsb-base.README.Debian index d06ccce..49f7f6e 100644 --- a/debian/lsb-base.README.Debian +++ b/debian/lsb-base.README.Debian @@ -32,7 +32,7 @@ permit simplified logging of init script actions. On Debian, a trailing period will be added to the message, followed by a newline. - - log_action_start_msg "Configuring network interfaces" + - log_action_begin_msg "Configuring network interfaces" Log the start of an action that is expected to take some time. On Debian, an elipsis (...) will follow the message, and the cursor will @@ -90,4 +90,4 @@ If supplied, this script fragment should be compatible with any Debian /bin/sh, as init scripts sourcing this file may be running under any Bourne-style shell permitted by Debian policy (i.e. not just bash). - -- Chris Lawrence , Wed Sep 21 20:21:36 2005 + -- Chris Lawrence , Sat Sep 24 19:15:02 2005 diff --git a/init-functions b/init-functions index 3157927..2a138e7 100644 --- a/init-functions +++ b/init-functions @@ -1,6 +1,6 @@ # /lib/lsb/init-functions for Debian -*- shell-script -*- # -#Copyright (c) 2002-03 Chris Lawrence +#Copyright (c) 2002-05 Chris Lawrence #All rights reserved. # #Redistribution and use in source and binary forms, with or without @@ -279,7 +279,7 @@ log_action_end_msg () { RED=`$TPUT setaf 1` NORMAL=`$TPUT op` /bin/echo -e "${RED}failed${end}${NORMAL}" - else: + else echo "failed${end}" fi fi diff --git a/lsb_release b/lsb_release index d639d60..7cf2cd9 100755 --- a/lsb_release +++ b/lsb_release @@ -85,6 +85,8 @@ def guess_debian_release(): distinfo['OS'] = 'GNU/'+kern elif kern == 'FreeBSD': distinfo['OS'] = 'GNU/k'+kern + else: + distinfo['OS'] = 'GNU' if os.path.exists('/etc/debian_version'): release = open('/etc/debian_version').read().strip() @@ -94,13 +96,15 @@ def guess_debian_release(): distinfo.update({ 'RELEASE' : release, 'CODENAME' : codename }) else: # Guess with apt policy before being this stupid? - distinfo.update({ 'RELEASE' : release, 'CODENAME' : 'sid'} ) + distinfo.update({ 'RELEASE' : release, 'CODENAME' : 'sid'}) distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % distinfo return distinfo def get_distro_information(): - distinfo = {} + distinfo = guess_debian_release() + + # Replace any info in /etc/lsb-release if os.path.exists('/etc/lsb-release'): for line in open('/etc/lsb-release'): line = line.strip() @@ -112,8 +116,6 @@ def get_distro_information(): if arg.startswith('"') and arg.endswith('"'): arg = arg[1:-1] distinfo[var] = arg - else: - distinfo = guess_debian_release() return distinfo -- 2.30.2