From 8fb63401afa3d252bc41f6857a56cca3a39f66e7 Mon Sep 17 00:00:00 2001 From: Weathercold Date: Fri, 12 Aug 2022 18:36:15 -0400 Subject: nixos/switch-to-configuration: fix units starting with dash Fix units starting with `-` being recognized as options. --- nixos/modules/system/activation/switch-to-configuration.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/system') diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index f39549db883d..9a4c635402d1 100755 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -167,7 +167,7 @@ sub get_active_units { # Takes the name of the unit as an argument and returns a bool whether the unit is active or not. sub unit_is_active { my ($unit_name) = @_; - my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, $unit_name)->{data}->[0]; + my $units = busctl_call_systemd1_mgr("ListUnitsByNames", "as", 1, , "--", $unit_name)->{data}->[0]; if (scalar(@{$units}) == 0) { return 0; } -- cgit 1.4.1