Last change
on this file was 2167cfe, checked in by William Harrington <kb0iic@…>, 11 years ago |
bootscripts are the scripts used for the sysvinit book.
|
-
Property mode
set to
100644
|
File size:
821 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | # Begin $rc_base/init.d/random
|
---|
3 |
|
---|
4 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
5 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
6 | # Random script elements by Larry Lawrence
|
---|
7 |
|
---|
8 | #$LastChangedBy: bdubbs $
|
---|
9 | #$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
|
---|
10 |
|
---|
11 | . /etc/sysconfig/rc
|
---|
12 | . $rc_functions
|
---|
13 |
|
---|
14 | case "$1" in
|
---|
15 | start)
|
---|
16 | boot_mesg "Initializing kernel random number generator..."
|
---|
17 | if [ -f /var/tmp/random-seed ]; then
|
---|
18 | /bin/cat /var/tmp/random-seed >/dev/urandom
|
---|
19 | fi
|
---|
20 | /bin/dd if=/dev/urandom of=/var/tmp/random-seed \
|
---|
21 | count=1 &>/dev/null
|
---|
22 | evaluate_retval
|
---|
23 | ;;
|
---|
24 |
|
---|
25 | stop)
|
---|
26 | boot_mesg "Saving random seed..."
|
---|
27 | /bin/dd if=/dev/urandom of=/var/tmp/random-seed \
|
---|
28 | count=1 &>/dev/null
|
---|
29 | evaluate_retval
|
---|
30 | ;;
|
---|
31 |
|
---|
32 | *)
|
---|
33 | echo "Usage: $0 {start|stop}"
|
---|
34 | exit 1
|
---|
35 | ;;
|
---|
36 | esac
|
---|
37 |
|
---|
38 | # End $rc_base/init.d/random
|
---|
Note:
See
TracBrowser
for help on using the repository browser.