瀏覽代碼

Fix for Ubuntu 14.04

Serghey Rodin 11 年之前
父節點
當前提交
2f300aab69
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bin/v-list-user-ns

+ 1 - 1
bin/v-list-user-ns

@@ -21,7 +21,7 @@ json_list_ns() {
     ns=$(grep "^NS='" $USER_DATA/user.conf |cut -f 2 -d \')
     ns=$(grep "^NS='" $USER_DATA/user.conf |cut -f 2 -d \')
     echo '['
     echo '['
     i=1
     i=1
-    nslistc=$(echo -e "${ns//,/\n}"|wc -l)
+    nslistc=$(echo -e "${ns//,/\\n}"|wc -l)
     for nameserver in ${ns//,/ };do
     for nameserver in ${ns//,/ };do
         if [ "$i" -ne "$nslistc" ]; then
         if [ "$i" -ne "$nslistc" ]; then
             echo -e  "\t\"$nameserver\","
             echo -e  "\t\"$nameserver\","