-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to insert random number or string into config files like WiFi #23
Comments
Here's a recipe for a random 6-char string in bash:
We would need to run sed at build time to change relevant files in |
What if we just add this as default to the whole repo, i.e. merge a PR.
Then any different recipe (represented in a PR) would be able to use this
in their configurations. It could also be an initial step towards resolving
this and we could follow up with a change to other config files.
…On Sat, Oct 13, 2018, 12:53 PM Sebastian Silva ***@***.***> wrote:
Here's a recipe for a random 6-char string in bash:
RAND_STRING=`date | md5sum | cut -c 1-6`
We would need to run sed at build time to change relevant files in
builder/files/etc/.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwW5rxi9hp6hqRkWnoIG2uIehrROks5ukXGagaJpZM4W3U7D>
.
|
Yeah the thing is I'm not sure what to implement because there are several levels to this. One could think to do this at first boot, but it will be nearly impossible to get a random bit on first boot on identical hardware without networking or a RTC (unless I'm wrong on that!). This requires some research! |
Hmm, interesting problem! I assume with no microphone or mouse input
there's no ready source of randomness... If we do the wifi ssid could we
poll some networking before we initiate the random number generation?
…On Sat, Oct 20, 2018, 12:43 AM Sebastian Silva ***@***.*** wrote:
Yeah the thing is I'm not sure what to implement because there are several
levels to this.
For one thing there's the hostnames which will interfere if we rely on
mdns/zeroconf - so we need unique hostnames but then they'll be
unpredictable - then there's the wifi hotspot.
One could think to do this at first boot, *but* it will be nearly
impossible to get a random bit on first boot on identical hardware without
networking or a RTC (unless I'm wrong on that!).
This requires some research!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ613RqBRTWyPaGuoymJl96fGMelsks5umqnqgaJpZM4W3U7D>
.
|
How about we decide to make a script that uses the system clock to add 2 random alphanumerics to the end of the WiFi network name. This way the URL stays the same, but we would get |
This could be useful in setting up a whole set of different Raspberry Pis to be used in the same place -- so the WiFi networks won't overlap.
The current default is
00-PiCamera
but we could have this change to00-PiCamera-XXX
whereXXX
is a random string.Maybe this could be a simple shell script to create an environment variable as
$RAND_STRING
or something?The text was updated successfully, but these errors were encountered: