diff options
author | md@Linux.IT <md@Linux.IT> | 2004-03-01 22:34:08 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:35:06 -0700 |
commit | b7b6562729a661f6ebf4576e9ce90e9228315e93 (patch) | |
tree | eda82d7082168a2a11807822e3ed473f0d464919 /extras/ide-devfs.sh | |
parent | bd5f8e7cd197dcbb11a159c9d7dca9ae62fdd5e8 (diff) |
[PATCH] remove usage of expr in ide-devfs.sh
fix_expr: remove usage of expr in ide-devfs.sh, because it may be in
/usr/bin and not available at early boot time.
Diffstat (limited to 'extras/ide-devfs.sh')
-rw-r--r-- | extras/ide-devfs.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extras/ide-devfs.sh b/extras/ide-devfs.sh index 0a9369dff4..e5bf177f8b 100644 --- a/extras/ide-devfs.sh +++ b/extras/ide-devfs.sh @@ -8,7 +8,7 @@ HOST="${2%\.[0-9]}" TARGET="${2#[0-9]\.}" if [ -z "${HOST#[13579]}" ]; then - HOST=`expr ${HOST} - 1` + HOST=$((${HOST} - 1)) BUS="1" else BUS="0" @@ -24,7 +24,7 @@ get_dev_number() { if [ -e "${x}" ]; then MEDIA=`cat ${x}` if [ "${MEDIA}" = "$2" ]; then - num=`expr ${num} + 1` + num=$((${num} + 1)) fi if [ "${x}" = "/proc/ide/${DRIVE}/media" ]; then break @@ -32,7 +32,7 @@ get_dev_number() { fi done - echo `expr ${num} - 1` + echo $((${num} - 1)) } if [ -z "$3" ]; then |