commit 7e883ab4818ed3803d7456c9ca260ede1f1ba2a9
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Aug 21 22:42:09 2016 +0300

    fix nls usage
    
    - no variables for translation
    - avoid errors if variables uninitalized or empty

 lxdbr.init | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/lxdbr.init b/lxdbr.init
index 31f88f3..1da6262 100755
--- a/lxdbr.init
+++ b/lxdbr.init
@@ -34,7 +34,7 @@ is_bridge_up() {
 
 start() {
        if is_bridge_up; then
-               nls "lxd bridge %s is already up" $BRIDGE_DEV
+               nls "lxd bridge %s is already up" "$BRIDGE_DEV"
                return
        fi
 
@@ -54,7 +54,7 @@ start() {
 
 stop() {
        if ! is_bridge_up; then
-               nls "lxd bridge %s is already down" $BRIDGE_DEV
+               nls "lxd bridge %s is already down" "$BRIDGE_DEV"
                return
        fi
 
@@ -81,13 +81,13 @@ condrestart() {
        start
 }
 
-status() {
+bridge_status() {
        local st="down"
        if ip link show $BRIDGE_DEV >/dev/null; then
                st="up"
                RETVAL=1
        fi
-       nls "lxd bridge $BRIDGE_DEV is %s" $st
+       nls "lxd bridge %s is %s" "$BRIDGE_DEV" "$st"
 }
 
 RETVAL=0
@@ -110,7 +110,7 @@ case "$1" in
        condrestart 7
        ;;
   status)
-       status
+       bridge_status
        ;;
   *)
        msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lxd.git/commitdiff/71dc0cfa2c5e9180100ee27121a379c7733359ff

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to