Merge pull request 'user-password: fix variables beeing incorrect' (#3229) from user-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3229
This commit is contained in:
@@ -44,12 +44,13 @@ in
|
|||||||
pkgs.mkpasswd
|
pkgs.mkpasswd
|
||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
|
prompt_value=$(cat $prompts/user-password)
|
||||||
if [[ -n ''${prompt_value-} ]]; then
|
if [[ -n ''${prompt_value-} ]]; then
|
||||||
echo $prompt_value | tr -d "\n" > $secrets/user-password
|
echo $prompt_value | tr -d "\n" > $out/user-password
|
||||||
else
|
else
|
||||||
xkcdpass --numwords 3 --delimiter - --count 1 | tr -d "\n" > $secrets/user-password
|
xkcdpass --numwords 3 --delimiter - --count 1 | tr -d "\n" > $out/user-password
|
||||||
fi
|
fi
|
||||||
cat $secrets/user-password | mkpasswd -s -m sha-512 | tr -d "\n" > $secrets/user-password-hash
|
mkpasswd -s -m sha-512 < $out/user-password | tr -d "\n" > $out/user-password-hash
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user