Skip to content

Commit b4856da

Browse files
committed
Update gl-inet.sh
check bash env
1 parent a5fe380 commit b4856da

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

gl-inet.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,17 @@ set_glfan_temp() {
260260
echo "错误: 请输入整数."
261261
fi
262262
}
263+
check_bash_installed() {
264+
if [ -x "/bin/bash" ]; then
265+
echo "rollback_old_version ......"
266+
else
267+
setup_software_source 0
268+
opkg install bash
269+
fi
270+
}
263271

264272
rollback_old_version() {
265-
setup_software_source 0
266-
opkg install bash
273+
check_bash_installed
267274
download_url="https://github.com/wukongdaily/gl-inet-onescript/raw/1f25c161512e9b416227f60656e8c2139c993f69/gl-inet.run"
268275
local_file_path="/tmp/gl-inet.run"
269276
wget -O "$local_file_path" "$download_url"

0 commit comments

Comments
 (0)