]> git.pld-linux.org Git - packages/lxd.git/commitdiff
fix nls usage
authorElan Ruusamäe <glen@delfi.ee>
Sun, 21 Aug 2016 19:42:09 +0000 (22:42 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 21 Aug 2016 19:42:17 +0000 (22:42 +0300)
- no variables for translation
- avoid errors if variables uninitalized or empty

lxdbr.init

index 31f88f3fa0194731718acc023f9b378897428fc1..1da62623141471ecdce46272082aa73d8a5f9a28 100755 (executable)
@@ -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}"
This page took 0.040807 seconds and 4 git commands to generate.