|
Page 12 of 13 |
|
Prev |
2 10 11 12
13
|
Next
Re: Multiple boot videos?
ehm... this line is ONLY for generating a RANDOM number (because $RANDOM doesn't seem to work).
it makes a copy (dd) of /dev/urandom but only of the first block (count 1) and deletes the rest (2> /dev/null). because urandom doesn't only consists of numbers - but we want a number/integer - you have to change this using the checksum (cksum). but this checksum is way too long so we are cutting (cut) it off. (: i'm only searching for another way of getting randomness in my script on startup. i tried it with rn=$(date +%S) which saves only the seconds of the current timestamp in rn... but on startup date-command only counts up and doesn't show the actual time :( so i'm only getting 1 and 2... -.- i've been searching google for the last few hours... but i can't find anything useful... btw: i'm awake for over 40 hours... my eyes are bloody-red... so i'll go in my bed now ^^ if somebody knows a solution for getting a random number at startup... please post :) good night. (: |
Re: Multiple boot videos?
Quote:
Code:
start on starting shutdownCode:
grep shutdown /etc/event.d/* |
Re: Multiple boot videos?
Editing the first line in rvid to :
"start on starting shutdown" made it run 3 diff. for now.... I have to go but try one more... Look all right to me now! Loop went like this: 1 2 5 1 2 5 Only 3 loops now |
Re: Multiple boot videos?
as far as i understand /dev/urandom gets seeded with noise from drivers during operations from the user.
so if you just startup and shutdown there are very small chances that there are any differences. unfortunately i don't know when the entropy pool gets seeded exactly. it could be when you open any app. but it could be that it's only seeded when special things happen. so my suggestion would be a "longer" testing of this: 1. edit /etc/event.d/rvid and change the line "start on startup" to "start on starting shutdown" and then do "chmod 777 /etc/event.d/rvid" 2. but don't startup and then shutdown your phone immediatly. 3. after startup maybe you want to open different apps. for example: surf the web with browser and things you would also do normally. (hopefully by doing so the pool gets seeded) if this doesn't bring any improvements i could write some additional code which saves some blocks of on shutdown /dev/urandom to a file and then seeds /dev/urandom on startup first before doing my random number generation. (that would be a very freaky solution ^^) one other thing you can do when you have changed to "start on starting shutdown": open /etc/event.d/rvid and comment out the line "rn=$(dd ... )". make a new line right under this one and type "rn=$(date +%s)". Quote:
|
Re: Multiple boot videos?
2 Attachment(s)
blubb... working... the bootvideo gets set on shutdown... here's the code:
Code:
start on starting shutdownedit: instructions and attachment on page 4 updated. and i attached the file here too. (but you could also copy & paste the code from this post ^^) how it works: |
Re: Multiple boot videos?
It did indeed.
I forgot to chmod 777 the file All is good over here... Thanx 2 Tuminoid as well Buddy. where you have updated it? On page 4 it is stated that the last update was done yesterday |
Re: Multiple boot videos?
i would take "rn=$(date +%s)" instead of random number generation out of /dev/urandom.
we just need something which is different every time we look at it and it don't have to be something for strong cryptography. (: |
Re: Multiple boot videos?
Quote:
but i posted the code above. so you could just make a new file and copy & paste it. *G* edit: sorry... but i have to say it... /dev/urandom is a b*tch !!! ^^ |
Re: Multiple boot videos?
Got it!
Cheers |
Re: Multiple boot videos?
wow... that was really tricky... but like hatebreed would shout it:
a lesson lived is a lesson learned :p |
| All times are GMT. The time now is 12:35. |
Page 12 of 13 |
|
Prev |
2 10 11 12
13
|
Next
vBulletin® Version 3.8.8