about summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-25 17:42:09 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-25 17:42:09 +0200
commit37e6e08cdee082d9f60ab2900c960f2f594933a0 (patch)
tree9fe11ff135be5539ce6f1e0b4f2a89053f2f7bdf /nixos/modules/system
parent7ddcd7b6b69c45739776db5f797a3956c8f5dd78 (diff)
downloadnixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar.gz
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar.bz2
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar.lz
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar.xz
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.tar.zst
nixlib-37e6e08cdee082d9f60ab2900c960f2f594933a0.zip
switch-to-configuration: Use systemctl's --no-legend flag
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl4
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 4cea0c5910c4..7c2d64d2e1a1 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 = `LANG= @systemd@/bin/systemctl list-units --full`;
+    my $lines = `LANG= @systemd@/bin/systemctl list-units --full --no-legend`;
     my $res = {};
     foreach my $line (split '\n', $lines) {
         chomp $line;
         last if $line eq "";
-        $line =~ /^\*?\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s/ or next;
+        $line =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s/ or next;
         next if $1 eq "UNIT";
         $res->{$1} = { load => $2, state => $3, substate => $4 };
     }