It's driving me crazy... I've been googling for an hour now and nothing!

I'm trying to invoke this script:

#!/bin/bash
ethtool -s eth0 wol g
exit

I run it as root: /etc/init.d/wakeonlanconfig

And it gives: /etc/init.d/wakeonlanconfig: line 2: ethtool: command not found

Any ideas what is going on?

link|improve this question

feedback

1 Answer

up vote 3 down vote accepted

The shell environment's path variable doesn't have the directory where ethtool is located. So either add it to your path, or better, just prefix "ethtool" with its full path: /foo/bar/ethtool

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.