diff options
author | Rui Salvaterra <rsalvaterra@gmail.com> | 2020-06-30 17:23:12 +0100 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-06-30 19:03:15 +0200 |
commit | 835c932ccb6bb43ea94fb28a76fca2019a2f917c (patch) | |
tree | 49fa9d333c26ed354a27095c460f63dc0423d0ea /package/system/zram-swap | |
parent | 69ca308673337b2759d5b188c8d5a4bc73405cb5 (diff) | |
download | upstream-835c932ccb6bb43ea94fb28a76fca2019a2f917c.tar.gz upstream-835c932ccb6bb43ea94fb28a76fca2019a2f917c.tar.bz2 upstream-835c932ccb6bb43ea94fb28a76fca2019a2f917c.zip |
zram-swap: init: replace backticks with $()
This replaces deprecated backticks by more versatile $(...) syntax.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
[add commit description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/system/zram-swap')
-rwxr-xr-x | package/system/zram-swap/files/zram.init | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index 49140ad406..c855bbc087 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -73,7 +73,7 @@ zram_getdev() local zdev=$( zram_dev ) if [ "$(mount | grep $zdev)" ]; then - local idx=`cat /sys/class/zram-control/hot_add` + local idx=$(cat /sys/class/zram-control/hot_add) zdev="$( zram_dev $idx )" fi @@ -89,7 +89,7 @@ zram_comp_algo() return 0 fi - if [ `grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm` -ne 0 ]; then + if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then logger -s -t zram_comp_algo -p daemon.debug "Set compression algorithm '$zram_comp_algo' for zram '$dev'" echo $zram_comp_algo > "/sys/block/$( basename $dev )/comp_algorithm" else @@ -147,8 +147,8 @@ zram_compact() # compact zram device (reduce memory allocation overhead) local zdev="/sys/block/$( basename "$1" )" - local old_mem_used=`awk '{print $3}' <$zdev/mm_stat` - local old_overhead=`awk '{print $3-$2}' <$zdev/mm_stat` + local old_mem_used=$(awk '{print $3}' <$zdev/mm_stat) + local old_overhead=$(awk '{print $3-$2}' <$zdev/mm_stat) echo 1 > $zdev/compact |