|
@@ -155,6 +155,13 @@ if [[ $deb_release < 8 ]];
|
155
|
155
|
else
|
156
|
156
|
cp -f $PWD/lib/systemd/system/zramraid.service /lib/systemd/system/zramraid.service;
|
157
|
157
|
/bin/systemctl enable zramraid.service;
|
|
158
|
+ if [ -f "/lib/systemd/system/libvirt-guests.service" ];
|
|
159
|
+ then
|
|
160
|
+ if [ $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 0];
|
|
161
|
+ then
|
|
162
|
+ sed -i '/Requires=virt-guest-shutdown.target/a \'"Requires=zramraid.service" /lib/systemd/system/libvirt-guests.service;
|
|
163
|
+ fi
|
|
164
|
+ fi
|
158
|
165
|
fi
|
159
|
166
|
reports[${#reports[@]}]="zramraid install susseful";
|
160
|
167
|
reports[${#reports[@]}]="please setup config for autostart from boot: /etc/default/zramraid.";
|
|
@@ -173,6 +180,13 @@ if [[ $deb_release < 8 ]];
|
173
|
180
|
/bin/systemctl stop zramraid-manager;
|
174
|
181
|
/bin/systemctl disable zramraid.service;
|
175
|
182
|
rm /lib/systemd/system/zramraid.service;
|
|
183
|
+ if [ -f "/lib/systemd/system/libvirt-guests.service" ];
|
|
184
|
+ then
|
|
185
|
+ if [ $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 1];
|
|
186
|
+ then
|
|
187
|
+ sed -i -e '/'"Requires=zramraid.service"'/d' /lib/systemd/system/libvirt-guests.service;
|
|
188
|
+ fi
|
|
189
|
+ fi
|
176
|
190
|
fi
|
177
|
191
|
rm -f /usr/local/bin/zramraid-maker;
|
178
|
192
|
rm -f /usr/local/bin/zramraid-config;
|