On line 408, fw_update has the expression ${LOCALSRC:#file:}. The parameter
substitution ${name:#word} is not documented in the manual page for ksh yet
its behavior seems to be equivalent to ${LOCALSRC#file:}. Assuming this is
a typo, a patch is provided to remove the colon. If it is not a typo, could
someone explain what this syntax does?

Is this was a typo however, and this parameter substitution is not
officially supported, why did ksh not complain?

Rob

diff --git usr.sbin/fw_update/fw_update.sh usr.sbin/fw_update/fw_update.sh
index 4b77d4c7bd7..dbc80257228 100644
--- usr.sbin/fw_update/fw_update.sh
+++ usr.sbin/fw_update/fw_update.sh
@@ -405,7 +405,7 @@ if [ "$LOCALSRC" ]; then
                FWURL="${LOCALSRC}"
                LOCALSRC=
        else
-               LOCALSRC="${LOCALSRC:#file:}"
+               LOCALSRC="${LOCALSRC#file:}"
                ! [ -d "$LOCALSRC" ] &&
                    echo "The path must be a URL or an existing directory"
>&2 &&
                    exit 1

Reply via email to