# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
- read "$1" <<< "${BASH_REMATCH[1]}"
+ read "$1" <<< "${BASH_REMATCH[1]}"
elif [[ $3 != -* ]]; then
# Only read next arg if it not an arg itself.
- read "$1" <<< "$3"
- # There is no way to shift our callers args, so
- # return 1 to indicate they should do it instead.
- return 1
+ read "$1" <<< "$3"
+ # There is no way to shift our callers args, so
+ # return 1 to indicate they should do it instead.
+ return 1
fi
}
--preload) read_args modname "$@" || shift
basicmodules="$basicmodules $modname";;
--image-version) img_vers=yes;;
- --rootfs) read_args rootfs "$@" || shift
+ --rootfs) read_args rootfs "$@" || shift
dracut_args="${dracut_args} --filesystems $rootfs";;
--nocompress) dracut_args="$dracut_args --no-compress";;
--help) usage -n;;
--allow-missing) ;;
--net-dev*) ;;
--noresume) ;;
- --rootdev*) ;;
- --thawdev*) ;;
- --rootopts*) ;;
- --root*) ;;
- --loopdev*) ;;
- --loopfs*) ;;
- --loopopts*) ;;
- --looppath*) ;;
- --dsdt*) ;;
+ --rootdev*) ;;
+ --thawdev*) ;;
+ --rootopts*) ;;
+ --root*) ;;
+ --loopdev*) ;;
+ --loopfs*) ;;
+ --loopopts*) ;;
+ --looppath*) ;;
+ --dsdt*) ;;
--bootchart) ;;
*) if [[ ! $target ]]; then
target=$1
[[ $img_vers ]] && target="$target-$kernel"
if [[ $basicmodules ]]; then
- dracut $dracut_args --add-drivers "$basicmodules" "$target" "$kernel"
+ dracut $dracut_args --add-drivers "$basicmodules" "$target" "$kernel"
else
- dracut $dracut_args "$target" "$kernel"
+ dracut $dracut_args "$target" "$kernel"
fi