local cio_accept
if [ -e /boot/zipl/active_devices.txt ]; then
- while read dev etc; do
+ while read -r dev _; do
[ "$dev" = "#" -o "$dev" = "" ] && continue
if [ -z "$cio_accept" ]; then
cio_accept="$dev"
# called by dracut
install() {
if [[ $hostonly_cmdline == "yes" ]]; then
- local _cio_accept=$(cmdline)
+ local _cio_accept
+ _cio_accept=$(cmdline)
[[ $_cio_accept ]] && printf "%s\n" "$_cio_accept" >> "${initdir}/etc/cmdline.d/01cio_accept.conf"
fi
CIO_IGNORE=$(getarg cio_ignore)
CIO_ACCEPT=$(getarg rd.cio_accept)
-if [ -z $CIO_IGNORE ]; then
+if [ -z "$CIO_IGNORE" ]; then
info "cio_ignored disabled on commandline"
return
fi
if [ -n "$CIO_ACCEPT" ]; then
OLDIFS="$IFS"
IFS=,
+ # shellcheck disable=SC2086
set -- $CIO_ACCEPT
while (($# > 0)); do
info "Enabling device $1"
- cio_ignore --remove $1
+ cio_ignore --remove "$1"
shift
done
IFS="$OLDIFS"