Debian Codegraph @

setup/files/Ubuntu/drbl-client-boot-default.conf

raw
1 # drbl-client-boot - Init DRBL client boot
2 #
3 # Initialize the DRBL client boot
4
5 description "Init DRBL client boot"
6 author "Steven Shiau <steven _at_ clonezilla org>"
7
8 start on (startup
9 and started rpcbind
10 and started udev)
11
12 task
13
14 console output
15 script
16 echo "Starting drbl-client-boot..."
17 # Prepare the virtual filesystems. Here we do the same things that "mountall" does in mountall.conf (It's actually in the source code of mountall).
18 # none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
19 # none on /dev/shm type tmpfs (rw,nosuid,nodev)
20 # none on /var/run type tmpfs (rw,nosuid,mode=0755)
21 # none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
22 # none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
23 #
24 # Without sleep 1, it seems every 4-5 times of booting, an error
25 # "Can't lock lock /etc/mtab~: timed out" message will shown, and the rest of tasks in this drbl-client-boot service is aborted. Then the DRBL client will fail to finish normal diskless booting.
26 #mkdir -p /dev/pts /dev/shm
27 #mount -t devpts -o rw,noexec,nosuid,gid=tty,mode=0620 none /dev/pts
28 #mount -t tmpfs -o rw,nosuid,nodev none /dev/shm
29 #mount -a
30 # 2012/05/01 Let mountall to deal with all instead of "mount -a", now mountall is better. However, do not use "mountall --daemon" otherwise some mounting will fail.
31 sleep 1
32 mountall
33 # A workaround to avoid mountall issue
34 # Ref: https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/470776
35 sleep 1
36 mount -a -t nfs
37
38 # Commented the following, and start mounted-var since from Ubuntu 11.10, the /var/run is linked to tmpfs /run, and mounted-var will clearn the stale files in /run.
39 # ===Begin====
40 # After "mount -a", we mount /var/{run,lock} to overwrite the one in NFS since we do not want the stale files
41 #mkdir -p /var/run /var/lock
42 #mount -t tmpfs -o rw,nosuid,mode=0755 none /var/run
43 #mount -t tmpfs -o rw,noexec,nosuid,nodev none /var/lock
44 # Once we have /var/run, we have to run mounted-var, but mounted-tmp and mounted-dev are not required.
45 # 2012/05/01 Let now mountall will handle these, so forget these mounted-*.
46 #start mounted-proc
47 #start mounted-run
48 #mkdir /run/lock
49 #start mounted-var
50 #start mounted-tmp
51 #start mounted-debugfs
52 # ===End====
53
54 # Start dbus. No more hal since it's moved to Dbus.
55 start dbus
56
57 # Put a tag file for rcS to start
58 touch /var/run/drbl-client-boot
59
60 # Now we really let mountall service up, it will finish all the rest of signal...
61 service mountall start
62
63 # 2012/05/01 Let now mountall will handle these, so forget these initctl
64 # Emit the events
65 #initctl emit virtual-filesystems
66 #initctl emit local-filesystems
67 #initctl emit remote-filesystems
68 #initctl emit all-swaps
69 #initctl emit all-filesystems
70 #initctl emit filesystem
71 #initctl emit net-device-up IFACE=lo
72 #initctl emit mounting
73 #initctl emit mounted
74 end script