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).
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.
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
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
The messages look ok to me.
In CVS
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