summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsutils/e2os.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/sutils/e2os.sh b/sutils/e2os.sh
index fd233b56..10fe5087 100755
--- a/sutils/e2os.sh
+++ b/sutils/e2os.sh
@@ -20,12 +20,16 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
+USAGE="Usage: $0 DEVICE [OS]"
+
DD=${DD-/bin/dd}
OD=${OD-/bin/od}
SED=${SED-/bin/sed}
AWK=${AWK-/bin/gawk}
-USAGE="Usage: $0 DEVICE [OS]"
+# Hack to allow this script to work well under linux too.
+test ! -x "$OD" -a -x /usr/bin/od && OD=/usr/bin/od
+test ! -x "$AWK" -a -x /usr/bin/gawk && AWK=/usr/bin/gawk
while :; do
case "$1" in