Skip to content

Commit 4fcc2c4

Browse files
weearcHagb
andauthored
Dev (#36)
* Add hook to prevent to be kicked (#31) * Add hook to prevent to be kicked * Support for different warning count * Enable silent install function * fix some functions * fix config file support (#33) Co-authored-by: Hagb (Guo Junyu 郭俊余) <hagb_green@qq.com>
1 parent c2504f4 commit 4fcc2c4

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

setup.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DRCOMLOG=/var/log/drcom.log
1010
NETLOG=/var/log/networkChecking.log
1111
DRCOM_PID=/var/run/drcom-wrapper.pid
1212
ERROR_LOG=/var/log/install-error.log
13-
VERSION_CQU_DRCOM='2.3.1b'
13+
VERSION_CQU_DRCOM='2.3.2b'
1414

1515
# for cli options
1616
# "-" option is to rewrite long options which getopts do not support.
@@ -561,8 +561,8 @@ setup_done_debug() {
561561
}
562562

563563
config_file_check() {
564-
CLIENT=$client
565-
ifSet_cron=$set_cron
564+
CLIENT="$client"
565+
ifSet_cron="$set_cron"
566566
if [[ $ifSet_cron -eq 0 ]]
567567
then
568568
ifSet_cron=no
@@ -574,12 +574,12 @@ config_file_check() {
574574
echo "Error, value campus with $campus is not allowed. Please check ." >> $ERROR_LOG
575575
exit
576576
fi
577-
578-
if [[ $wifi_ssid0 -eq 0 ]]
577+
578+
if [ -z "$wifi_ssid0" ];
579579
then
580580
wifi_ssid0="openwrt"
581581
fi
582-
if [[ $wifi_ssid1 -eq 0 ]]
582+
if [ -z "$wifi_ssid1" ];
583583
then
584584
wifi_ssid0="openwrt_5Ghz"
585585
fi
@@ -589,7 +589,7 @@ config_file_check() {
589589
exit
590590
fi
591591

592-
592+
593593

594594
}
595595

@@ -657,6 +657,8 @@ else # When running with options
657657
eval "$line"
658658
done < config.ini
659659
hello
660+
config_file_check
661+
660662
clean_up
661663
setup_packages
662664
setup_drcom
@@ -689,6 +691,7 @@ else # When running with options
689691
;;
690692
h)
691693
echo "USAGE: sh ./setup.sh [options]"
694+
echo ""
692695
echo "-V, --dry-run Verbose. Run the scripts without actually setting up."
693696
echo "-f, --file Use config file to install automatically"
694697
echo "-h, --help Display this message."

0 commit comments

Comments
 (0)