mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Use more blocks for dd in ynh_string_random
200 are not enough if you try to generate a 64 characters string.
This commit is contained in:
parent
fbfb8bca38
commit
1c628c8d73
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
|||
# usage: ynh_string_random [length]
|
||||
# | arg: length - the string length to generate (default: 24)
|
||||
ynh_string_random() {
|
||||
dd if=/dev/urandom bs=1 count=200 2> /dev/null \
|
||||
dd if=/dev/urandom bs=1 count=1000 2> /dev/null \
|
||||
| tr -c -d 'A-Za-z0-9' \
|
||||
| sed -n 's/\(.\{'"${1:-24}"'\}\).*/\1/p'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue