Add ip route during runtime
Hi,
is there any way to add a route to my ip configuration during runtime?
I should assign the same configuration that I can define with this command from terminal:
ip route add {NETWORK/MASK} via {GATEWAYIP}
but I would like that the project itself could assign it (I have variables containing required IP addresses).
I know that is a root configuration from terminal, so using PBCL_SysLinuxShell_1 is not possible.
Is there any FB or any other way?
Thanks,
Marcello
Comments
Hi!
As variant, you can modify sudoers config, to allow plcnext_firmware user to execute /sbin/ip command as root and without password involve.That can be one of workarounds. And PBCL_SysLinuxShell_1 can be used in this configuration .
In file /etc/sudoers.d/axcf2152-sudoers
add line plcnext_firmware ALL=(ALL) NOPASSWD: /sbin/ip
Please, be careful, when deal with this operation. It can damage your system in case of mistake.
BR
Thanks a lot Alex!
Very helpful!
Marcello