ivanhao / pvetools

proxmox ve tools script(debian9+ can use it).Including email, samba, NFS set zfs max ram, nested virtualization ,docker , pci passthrough etc. for english user,please look the end of readme.
GNU General Public License v3.0
4.2k stars 512 forks source link

去除订阅提示在最新的 PVE 中失效 #20

Closed azhuge233 closed 3 years ago

azhuge233 commented 3 years ago

Describe the bug 去除订阅提示的功能在最新的 PVE 中失效

系统信息 PVE 版本:6.2-15 内核版本:Linux pve 5.4.65-1-pve

原因 /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js 中的验证代码由

data.status !== 'Active'

更新成

res === null || res === undefined || !res || res.data.status.toLowerCase() !== 'active'

解决方法

可以将 pvetools.sh 中第 1320 行处的判断条件改为

grep ".data.status.toLowerCase() !== 'active'" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js |wc -l

然后将 sed 语句改为

sed -i.bak "s/.data.status.toLowerCase() !== 'active'/.data.status.toLowerCase() === 'active'/g"

或者全部替换为 false

ivanhao commented 3 years ago

好的,我近期更新一下

ivanhao commented 3 years ago

已更新,你验证一下。