From b5f963bb8b4be8a8bd9c5cf22aac4419580cc585 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 6 Mar 2009 12:26:16 +0000 Subject: [PATCH] use cat again to create users instead of << "..." this way '`" doesn't have to be escaped (used by avahi) svn path=/nixos/branches/fix-style/; revision=14373 --- system/users-groups.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/users-groups.nix b/system/users-groups.nix index f1bd59a2f36..5dec1f1d1b3 100644 --- a/system/users-groups.nix +++ b/system/users-groups.nix @@ -143,6 +143,9 @@ let inherit (pkgs.stringsWithDeps) FullDepEntry; activateLib = config.system.activationScripts.lib; + + # keep this extra file so that cat can be used to pass special chars such as "`" which is used in the avahi daemon + usersFile = pkgs.writeText "users" (concatStringsSep "\n" (map serializedUser users)); in { @@ -157,7 +160,7 @@ in activationScripts = { users = FullDepEntry '' - while true; do + cat ${usersFile} | while true; do read name || break read description read uid @@ -198,9 +201,7 @@ in ''${home:+--home "$home"} \ --shell "$shell" fi - done <