Browse Source

bugfix systemd working 27.06.18:5.21

master 5 years ago
parent
commit
de2d5fea36
1 changed files with 3 additions and 3 deletions
  1. 3 3
      zramraid.deb/zramraid-install

+ 3 - 3
zramraid.deb/zramraid-install

@@ -157,7 +157,7 @@ if [[ $deb_release < 8 ]];
157
 	/bin/systemctl enable zramraid.service;
157
 	/bin/systemctl enable zramraid.service;
158
 	if [ -f "/lib/systemd/system/libvirt-guests.service" ];
158
 	if [ -f "/lib/systemd/system/libvirt-guests.service" ];
159
 	    then
159
 	    then
160
-		if [ $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 0];
160
+		if [ $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 0 ];
161
 		    then
161
 		    then
162
 			sed -i '/Requires=virt-guest-shutdown.target/a \'"Requires=zramraid.service" /lib/systemd/system/libvirt-guests.service;
162
 			sed -i '/Requires=virt-guest-shutdown.target/a \'"Requires=zramraid.service" /lib/systemd/system/libvirt-guests.service;
163
 		fi
163
 		fi
@@ -177,12 +177,12 @@ if [[ $deb_release < 8 ]];
177
 	/etc/init.d/zramraid-manager stop;
177
 	/etc/init.d/zramraid-manager stop;
178
 	update-rc.d -n zramraid-manager remove;
178
 	update-rc.d -n zramraid-manager remove;
179
      else
179
      else
180
-    /bin/systemctl stop zramraid-manager;
180
+    /bin/systemctl stop zramraid.service;
181
     /bin/systemctl disable zramraid.service;
181
     /bin/systemctl disable zramraid.service;
182
     rm /lib/systemd/system/zramraid.service;
182
     rm /lib/systemd/system/zramraid.service;
183
     if [ -f "/lib/systemd/system/libvirt-guests.service" ];
183
     if [ -f "/lib/systemd/system/libvirt-guests.service" ];
184
 	    then
184
 	    then
185
-		if [ $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 1];
185
+		if [ ! $(cat /lib/systemd/system/libvirt-guests.service|grep zramraid|wc -m ) = 0 ];
186
 		    then
186
 		    then
187
 			sed -i -e '/'"Requires=zramraid.service"'/d' /lib/systemd/system/libvirt-guests.service;
187
 			sed -i -e '/'"Requires=zramraid.service"'/d' /lib/systemd/system/libvirt-guests.service;
188
 		fi
188
 		fi