[OpenWrt-Devel] [PATCH] mvebu: Replace backticks by $(...)

Rosen Penev rosenp at gmail.com
Wed Jul 24 12:54:07 EDT 2019


On Wed, Jul 24, 2019 at 6:34 AM Adrian Schmutzler
<freifunk at adrianschmutzler.de> wrote:
>
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
>  target/linux/mvebu/base-files/lib/upgrade/linksys.sh | 2 +-
>  target/linux/mvebu/base-files/sbin/fan_ctrl.sh       | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
> index 3f45d6cac5..ddf24836bc 100644
> --- a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
> +++ b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
> @@ -6,7 +6,7 @@ linksys_get_target_firmware() {
>
>         local cur_boot_part mtd_ubi0
>
> -       cur_boot_part=`/usr/sbin/fw_printenv -n boot_part`
> +       cur_boot_part=$(/usr/sbin/fw_printenv -n boot_part)
>         if [ -z "${cur_boot_part}" ] ; then
>                 mtd_ubi0=$(cat /sys/devices/virtual/ubi/ubi0/mtd_num)
>                 case $(egrep ^mtd${mtd_ubi0}: /proc/mtd | cut -d '"' -f 2) in
egrep is deprecated as well. I'm assuming you're running these through
shellcheck.
> diff --git a/target/linux/mvebu/base-files/sbin/fan_ctrl.sh b/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
> index 06e462119d..4234668317 100755
> --- a/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
> +++ b/target/linux/mvebu/base-files/sbin/fan_ctrl.sh
> @@ -1,8 +1,8 @@
>  #!/bin/sh
>
> -CPU_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon2/temp1_input`
> -DDR_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon1/temp1_input`
> -WIFI_TEMP=`cut -c1-2 /sys/class/hwmon/hwmon1/temp2_input`
> +CPU_TEMP=$(cut -c1-2 /sys/class/hwmon/hwmon2/temp1_input)
> +DDR_TEMP=$(cut -c1-2 /sys/class/hwmon/hwmon1/temp1_input)
> +WIFI_TEMP=$(cut -c1-2 /sys/class/hwmon/hwmon1/temp2_input)
>
>  CPU_LOW=85
>  CPU_HIGH=95
> --
> 2.20.1
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list