Move the shellcheck overrides for `SC3045` to the individual occurrences
instead of disabling this check globally to not hide valid complains
like:
```
In modules.d/01fips/fips.sh line 97:
read -d '' -r FIPSMODULES < /etc/fipsmodules
^-- SC3045 (warning): In POSIX sh, read -d is undefined.
```
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
# https://github.com/koalaman/shellcheck/wiki/SC3013
# ... but dash supports it
disable=SC3013
-
-# SC3045: In POSIX sh, read -p is undefined.
-# https://github.com/koalaman/shellcheck/wiki/SC3045
-# ... but dash supports it
-disable=SC3045
echo
echo
echo "Enter additional kernel command line parameter (end with ctrl-d or .)"
+# In POSIX sh, read -p is undefined, but dash supports it
+# shellcheck disable=SC3045
while read -r -p "> " ${BASH:+-e} line || [ -n "$line" ]; do
[ "$line" = "." ] && break
[ -n "$line" ] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf
if getarg "rd.cmdline=ask"; then
echo "Enter additional kernel command line parameter (end with ctrl-d or .)"
+ # In POSIX sh, read -p is undefined, but dash supports it
+ # shellcheck disable=SC3045
while read -r -p "> " ${BASH:+-e} line || [ -n "$line" ]; do
[ "$line" = "." ] && break
echo "$line" >> /etc/cmdline.d/99-cmdline-ask.conf