What were you expecting them to return? They should only trigger when the eth0 interface goes up.
– mosvyApr 7 at 18:40

1

I'm assuming that your script will be always started before the eth0 interface is already up; if that's not the case, then you'll have to use a loop as in the other answer, or: while ! ip link show eth0 | grep -q 'state UP'; do sleep 2; done.
– mosvyApr 7 at 19:28

Something's wrong, the network/route is not created at boot up. It seems that the result from the cat is up when this first runs but the ip * commands don't seem to have any effect.
– Ricardo AmaralApr 7 at 17:07

1

I might have fixed it... I had 2 boot up tasks on my NAS (this one and other related to something else) and I was getting some errors. I made this task be dependent on the other so that it would only run after the other one was finished. It seems to have worked but will do further testing.
– Ricardo AmaralApr 7 at 17:34

However, I had 2 "boot-up" scheduled tasks on my Synology and I was getting some errors at boot-up. To solve that issue I configure this task to have the other one as pre-task. In other words, the tasks executed in sequence, waiting for the previous task to finish before starting the new one.