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
This commit is contained in:
Marc Weber 2009-03-06 12:26:16 +00:00
parent 0d48a73987
commit b5f963bb8b

View File

@ -143,6 +143,9 @@ let
inherit (pkgs.stringsWithDeps) FullDepEntry; inherit (pkgs.stringsWithDeps) FullDepEntry;
activateLib = config.system.activationScripts.lib; 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 in
{ {
@ -157,7 +160,7 @@ in
activationScripts = { activationScripts = {
users = FullDepEntry '' users = FullDepEntry ''
while true; do cat ${usersFile} | while true; do
read name || break read name || break
read description read description
read uid read uid
@ -198,9 +201,7 @@ in
''${home:+--home "$home"} \ ''${home:+--home "$home"} \
--shell "$shell" --shell "$shell"
fi fi
done <<EndOfUserList done
${concatStringsSep "\n" (map serializedUser users)}
EndOfUserList
'' [ '' [
activateLib.groups activateLib.groups
]; ];