wok rev 22023
Remove cat process
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 20 12:39:13 2019 +0200 (2019-10-20) |
parents | d6c7b77095a9 |
children | 997d7021a367 |
files | linux-zram/stuff/compcache linux64-zram/stuff/compcache sdft/stuff/sdft syslinux/stuff/iso2exe/iso2exe.sh |
line diff
1.1 --- a/linux-zram/stuff/compcache Sun Oct 20 11:32:40 2019 +0100 1.2 +++ b/linux-zram/stuff/compcache Sun Oct 20 12:39:13 2019 +0200 1.3 @@ -8,11 +8,11 @@ 1.4 1.5 NAME="compcache" 1.6 DESC="$(_ '%s daemon' compcache)" 1.7 -EXIST=$(cat /proc/swaps | grep zram0) 1.8 +EXIST="$(grep -s zram0 /proc/swaps)" 1.9 1.10 case "$1" in 1.11 start) 1.12 - if [ -n "$EXIST" ] ; then 1.13 + if [ "$EXIST" ] ; then 1.14 _ '%s is already running.' $NAME 1.15 exit 1 1.16 fi
2.1 --- a/linux64-zram/stuff/compcache Sun Oct 20 11:32:40 2019 +0100 2.2 +++ b/linux64-zram/stuff/compcache Sun Oct 20 12:39:13 2019 +0200 2.3 @@ -8,11 +8,11 @@ 2.4 2.5 NAME="compcache" 2.6 DESC="$(_ '%s daemon' compcache)" 2.7 -EXIST=$(cat /proc/swaps | grep zram0) 2.8 +EXIST="$(grep -s zram0 /proc/swaps)" 2.9 2.10 case "$1" in 2.11 start) 2.12 - if [ -n "$EXIST" ] ; then 2.13 + if [ "$EXIST" ] ; then 2.14 _ '%s is already running.' $NAME 2.15 exit 1 2.16 fi
3.1 --- a/sdft/stuff/sdft Sun Oct 20 11:32:40 2019 +0100 3.2 +++ b/sdft/stuff/sdft Sun Oct 20 12:39:13 2019 +0200 3.3 @@ -121,8 +121,8 @@ 3.4 extract 'NoDisplay' 3.5 extract 'MimeType' | semicolon 3.6 3.7 - cat $WORKING/section | sort | sed -n '/^$/!p' 3.8 - [ "$REMOVE_OTHER" != 'yes' ] && cat $WORKING/rest | sed -n '/^$/!p' 3.9 + sort < $WORKING/section | sed -n '/^$/!p' 3.10 + [ "$REMOVE_OTHER" != 'yes' ] && sed -n '/^$/!p' < $WORKING/rest 3.11 } > $WORKING/new 3.12 3.13
4.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh Sun Oct 20 11:32:40 2019 +0100 4.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh Sun Oct 20 12:39:13 2019 +0200 4.3 @@ -47,7 +47,7 @@ 4.4 store 24 $SIZE $1 4.5 OFS=$(( 0x7FF0 - $SIZE )) 4.6 printf "Adding rootfs.gz file at %04X (%d bytes) ...\n" $OFS $SIZE 4.7 - cat $TMP/rootfs.gz | ddn of=$1 bs=1 seek=$OFS 4.8 + ddn if=$TMP/rootfs.gz of=$1 bs=1 seek=$OFS 4.9 rm -rf $TMP 4.10 } 4.11