Ubuntu Pastebin

Paste from longsleep at Fri, 24 Jul 2015 15:13:01 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# entropy - Entropy check
#   Waits until Kernel has enough entropy available.

description "Entropy"

start on mounted MOUNTPOINT=/

task

console output

pre-start script
	echo " * Waiting for entropy"
	dd if=/dev/urandom of=/dev/null bs=1024 count=10 2>/dev/null
	/etc/init.d/rng-tools start
	while [ $(cat /proc/sys/kernel/random/entropy_avail) -le 200 ]; do sleep 1; done
end script

script
	entropy=$(cat /proc/sys/kernel/random/entropy_avail)
	echo " * Entropy is available now: $entropy bytes"
end script


# firstboot - First boot setup
#   Does setup stuff on very first boot.

description "First boot setup"

start on stopping entropy

task

script
	if [ ! -e /etc/firstboot/firstboot_done ]; then
		run-parts --lsbsysinit --exit-on-error /etc/firstboot/firstboot.d && touch /etc/firstboot/firstboot_done
	fi
end script
Download as text