Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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