Debian Codegraph @

setup/files/LinuxMint/17/drbl-client-boot.conf

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