Bug 107454

Summary: /etc/init.d/smartd messages in kernel-utils should be marked for translation
Product: [Fedora] Fedora Reporter: Christian Rose <menthos>
Component: kernel-utilsAssignee: Arjan van de Ven <arjanv>
Status: CLOSED NEXTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ballen, goeran, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-21 17:11:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Rose 2003-10-18 14:25:05 UTC
The messages in /etc/init.d/smartd, in particular
"Starting smartd: " and others, should be marked for
translation so that they can be translated from initscripts.

Currently they are not marked for translation at all and hence not translated,
and this is in sharp contrast with other initscripts messages.

Please note though that the messages should be:

"Starting $prog: "
"Shutting down $prog: "
"Usage: $0 {start|stop|restart|status}"

in order to be consistent with other initscripts messages and not require extra
work for translators (see for example bug 50395).

Comment 1 Bruce Allen 2003-10-19 21:06:14 UTC
I'd like to propagate any changes back to the init scripts in the smartmontools
package.  Please let me know what changes are needed so I can move them upstream.

Comment 2 Bruce Allen 2003-11-20 14:23:47 UTC
This has been fixed for the smartmontools 5.26 release.
The relevant section now reads as below.  Please let me know
if this is or is not OK.

# Source function library
    . /etc/rc.d/init.d/functions

    RETVAL=0

    prog=smartd

    case "$1" in
	start)
	    echo -n $"Starting $prog: "
	    daemon /usr/sbin/smartd
	    touch /var/lock/subsys/smartd
	    echo
	    ;;
	stop)
	    echo -n $"Shutting down $prog: "
	    killproc smartd
	    rm -f /var/lock/subsys/smartd
	    echo
	    ;;
	reload)
            echo -n $"Reloading smartd daemon configuration: "
	    killproc /usr/sbin/smartd -HUP
	    RETVAL=$?
	    echo
	    ;;
	report)
	    echo -n $"Checking SMART devices now: "
	    killproc /usr/sbin/smartd -USR1
	    RETVAL=$?
	    echo
            ;;
	restart)
	    $0 stop
	    $0 start
	    ;;
	status)
	    status smartd
	    ;;
	*)
	    echo $"Usage: $0 {start|stop|reload|report|restart|status}"
	    RETVAL=1
    esac
    
    exit $RETVAL


Comment 3 Bruce Allen 2003-11-20 14:37:23 UTC
I decided that this was better.  Comments please.

# Source function library
    . /etc/rc.d/init.d/functions

    RETVAL=0

    prog=smartd

    case "$1" in
	start)
	    echo -n $"Starting $prog: "
	    daemon /usr/sbin/smartd
	    touch /var/lock/subsys/smartd
	    echo
	    ;;
	stop)
	    echo -n $"Shutting down $prog: "
	    killproc smartd
	    rm -f /var/lock/subsys/smartd
	    echo
	    ;;
	reload)
            echo -n $"Reloading $prog daemon configuration: "
	    killproc /usr/sbin/smartd -HUP
	    RETVAL=$?
	    echo
	    ;;
	report)
	    echo -n $"Checking SMART devices now: "
	    killproc /usr/sbin/smartd -USR1
	    RETVAL=$?
	    echo
            ;;
	restart)
	    $0 stop
	    $0 start
	    ;;
	status)
	    status $prog
	    ;;
	*)
	    echo $"Usage: $0 {start|stop|reload|report|restart|status}"
	    RETVAL=1
    esac
    
    exit $RETVAL

Comment 4 Christian Rose 2003-11-20 14:58:03 UTC
The messages look ok to me.

Comment 5 Alan Cox 2004-06-21 17:11:39 UTC
In CVS


Comment 6 Bruce Allen 2004-09-14 01:32:36 UTC
Hi Alan,
                                                                     
                                              
Thanks for bumping smartmontools to 5.30 in
kernel-utils-2.4-12.1.143.src.rpm.  A few comments:
                                                                     
                                              
(1) in the changelog, you wrote:
   * Mon Jun 21 2004 Alan Cox <alan>
   - Fix #107453
   but you meant #107453 and #107454
                                                                     
                                              
(2) I suggest that you or someone else apply this patch (see NEWS for 5.30
   in more recent smartmontools releases):
  - KNOWN BUG (identified/fixed by CF): smartd will segv and crash if
    the configuration file /etc/smartd.conf contains NO valid entries.
    This bug was introduced in version 1.259 of smartd.c by BA and
    is present in smartmontools releases 5.27-5.30 inclusive. This can
    be fixed by editing line 3165 of smartd.c, and changing:
    "else if (cfgentries[0]) {"
    to read:
    "else if (cfgentries && cfgentries[0]) {"

(3) Better yet, upgrade to smartmontools 5.32.  This release has been out
    there for about 2.5 months with no significant bug reports. It's based
    on an experimental release that's been out since early May, likewise
    with no significant bug reports.
                                                                     
                                              
(4) smartmontools-smartd.patch is against an earlier release; still
    applies but should be updated.
                                                                     
                                              
(5) I think that the patch in (4) above:
    # chkconfig: - 40 40
    is a mistake for almost all users, since the '-' means that the
    service is disabled by default.  I think that the service ought to
    be started by default, to generate warnings about failing disks.
                                                                     
                                              
Cheers,
        Bruce