summary refs log tree commit diff
path: root/nixos/modules/system
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 16:58:36 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12 16:58:36 +0100
commit4cada34b7f85b95c5e1c071ed629b7e6876a8a9a (patch)
tree2e7925bbf9a16475a154d75e5c8e28283e240a21 /nixos/modules/system
parent86038eaa1d46394fb7b596468bd9d5064582dd8b (diff)
downloadnixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar.gz
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar.bz2
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar.lz
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar.xz
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.tar.zst
nixpkgs-4cada34b7f85b95c5e1c071ed629b7e6876a8a9a.zip
Properly handle unit names with dashes in them
We ended up with files in /etc/systemd/system called
"bigx2ddata.mount.wants" rather than "big\x2ddata.mount.wants".
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/boot/systemd.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index c1fb2c45165..7c6807340fd 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -348,14 +348,14 @@ let
 
       ${concatStrings (mapAttrsToList (name: unit:
           concatMapStrings (name2: ''
-            mkdir -p $out/${name2}.wants
-            ln -sfn ../${name} $out/${name2}.wants/
+            mkdir -p $out/'${name2}.wants'
+            ln -sfn '../${name}' $out/'${name2}.wants'/
           '') unit.wantedBy) cfg.units)}
 
       ${concatStrings (mapAttrsToList (name: unit:
           concatMapStrings (name2: ''
-            mkdir -p $out/${name2}.requires
-            ln -sfn ../${name} $out/${name2}.requires/
+            mkdir -p $out/'${name2}.requires'
+            ln -sfn '../${name}' $out/'${name2}.requires'/
           '') unit.requiredBy) cfg.units)}
 
       ln -s ${cfg.defaultUnit} $out/default.target