nixos/switch-to-configuration: fix units starting with dash

Fix units starting with `-` being recognized as options.

Changed files
+1 -1
nixos
modules
system
+1 -1
nixos/modules/system/activation/switch-to-configuration.pl
···
# 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];
if (scalar(@{$units}) == 0) {
return 0;
}
···
# 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];
if (scalar(@{$units}) == 0) {
return 0;
}