浏览代码

Update omada.sh

tteckster 3 年之前
父节点
当前提交
440a4933ce
共有 1 个文件被更改,包括 3 次插入15 次删除
  1. 3 15
      ct/omada.sh

+ 3 - 15
ct/omada.sh

@@ -40,11 +40,8 @@ option_picked(){
     printf " ${YW}${message1}${CL}\n"
     printf " ${YW}${message1}${CL}\n"
 }
 }
 show_menu
 show_menu
-while [ $opt != '' ]
+while [ "$opt" != " " ]
     do
     do
-    if [ $opt = '' ]; then
-      exit;
-    else
       case $opt in
       case $opt in
         1) clear;
         1) clear;
             header_info;
             header_info;
@@ -68,7 +65,6 @@ while [ $opt != '' ]
             show_menu;
             show_menu;
         ;;
         ;;
       esac
       esac
-    fi
   done
   done
 show_menu2(){
 show_menu2(){
     printf "    ${YW} 1)${GN} Use Automatic Login ${CL}\n"
     printf "    ${YW} 1)${GN} Use Automatic Login ${CL}\n"
@@ -84,11 +80,8 @@ option_picked(){
     printf " ${YW}${message2}${CL}\n"
     printf " ${YW}${message2}${CL}\n"
 }
 }
 show_menu2
 show_menu2
-while [ $opt != '' ]
+while [ "$opt" != " " ]
     do
     do
-    if [ $opt = '' ]; then
-      exit;
-    else
       case $opt in
       case $opt in
         1) clear;
         1) clear;
             header_info;
             header_info;
@@ -112,7 +105,6 @@ while [ $opt != '' ]
             show_menu2;
             show_menu2;
         ;;
         ;;
       esac
       esac
-    fi
   done
   done
 show_menu3(){
 show_menu3(){
     printf "    ${YW} 1)${GN} Automatic DHCP ${CL}\n"
     printf "    ${YW} 1)${GN} Automatic DHCP ${CL}\n"
@@ -129,11 +121,8 @@ option_picked(){
     printf " ${YW}${message3}${CL}\n"
     printf " ${YW}${message3}${CL}\n"
 }
 }
 show_menu3
 show_menu3
-while [ $opt != '' ]
+while [ "$opt" != " " ]
     do
     do
-    if [ $opt = '' ]; then
-      exit;
-    else
       case $opt in
       case $opt in
         1) clear;
         1) clear;
             header_info;
             header_info;
@@ -157,7 +146,6 @@ while [ $opt != '' ]
             show_menu3;
             show_menu3;
         ;;
         ;;
       esac
       esac
-    fi
   done
   done
 
 
 set -o errexit
 set -o errexit