2016-04-14 10:46:40 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-07-05 13:15:52 +02:00
|
|
|
if [ -e /usr/share/pve-manager/ext4/pvemanagerlib.js ]
|
2016-04-14 10:46:40 +02:00
|
|
|
then
|
2016-07-05 13:15:52 +02:00
|
|
|
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/pve-manager/ext4/pvemanagerlib.js ) -gt 0 ]
|
|
|
|
then
|
|
|
|
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
|
|
|
|
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-ext4.patch
|
|
|
|
echo "------------------------------------------------------------------------------"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ -e /usr/share/pve-manager/ext6/pvemanagerlib.js ]
|
|
|
|
then
|
|
|
|
if [ $( grep -c "if (data.status !== 'Active') {" /usr/share/pve-manager/ext6/pvemanagerlib.js ) -gt 0 ]
|
|
|
|
then
|
|
|
|
echo "---------------[ Patching with No-Subscription-Removal-Patch ]----------------"
|
|
|
|
cd / && patch --no-backup-if-mismatch -l -p0 < /usr/share/pve-no-subscription/no-subscription-warning-ext6.patch
|
|
|
|
echo "------------------------------------------------------------------------------"
|
|
|
|
fi
|
|
|
|
fi
|
2016-04-14 10:46:40 +02:00
|
|
|
fi
|