Skip to contentSkip to conversation

systemd-systemctl-native: fixed systemctl wrapper's `disable' action

PATCH New Otavio Salvador 1 participant 1 message May 14, 2012 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 systemd-systemctl-native: fixed systemctl wrapper's `disable' action

In reply to a message not in the archive

From: Mario Domenech Goulart <[email protected]>

---
 .../systemd/systemd-systemctl-native/systemctl     |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +2 -2
index c4a0a3f..6e7a05d 100755
@@ -68,8 +68,8 @@ for service in $services; do
 			ln -s $service_file $ROOT/etc/systemd/system/$r.wants
 			echo "Enabled $service for $wanted_by."
 		else
-			rm -f $ROOT/etc/systemd/system/$r.wants/$service_file
-			rmdirs -p $ROOT/etc/systemd/system/$r.wants
+			rm -f $ROOT/etc/systemd/system/$r.wants/$service
+			rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
 			echo "Disabled $service for $wanted_by."
 		fi
 	done
Signature · 1 line
1.7.2.5