Hi all!
In the past, I would create custom startup scripts and create a link in the /etc/rc.d/rc5.d/ directory.
Is this still a good practice? If not, please let me know where I should put my custom startup scripts.
Thank you in advance.
regards, j
On Wed, Jul 10, 2013 at 9:19 AM, Jerome Yanga jerome.yanga@gmail.comwrote:
Hi all!
In the past, I would create custom startup scripts and create a link in the /etc/rc.d/rc5.d/ directory.
Is this still a good practice? If not, please let me know where I should put my custom startup scripts.
Thank you in advance.
regards, j
I forgot to mention the following:
# cat /etc/redhat-release Fedora release 19 (Schrödinger’s Cat) # uname -a Linux pc1 3.9.9-301.fc19.x86_64 #1 SMP Thu Jul 4 15:10:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
regards, j
Am 10.07.2013 18:25, schrieb Jerome Yanga:
On Wed, Jul 10, 2013 at 9:19 AM, Jerome Yanga <jerome.yanga@gmail.com mailto:jerome.yanga@gmail.com> wrote:
Hi all! In the past, I would create custom startup scripts and create a link in the /etc/rc.d/rc5.d/ directory. Is this still a good practice? If not, please let me know where I should put my custom startup scripts.
bad practice these days, systemd-units are much more powerful and for oneshot-scripts mostly simpler in the syntax as the sysv-init stuff
http://0pointer.de/public/systemd-man/systemd.service.html http://0pointer.de/public/systemd-man/systemd.unit.html http://0pointer.de/public/systemd-man/systemd.exec.html
systemctl --help man systemctl ________________________
example below enabled with "systemctl enable network-bonding-bridge.service"
[root@rh:~]$ cat /etc/systemd/system/network-bonding-bridge.service [Unit] Description=Network Bonding Bridge After=network.service Before=vmware.service
[Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/bondig-bridge.sh start ExecStop=/usr/local/bin/bondig-bridge.sh stop
[Install] WantedBy=multi-user.target
On Wed, Jul 10, 2013 at 9:39 AM, Reindl Harald h.reindl@thelounge.netwrote:
Am 10.07.2013 18:25, schrieb Jerome Yanga:
On Wed, Jul 10, 2013 at 9:19 AM, Jerome Yanga <jerome.yanga@gmail.com<mailto:
jerome.yanga@gmail.com>> wrote:
Hi all! In the past, I would create custom startup scripts and create a linkin the /etc/rc.d/rc5.d/ directory.
Is this still a good practice? If not, please let me know where Ishould put my custom startup scripts.
bad practice these days, systemd-units are much more powerful and for oneshot-scripts mostly simpler in the syntax as the sysv-init stuff
http://0pointer.de/public/systemd-man/systemd.service.html http://0pointer.de/public/systemd-man/systemd.unit.html http://0pointer.de/public/systemd-man/systemd.exec.html
systemctl --help man systemctl ________________________
example below enabled with "systemctl enable network-bonding-bridge.service"
[root@rh:~]$ cat /etc/systemd/system/network-bonding-bridge.service [Unit] Description=Network Bonding Bridge After=network.service Before=vmware.service
[Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/bondig-bridge.sh start ExecStop=/usr/local/bin/bondig-bridge.sh stop
[Install] WantedBy=multi-user.target
Thank you, Reindl.
j