The Samba-Bugzilla – Attachment 4019 Details for
Bug 6225
[CTDB] Various enhancements to ctdb.init
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Replace the deprecated and bash-only $"string" syntax by eval_gettext
0005-Replace-the-deprecated-and-bash-only-string-synta.patch (text/plain), 2.07 KB, created by
Mathieu Parent
on 2009-03-26 17:09:57 UTC
(
hide
)
Description:
Replace the deprecated and bash-only $"string" syntax by eval_gettext
Filename:
MIME Type:
Creator:
Mathieu Parent
Created:
2009-03-26 17:09:57 UTC
Size:
2.07 KB
patch
obsolete
>From 2ec22adadc390e992d234d0c85b06c9ec1a16197 Mon Sep 17 00:00:00 2001 >From: Mathieu Parent <math.parent@gmail.com> >Date: Thu, 26 Mar 2009 21:22:42 +0100 >Subject: [PATCH 05/15] Replace the deprecated and bash-only $"string" syntax by eval_gettext > >--- > config/ctdb.init | 21 ++++++++++++++++----- > 1 files changed, 16 insertions(+), 5 deletions(-) > >diff --git a/config/ctdb.init b/config/ctdb.init >index 716b8cb..bd50228 100755 >--- a/config/ctdb.init >+++ b/config/ctdb.init >@@ -26,6 +26,16 @@ elif [ -f /etc/rc.d/init.d/functions ] ; then > . /etc/rc.d/init.d/functions > fi > >+#gettext >+if [ -f /usr/bin/gettext.sh ] ; then >+ . /usr/bin/gettext.sh >+fi >+if ! type 'eval_gettext' >/dev/null; then >+ eval_gettext() { >+ echo -n "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1") >+ } >+fi >+ > [ -f /etc/rc.status ] && { > . /etc/rc.status > rc_reset >@@ -95,7 +105,7 @@ set_retval() { > > start_server() { > killall -q ctdbd >- echo -n $"Starting ctdbd service: " >+ eval_gettext "Starting ctdbd service: " > > # check all persistent databases that they look ok > case $init_style in >@@ -152,7 +162,7 @@ start_server() { > } > > stop_server() { >- echo -n $"Shutting down ctdbd service: " >+ eval_gettext "Shutting down ctdbd service: " > ctdb ping > /dev/null 2>&1 || { > echo -n " Warning: ctdbd not running ! " > case $init_style in >@@ -177,7 +187,7 @@ stop_server() { > sleep 1 > count=`expr $count + 1` > [ $count -gt 10 ] && { >- echo -n $"killing ctdbd " >+ eval_gettext "killing ctdbd " > killall -q -9 ctdbd > pkill -9 -f $CTDB_BASE/events.d/ > } >@@ -204,7 +214,7 @@ restart_server() { > } > > status() { >- echo -n $"Checking for ctdbd service: " >+ eval_gettext "Checking for ctdbd service: " > ctdb ping > /dev/null 2>&1 || { > RETVAL=$? > echo -n " ctdbd not running. " >@@ -245,7 +255,8 @@ case "$1" in > ctdb status > /dev/null || restart_server > ;; > *) >- echo $"Usage: $0 {start|stop|restart|status|cron|condrestart}" >&2 >+ eval_gettext "Usage: $0 {start|stop|restart|status|cron|condrestart}" >&2 >+ echo >&2 > exit 1 > ;; > esac >-- >1.6.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6225
:
4015
|
4016
|
4017
|
4018
| 4019 |
4020
|
4021
|
4022
|
4023
|
4024
|
4025
|
4026
|
4027
|
4028
|
4029
|
4030
|
4441
|
5102