Hi,

I suppose this has no been runtime tested since `$(${PIDCOUNT} + 1)`
will attempt to execute `${PIDCOUNT}` as command in a subshell with '+'
and '1' passed as arguments to it:

  root@OpenWrt:~# PIDCOUNT=1; PIDCOUNT="$(${PIDCOUNT} + 1)"; echo
"$PIDCOUNT"
  -ash: 1: not found

I think the proper fix should be something like:

  PIDCOUNT=$((PIDCOUNT + 1))

or even:

  local pid_file="/var/run/logread.$((++PIDCOUNT)).pid"

... without an explicit separate assignment.

~ Jo

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to