Ifup service showing error

Something like

auto eth0
iface eth0 inet static
    post-up /sbin/ethtool -s eth0 wol g

Configuration needs to be done within /etc/network/interfaces

Creating interfaces.d/eth0 will lead to duplicate configuration and issues.

Thanks for reply, I have just copied “Jappe” recommended eth0 file. i will remember “Joulinar” advice also to remember that i added this new file if my machine will make any problem. i always avoid to edit dietpi files so i am not daring to edit /etc/network/interfaces . is it not possible that make WOL enable for all devices in default by adding post-up /sbin/ethtool -s eth0 wol g in dietpi default interfaces files.

Just delete /etc/network/interfaces.d/eth0 and modify /etc/network/interfaces directly, or if you wanna keep the extra file then delete the rules for eth0 from /etc/network/interfaces, otherwise you have multiple configs for the same interface.

You would need to set wol for every interface by its own.