11This directory is init scripts for systemd, Upstart, SysVinit and BSD init.
22
3- CMakelist.txt will not deal this directory, because there is no common way to
4- indentify which init program you are using (not only installed), no matter via
3+ CMake will not deal this directory, because there is no common way to indentify
4+ which init program you are using (not only installed), no matter via
55"/proc/1/exe", "/dev/initctl" or other way. So you should do that manually.
66
7- Copy corresponding one to target directory:
7+ You should copy corresponding one to target directory:
88
99 ---------------------------------------------------------------------------
1010 | init program | script file | target directory |
@@ -18,29 +18,58 @@ Copy corresponding one to target directory:
1818If you are new to linux world, here is what you should do accroding to your
1919init program is:
2020
21- 1. systemd
21+ 1. systemd (for example, Arch Linux, Ubuntu 14.X+, Debian 6.0+, openSUSE 11.4+
22+ Fedora 16+, CentOS 6.X+ and Red Hat Enterprise Linux 6.X+)
2223
23- sudo systemctl daemon-reload
24- sudo systemctl enable sudodevd
25- sudo systemctl start sudodevd
24+ Reload daemons config:
25+ sudo systemctl daemon-reload
2626
27- 2. Upstart
27+ Set start targets:
28+ sudo systemctl enable sudodevd
2829
29- sudo initctl reload-configuration
30- sudo initctl start sudodevd
30+ Start it now:
31+ sudo systemctl start sudodevd
3132
32- 3. SysVinit
33+ 2. Upstart (for example, ealier versions of Ubuntu and Debian)
3334
34- echo -n /etc/rc{2,3,4,5}.d/S60sudodevd | \
35- xargs -d ' ' -I{} sudo ln -s /etc/init.d/sudodevd {}
36- echo -n /etc/rc{0,1,6}.d/K60sudodevd | \
37- xargs -d ' ' -I{} sudo ln -s /etc/init.d/sudodevd {}
38- sudo chmod 755 /etc/init.d/sudodevd
39- sudo /etc/init.d/sudodevd start
35+ Reload daemons config:
36+ sudo initctl reload-configuration
4037
41- 4. BSD init
38+ Start it now:
39+ sudo initctl start sudodevd
4240
43- sudo sh -c 'echo sudodevd=YES >> /etc/rc.conf'
44- sudo chmod 755 /etc/rc.d/rc.sudodevd
45- sudo /etc/rc.d/rc.sudodevd start
41+ Start/stop runlevels has been set on sudodevd.conf, it is no need to set
42+ autostart manually.
43+
44+ 3. SysVinit (for example, ealier versions of Fedora, CentOS and RHEL)
45+
46+ Set start/stop runlevels:
47+ echo -n /etc/rc{2,3,4,5}.d/S60sudodevd | \
48+ xargs -d ' ' -I{} sudo ln -s /etc/init.d/sudodevd {}
49+ echo -n /etc/rc{0,1,6}.d/K60sudodevd | \
50+ xargs -d ' ' -I{} sudo ln -s /etc/init.d/sudodevd {}
51+
52+ Set to executable:
53+ sudo chmod 755 /etc/init.d/sudodevd
54+
55+ Start it now:
56+ sudo /etc/init.d/sudodevd start
57+
58+ 4. BSD init (for exmaple, Slackware Linux)
59+
60+ For BSD init, it is a bit complicated, you can not config it only by type
61+ some conmands. You have to write script in some files manually, and, have to
62+ datermind where is sutable to write.
63+
64+ Set start/stop runlevels:
65+ Write the line below to /etc/rc.d/rc.4 and /etc/rc.d/rc.M:
66+ [ -x /etc/rc.d/rc.sudodevd ] && /etc/rc.d/rc.sudodevd start
67+ Write the line below to /etc/rc.d/rc.0, /etc/rc.d/rc.6 and /etc/rc.d/rc.K:
68+ [ -x /etc/rc.d/rc.sudodevd ] && /etc/rc.d/rc.sudodevd stop
69+
70+ Set to executable:
71+ sudo chmod 755 /etc/rc.d/rc.sudodevd
72+
73+ Start it now:
74+ sudo /etc/rc.d/rc.sudodevd start
4675
0 commit comments