mirror of
https://github.com/systemd/systemd.git
synced 2025-01-14 23:24:38 +03:00
[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.
This commit is contained in:
parent
bd5f8e7cd1
commit
b7b6562729
@ -8,7 +8,7 @@ HOST="${2%\.[0-9]}"
|
|||||||
TARGET="${2#[0-9]\.}"
|
TARGET="${2#[0-9]\.}"
|
||||||
|
|
||||||
if [ -z "${HOST#[13579]}" ]; then
|
if [ -z "${HOST#[13579]}" ]; then
|
||||||
HOST=`expr ${HOST} - 1`
|
HOST=$((${HOST} - 1))
|
||||||
BUS="1"
|
BUS="1"
|
||||||
else
|
else
|
||||||
BUS="0"
|
BUS="0"
|
||||||
@ -24,7 +24,7 @@ get_dev_number() {
|
|||||||
if [ -e "${x}" ]; then
|
if [ -e "${x}" ]; then
|
||||||
MEDIA=`cat ${x}`
|
MEDIA=`cat ${x}`
|
||||||
if [ "${MEDIA}" = "$2" ]; then
|
if [ "${MEDIA}" = "$2" ]; then
|
||||||
num=`expr ${num} + 1`
|
num=$((${num} + 1))
|
||||||
fi
|
fi
|
||||||
if [ "${x}" = "/proc/ide/${DRIVE}/media" ]; then
|
if [ "${x}" = "/proc/ide/${DRIVE}/media" ]; then
|
||||||
break
|
break
|
||||||
@ -32,7 +32,7 @@ get_dev_number() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo `expr ${num} - 1`
|
echo $((${num} - 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$3" ]; then
|
if [ -z "$3" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user