diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index f7ba95ced69..b9c0a6deb0f 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -60,7 +60,7 @@ pidfile="${CTDB_PIDFILE:-/var/run/ctdb/ctdbd.pid}" start() { - echo -n "Starting ctdbd service: " + printf "Starting ctdbd service: " case "$CTDB_INIT_STYLE" in suse) @@ -85,7 +85,7 @@ start() stop() { - echo -n "Shutting down ctdbd service: " + printf "Shutting down ctdbd service: " case "$CTDB_INIT_STYLE" in suse) diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing index 9b16138da6e..cfb8348078e 100755 --- a/ctdb/config/events.d/13.per_ip_routing +++ b/ctdb/config/events.d/13.per_ip_routing @@ -203,7 +203,7 @@ get_config_for_ip () # that we get the maskbits as item #2 without further parsing. while IFS="/$IFS" read _i _maskbits _x ; do if [ "$_ip" = "$_i" ] ; then - echo -n "$_ip "; ipv4_host_addr_to_net "$_ip" "$_maskbits" + printf "%s" "$_ip "; ipv4_host_addr_to_net "$_ip" "$_maskbits" fi done <"${CTDB_PUBLIC_ADDRESSES:-/dev/null}" else diff --git a/ctdb/config/events.d/20.multipathd b/ctdb/config/events.d/20.multipathd index f12ead6bd05..3dd58dae8ad 100755 --- a/ctdb/config/events.d/20.multipathd +++ b/ctdb/config/events.d/20.multipathd @@ -29,13 +29,15 @@ multipathd_check_background() # Check multipath knows about the device _out=$(multipath -ll "$_device") if [ -z "$_out" ] ; then - echo "device \"${_device}\" not known to multipathd" >"$multipath_fail" + echo "ERROR: device \"${_device}\" not known to multipathd" \ + >"$multipath_fail" exit 1 fi # Check for at least 1 active path if ! echo "$_out" | grep 'prio=.* status=active' >/dev/null 2>&1 ; then - echo "multipath device \"${_device}\" has no active paths" >"$multipath_fail" + echo "ERROR: multipath device \"${_device}\" has no active paths" \ + >"$multipath_fail" exit 1 fi done @@ -58,7 +60,6 @@ multipathd_check() if wait $_pid ; then return 0 else - echo -n "ERROR: " cat "$multipath_fail" rm -f "$multipath_fail" return 1 diff --git a/ctdb/config/functions b/ctdb/config/functions index be308e7b3a2..603cbf0a490 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -769,8 +769,8 @@ ctdb_counter_init () { ctdb_counter_incr () { _ctdb_counter_common "$1" - # unary counting! - echo -n 1 >> "$_counter_file" + # unary counting using newlines! + echo >>"$_counter_file" } ctdb_counter_get () { _ctdb_counter_common "$1"