diff --git a/iopsys-brcm63xx-arm/eagle/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/eagle/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/eagle/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/eagle/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi diff --git a/iopsys-brcm63xx-arm/koala/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/koala/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/koala/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/koala/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi diff --git a/iopsys-brcm63xx-arm/panda/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/panda/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/panda/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/panda/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi diff --git a/iopsys-brcm63xx-arm/panther/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/panther/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/panther/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/panther/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi diff --git a/iopsys-brcm63xx-arm/tiger/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/tiger/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/tiger/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/tiger/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi diff --git a/iopsys-brcm63xx-arm/zebra/base-files/usr/bin/kv_read b/iopsys-brcm63xx-arm/zebra/base-files/usr/bin/kv_read index 40f55044bcdfcd92ea4c49844bdf85a3aa131446..0968839e0c6a64143da19da7b536fa7784f50384 100755 --- a/iopsys-brcm63xx-arm/zebra/base-files/usr/bin/kv_read +++ b/iopsys-brcm63xx-arm/zebra/base-files/usr/bin/kv_read @@ -1,7 +1,7 @@ #!/bin/sh -DEVPARAM_FILE="/data/config/device_params" -DEVPARAM="$1" +readonly DEVPARAM_FILE="/data/config/device_params" +readonly DEVPARAM="$1" if [ ! -f $DEVPARAM_FILE ]; then fw_printenv -n $DEVPARAM @@ -9,7 +9,7 @@ if [ ! -f $DEVPARAM_FILE ]; then fi if [ -n "$DEVPARAM" ]; then - grep $DEVPARAM $DEVPARAM_FILE | awk -F'=' '{print$2}' + grep "^${DEVPARAM}=" $DEVPARAM_FILE | awk -F'=' '{print$2}' else cat $DEVPARAM_FILE fi