Browse Source

samba4: remove double quotes for renice

The double quote thells the shell that the list returned from `pidof` is a
single argument, therefore, `renice` will cry about a malformed input.
With this commit, `renice` will be applied correctly to all the returned PIDs
from `pidof`.

The output of `renice` for the quoted list is as follows:
`renice: invalid number '6592 6587 6586 6574'`
`renice` does not show and does apply the nice value if the list is unquoted.

Signed-off-by: Oever González <notengobattery@gmail.com>
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
lilik-openwrt-22.03
Oever González 5 years ago
committed by Jan Pavlinec
parent
commit
c45974d0a3
No known key found for this signature in database GPG Key ID: 60244CCEFB39E584
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      net/samba4/files/samba.init

+ 4
- 4
net/samba4/files/samba.init View File

@ -211,9 +211,9 @@ start_service() {
fi fi
# lower priority using renice (if found) # lower priority using renice (if found)
if [ -x /usr/bin/renice ]; then if [ -x /usr/bin/renice ]; then
[ -x /usr/sbin/samba ] && renice -n 2 "$(pidof samba)"
[ -x /usr/sbin/smbd ] && renice -n 2 "$(pidof smbd)"
[ -x /usr/sbin/nmbd ] && renice -n 2 "$(pidof nmbd)"
[ -x /usr/sbin/winbindd ] && renice -n 2 "$(pidof winbindd)"
[ -x /usr/sbin/samba ] && renice -n 2 $(pidof samba)
[ -x /usr/sbin/smbd ] && renice -n 2 $(pidof smbd)
[ -x /usr/sbin/nmbd ] && renice -n 2 $(pidof nmbd)
[ -x /usr/sbin/winbindd ] && renice -n 2 $(pidof winbindd)
fi fi
} }

Loading…
Cancel
Save