tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Random string generation during *-install



Jean-Yves Migeon
> What is the correct way of generating a fixed random string on 
> pre-install or do-install stage?
> 
> I Was thinking along the line "openssl rand -hex <size>" , however I 
> can't seem to find any example in current pkgsrc nor any other 
> equivalent command. Is it safe to assume that openssl is available at 
> this stage even on !NetBSD platforms?
> 
Once I had to do something similar in a shell script and replace bash(1)
$RANDOM with a portable alternative.

I went for awk(1), initial ideas are at http://awk.info/?tip/random


Home | Main Index | Thread Index | Old Index