package/quagga: Add systemd.service file
PATCH v3 1/1 package/quagga: Add systemd.service file
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/env is needed as systemd doesn't allow the instance variable (%i) in the executable path.
We don't enable these services by default as this would require creating configuration and /etc/default files. (And is easily achieved with an FS overlay)
---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support it
Changes v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use /usr/bin/env instead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about /usr/bin/env
- Explain not enabling the service on build in patch
--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 package/quagga/quagga at .service
package/quagga/quagga.mk +2 -0
@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))
package/quagga/quagga at .service new file +20 -0
@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.service + +[Service] +Type=simple +EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixed +KillSignal=SIGINT +Restart=on-failure +RestartSec=1 + +[Install] +WantedBy=multi-user.target +
Signature · 1 line
2.8.1
PATCH v3 1/1 package/quagga: Add systemd.service file
Hi Nathaniel, all
Quoted 55 lines · Nathaniel Roach
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support itChanges v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use/usr/bin/envinstead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about/usr/bin/env
- Explain not enabling the service on build in patch--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 package/quagga/quagga at .servicepackage/quagga/quagga.mk +2
-0@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))package/quagga/quagga at .service new file +0
-0
package/quagga/quagga at .service line 4
Quoted 4 lines
package/quagga/quagga at .service new file +4
-0@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.service
Just a though, I read about why you added the Wants, maybe a comment would be nice here ?
package/quagga/quagga at .service line 7
Quoted 3 lines
package/quagga/quagga at .service new file +3
-0+ +[Service] +Type=simple
Since you have removed the '--daemon' option, maybe you should revert this to "forking" ?
package/quagga/quagga at .service line 14
Quoted 7 lines
package/quagga/quagga at .service new file +7
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixed +KillSignal=SIGINT
If I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
package/quagga/quagga at .service line 16
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+Restart=on-failure +RestartSec=1
Why ?
Quoted 11 lines
package/quagga/quagga at .service new file +4
-1+ +[Install] +WantedBy=multi-user.target + --2.8.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 package/quagga: Add systemd.service file
Hi Maxime,
Quoted 64 lines · Maxime Hadjinlian
Hi Nathaniel, all
Quoted 55 lines · Nathaniel Roach
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support itChanges v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use/usr/bin/envinstead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about/usr/bin/env
- Explain not enabling the service on build in patch--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)create mode 100644 package/quagga/quagga at .service
package/quagga/quagga.mk +2
-0@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))package/quagga/quagga at .service new file +0
-0package/quagga/quagga at .service line 4
Quoted 4 lines
package/quagga/quagga at .service new file +4
-0@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.serviceJust a though, I read about why you added the Wants, maybe a comment would be nice here ?
Quoted 5 lines
package/quagga/quagga at .service line 7
Quoted 3 lines
package/quagga/quagga at .service new file +3
-0+ +[Service] +Type=simpleSince you have removed the '--daemon' option, maybe you should revert this to "forking" ?
I might have it backwards, but it would need "forking" if --daemon was specified, otherwise "systemctl start quagga at ospfd" would hang.
Quoted 5 lines
Quoted 5 lines
package/quagga/quagga at .service new file +5
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID
Quoted 8 lines
package/quagga/quagga at .service line 14
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+KillMode=mixed +KillSignal=SIGINTIf I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
KillMode=Mixed is an artefact left over from the OpenVPN .service file I used as a reference. I (again) misread the systemd docs and left it in as it seemed more appropriate than the default if any child processes are started. This can be removed on commit, or I'll fix it if there's any other things that need to be changed.
Quoted 3 lines
package/quagga/quagga at .service line 16
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+Restart=on-failure +RestartSec=1Why ?
I've had ospfd crash during configuration and general usage, this is undesirable as it's responsible for keeping a large amount of routes in my router's tables.
Quoted 11 lines
Quoted 11 lines
package/quagga/quagga at .service new file +4
-1+ +[Install] +WantedBy=multi-user.target + --2.8.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 package/quagga: Add systemd.service file
Hi Nathaniel,
Quoted 82 lines · Nathaniel Roach
Hi Maxime,
Quoted 70 lines · Maxime Hadjinlian
Hi Nathaniel, all
Quoted 57 lines · Nathaniel Roach
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support itChanges v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use/usr/bin/envinstead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about/usr/bin/env
- Explain not enabling the service on build in patch--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)create mode 100644 package/quagga/quagga at .service
package/quagga/quagga.mk +2
-0@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))at .service renamed from package/quagga/quagga +0
-0b/package/quagga/quagga at .service
new file mode 100644
index 0000000..16acc30package/quagga/quagga at .service line 4
Quoted 4 lines
package/quagga/quagga at .service new file +4
-0@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.serviceJust a though, I read about why you added the Wants, maybe a comment would be nice here ?
Quoted 1 line
Quoted 6 lines
package/quagga/quagga at .service line 7
Quoted 3 lines
package/quagga/quagga at .service new file +3
-0+ +[Service] +Type=simpleSince you have removed the '--daemon' option, maybe you should revert this to "forking" ?
Quoted 2 lines
I might have it backwards, but it would need "forking" if --daemon was specified, otherwise "systemctl start quagga at ospfd" would hang.
You are absolutely right, I am the one that got confused. I missed the '-d' on the ExecStart line in the services in the quagga sources.
Quoted 16 lines
Quoted 15 lines
package/quagga/quagga at .service line 14
Quoted 8 lines
package/quagga/quagga at .service new file +7
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixed +KillSignal=SIGINTIf I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
Quoted 5 lines
KillMode=Mixed is an artefact left over from the OpenVPN .service file I used as a reference. I (again) misread the systemd docs and left it in as it seemed more appropriate than the default if any child processes are started. This can be removed on commit, or I'll fix it if there's any other things that need to be changed.
Thanks for the explanation.
Quoted 9 lines
Quoted 5 lines
package/quagga/quagga at .service line 16
Quoted 3 lines
package/quagga/quagga at .service new file +2
-0+Restart=on-failure +RestartSec=1Why ?
I've had ospfd crash during configuration and general usage, this is undesirable as it's responsible for keeping a large amount of routes in my router's tables.
I was thinking about the RestartSec delay, I agree on the "on-failure".
Quoted 14 lines
Quoted 12 lines
Quoted 12 lines
package/quagga/quagga at .service new file +4
-1+ +[Install] +WantedBy=multi-user.target + --2.8.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 package/quagga: Add systemd.service file
Quoted 101 lines · Maxime Hadjinlian
Hi Nathaniel,
Quoted 71 lines · Nathaniel Roach
Hi Maxime,
Quoted 66 lines · Maxime Hadjinlian
Hi Nathaniel, all
Quoted 56 lines · Nathaniel Roach
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support itChanges v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use/usr/bin/envinstead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about/usr/bin/env
- Explain not enabling the service on build in patch--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)create mode 100644 package/quagga/quagga at .service
package/quagga/quagga.mk +2
-0@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))at .service renamed from package/quagga/quagga +0
-0b/package/quagga/quagga at .service
new file mode 100644
index 0000000..16acc30package/quagga/quagga at .service line 4
Quoted 4 lines
package/quagga/quagga at .service new file +4
-0@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.serviceJust a though, I read about why you added the Wants, maybe a comment would be nice here ?
Quoted 7 lines
Quoted 5 lines
package/quagga/quagga at .service line 7
Quoted 3 lines
package/quagga/quagga at .service new file +3
-0+ +[Service] +Type=simpleSince you have removed the '--daemon' option, maybe you should revert this to "forking" ?
I might have it backwards, but it would need "forking" if --daemon was specified, otherwise "systemctl start quagga at ospfd" would hang.
You are absolutely right, I am the one that got confused. I missed the '-d' on the ExecStart line in the services in the quagga sources.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
package/quagga/quagga at .service new file +5
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPIDQuoted 8 lines
package/quagga/quagga at .service line 14
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+KillMode=mixed +KillSignal=SIGINTIf I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
Quoted 5 lines
KillMode=Mixed is an artefact left over from the OpenVPN .service file I used as a reference. I (again) misread the systemd docs and left it in as it seemed more appropriate than the default if any child processes are started. This can be removed on commit, or I'll fix it if there's any other things that need to be changed.
Quoted 8 lines
Thanks for the explanation.
Quoted 6 lines
Quoted 3 lines
package/quagga/quagga at .service line 16
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+Restart=on-failure +RestartSec=1Why ?
I've had ospfd crash during configuration and general usage, this is undesirable as it's responsible for keeping a large amount of routes in my router's tables.
I was thinking about the RestartSec delay, I agree on the "on-failure".
Oh, derp. I didn't pick 1 second for any reason other than it's quickest. If there's a good argument for longer it can be set longer.
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
package/quagga/quagga at .service new file +4
-1+ +[Install] +WantedBy=multi-user.target + --2.8.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 package/quagga: Add systemd.service file
In reply to Maxime HadjinlianOh, and it's not 0 such that it won't restart and hog resources quite as badly if it's instantly dieing.
Quoted 121 lines · Maxime Hadjinlian
Hi Nathaniel,
Quoted 71 lines · Nathaniel Roach
Hi Maxime,
Quoted 66 lines · Maxime Hadjinlian
Hi Nathaniel, all
Quoted 56 lines · Nathaniel Roach
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support itChanges v1 -> v2:
(As suggested by Arnout Vandecappelle)
- Completely remove shim and use/usr/bin/envinstead
- Don't tell quagga to fork as systemd prefers it
- Add comment to .service file about/usr/bin/env
- Explain not enabling the service on build in patch--- package/quagga/quagga.mk | 2 ++ package/quagga/quagga at .service | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)create mode 100644 package/quagga/quagga at .service
package/quagga/quagga.mk +2
-0@@ -75,6 +75,8 @@ endif define QUAGGA_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf + $(INSTALL) -D -m 644 package/quagga/quagga at .service \ + $(TARGET_DIR)/usr/lib/systemd/system/quagga at .service endef $(eval $(autotools-package))at .service renamed from package/quagga/quagga +0
-0b/package/quagga/quagga at .service
new file mode 100644
index 0000000..16acc30package/quagga/quagga at .service line 4
Quoted 4 lines
package/quagga/quagga at .service new file +4
-0@@ -0,0 +1,20 @@ +[Unit] +Description=Quagga %i routing daemon +ConditionFileIsExecutable=/usr/sbin/%i +Wants=quagga at zebra.serviceJust a though, I read about why you added the Wants, maybe a comment would be nice here ?
Quoted 7 lines
Quoted 5 lines
package/quagga/quagga at .service line 7
Quoted 3 lines
package/quagga/quagga at .service new file +3
-0+ +[Service] +Type=simpleSince you have removed the '--daemon' option, maybe you should revert this to "forking" ?
I might have it backwards, but it would need "forking" if --daemon was specified, otherwise "systemctl start quagga at ospfd" would hang.
You are absolutely right, I am the one that got confused. I missed the '-d' on the ExecStart line in the services in the quagga sources.
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
package/quagga/quagga at .service new file +5
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPIDQuoted 8 lines
package/quagga/quagga at .service line 14
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+KillMode=mixed +KillSignal=SIGINTIf I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
Quoted 5 lines
KillMode=Mixed is an artefact left over from the OpenVPN .service file I used as a reference. I (again) misread the systemd docs and left it in as it seemed more appropriate than the default if any child processes are started. This can be removed on commit, or I'll fix it if there's any other things that need to be changed.
Thanks for the explanation.
Quoted 6 lines
Quoted 3 lines
package/quagga/quagga at .service line 16
Quoted 2 lines
package/quagga/quagga at .service new file +2
-0+Restart=on-failure +RestartSec=1Why ?
I've had ospfd crash during configuration and general usage, this is undesirable as it's responsible for keeping a large amount of routes in my router's tables.
I was thinking about the RestartSec delay, I agree on the "on-failure".
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
package/quagga/quagga at .service new file +4
-1+ +[Install] +WantedBy=multi-user.target + --2.8.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 package/quagga: Add systemd.service file
Quoted 3 lines · Nathaniel Roach
Oh, and it's not 0 such that it won't restart and hog resources quite as badly if it's instantly dieing.
The default is 100ms, do you think that's still too fast ? Usually it's enough but if you encounter problem and 1s is the shortest it can do, then 1s it is.
Other than that:
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 6 lines
Quoted 6 lines
package/quagga/quagga at .service new file +6
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixedQuoted 8 lines
Quoted 1 line
+KillSignal=SIGINT
If I understand correctly, what you want to do is send a SIGINT to the main processes and SIGKILL to the other ? From the services file I can find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you already explained in your previous mail and I missed, sorry if that's the case).
KillMode=Mixed is an artefact left over from the OpenVPN .service file I used as a reference. I (again) misread the systemd docs and left it in as it
seemed more appropriate than the default if any child processes are started.
This can be removed on commit, or I'll fix it if there's any other things that need to be changed.
[...]
PATCH v3 1/1 package/quagga: Add systemd.service file
Ah, another case of me misinterpreting defaults. This can also be removed if it's preferred to leave it as default.
Quoted 34 lines · Maxime Hadjinlian
Quoted 1 line · Nathaniel Roach
Oh, and it's not 0 such that it won't restart and hog resources quite
as
Quoted 2 lines
badly if it's instantly dieing.
The default is 100ms, do you think that's still too fast ? Usually it's enough but if you encounter problem and 1s is the shortest it can do, then 1s it is.
Other than that:
Reviewed-by Maxime Hadjinlian <[email protected]>[...]Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
package/quagga/quagga at .service line 14
Quoted 7 lines
package/quagga/quagga at .service new file +7
-0+EnvironmentFile=/etc/default/quagga-%i +PrivateTmp=true +# Systemd doesn't like having %i in the executable path. +ExecStart=/usr/bin/env /usr/sbin/%i $OPTS -f /etc/quagga/%i.conf +ExecReload=/bin/kill -HUP $MAINPID +KillMode=mixed +KillSignal=SIGINTIf I understand correctly, what you want to do is send a SIGINT to
the
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
main processes and SIGKILL to the other ? From the services file I
can
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
find in major distro, they don't specify it so it's left to the default SIGTERM, why did you need to change that ? (Maybe you
already
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
explained in your previous mail and I missed, sorry if that's the case).
KillMode=Mixed is an artefact left over from the OpenVPN .service
file I
Quoted 1 line
Quoted 1 line
Quoted 1 line
used as a reference. I (again) misread the systemd docs and left it
Quoted 8 lines
in as
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
it
seemed more appropriate than the default if any child processes are started.
This can be removed on commit, or I'll fix it if there's any otherthings
Quoted 1 line
Quoted 1 line
Quoted 1 line
that need to be changed.
[...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160703/7807af0b/attachment.html>
PATCH v3 1/1 package/quagga: Add systemd.service file
In reply to Nathaniel RoachQuoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Nathaniel" == Nathaniel Roach <[email protected]> writes:
Use a template service file as all of the daemons use almost identical arguments and generally appear the same to the init system.
We "Wants=" zebra as that's the daemon for interfacing to the kernel, and it's not required for the other daemons to work but it's probably going to be used in nearly all setups.
/usr/bin/envis needed as systemd doesn't allow the instance variable (%i) in the executable path.We don't enable these services by default as this would require creating configuration and
/etc/defaultfiles. (And is easily achieved with an FS overlay)
Quoted 8 lines
Signed-off-by Nathaniel Roach <[email protected]>---
Changes v2 -> v3:
- Remove invalid references to quagga.service (Arnout)
- Check if the binary is executable before trying to start it (Arnout)
- Remove PID file arguments and options (Arnout)
- Add reload capability as the daemons do support it
Committed after removing killmode/killsignal/restartsec as suggested by Maxime, thanks.
Signature · 1 line
Bye, Peter Korsgaard