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;
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 <<EndOfUserList
${concatStringsSep "\n" (map serializedUser users)}
EndOfUserList
done
'' [
activateLib.groups
];