Skip to content

Commit

Permalink
v3.3.2
Browse files Browse the repository at this point in the history
1. 继续完善硬盘信息获取功能
  • Loading branch information
tty228 committed Jun 19, 2023
1 parent 17888a5 commit 70d2f4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-wechatpush
PKG_VERSION:=3.3.1
PKG_VERSION:=3.3.2
PKG_RELEASE:=12

PKG_MAINTAINER:=tty228 <tty228@yeah.net>
Expand Down
8 changes: 4 additions & 4 deletions root/usr/share/wechatpush/wechatpush
Original file line number Diff line number Diff line change
Expand Up @@ -1150,16 +1150,16 @@ function get_disk() {
if [ -f "${file_path}" ] && ( ! cat "${file_path}" | grep -q -v "STANDBY" ); then
disk_name=$(awk '/Device Model/{print $NF}' "$file_path")
[[ -n $disk_name && $disk_name != null && $disk_name != 0 ]] && {
[ $(length_str "$disk_name") -gt "20" ] && disk_name=$(echo "$disk_name" | awk '{print $1, $NF}')
[ $(length_str "$disk_name") -gt "20" ] && disk_name=$(cut_str "$disk_name" "20")
disk_name=$(cut_str "$disk_name" "20")
disk_name="${disk_name}_$(eval ${tmp_command} lsblk -o NAME,SIZE | awk "/^${all_disk_names[i]}/ {print \$NF}")"
}
printf "\n${str_title_start} 硬盘名称:${disk_name}${disk_type}${str_title_end}\n${str_tab}硬盘休眠中" >> "$output_dir/get_disk"
elif [ -f "${file_path}" ]; then
# 硬盘名称
disk_name=$(jq -r .model_name ${file_path})
[[ -n $disk_name && $disk_name != null && $disk_name != 0 ]] && {
[ $(length_str "$disk_name") -gt "20" ] && disk_name=$(echo "$disk_name" | awk '{print $1, $NF}')
[ $(length_str "$disk_name") -gt "20" ] && disk_name=$(cut_str "$disk_name" "20")
disk_name=$(cut_str "$disk_name" "20")
disk_name="${disk_name}_$(eval ${tmp_command} lsblk -o NAME,SIZE | awk "/^${all_disk_names[i]}/ {print \$NF}")"
}
printf "\n${str_title_start} 硬盘名称:${disk_name}${disk_type}${str_title_end}" >> "$output_dir/get_disk"
# 硬盘错误
Expand Down

0 comments on commit 70d2f4b

Please sign in to comment.