diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-18 18:45:46 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-18 19:04:45 +0200 |
commit | 313c38d5f1aeda1b065ba9b15380918ebd771c99 (patch) | |
tree | 51fad03fd234bbc040f547ff192a87a16215dfe1 /nixos/modules/system | |
parent | 02b936189cb9cc5c2e33eae686bd95ccb2995196 (diff) | |
download | nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar.gz nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar.bz2 nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar.lz nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar.xz nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.tar.zst nixlib-313c38d5f1aeda1b065ba9b15380918ebd771c99.zip |
switch-to-configuration: Handle systemctl output change
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 13bd0b60f820..f8c1ab12ebfa 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -65,12 +65,12 @@ $SIG{PIPE} = "IGNORE"; sub getActiveUnits { # FIXME: use D-Bus or whatever to query this, since parsing the # output of list-units is likely to break. - my $lines = `@systemd@/bin/systemctl list-units --full`; + my $lines = `LANG= @systemd@/bin/systemctl list-units --full`; my $res = {}; foreach my $line (split '\n', $lines) { chomp $line; last if $line eq ""; - $line =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s/ or next; + $line =~ /^\*?\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s/ or next; next if $1 eq "UNIT"; $res->{$1} = { load => $2, state => $3, substate => $4 }; } |