service: Fix retriggering of init.d-scripts.
authorMarkus Gothe <markus.gothe@genexis.eu>
Mon, 28 Aug 2023 14:12:01 +0000 (14:12 +0000)
committerFelix Fietkau <nbd@nbd.name>
Mon, 27 Nov 2023 15:55:12 +0000 (16:55 +0100)
commitd852f877920b35f4188dde752e94edb43be596cb
treea25c5aee4e2619a8b038c9be6b7e11dbbcd75d3f
parent2db836553e8fc318143b38dbc6e12b8625cf5c33
service: Fix retriggering of init.d-scripts.

Fix retriggering of init.d-scripts which calls
commands dependent on functional STDIN/STDOUT/STDERR.

If we just close these file descriptors those commands
will not work as expected leading to unwanted
consequences. If we instead redirect the file descriptors
to /dev/null, we will end up the same end-result and these
commands will work as expected.

Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [refactor]
service/trigger.c