[tor-bugs] #30075 [Core Tor/Tor]: shellcheck: contrib/dist/tor.sh.in issues

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Apr 8 07:55:26 UTC 2019


#30075: shellcheck: contrib/dist/tor.sh.in issues
------------------------------+--------------------
     Reporter:  rl1987        |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 {{{

 In contrib/dist/tor.sh.in line 20:
 DAEMON=/usr/sbin/tor
 ^----^ SC2034: DAEMON appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 21:
 NAME=tor
 ^--^ SC2034: NAME appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 22:
 DESC="tor daemon"
 ^--^ SC2034: DESC appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 24:
 TORPID=$TORPIDDIR/tor.pid
 ^----^ SC2034: TORPID appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 25:
 WAITFORDAEMON=60
 ^-----------^ SC2034: WAITFORDAEMON appears unused. Verify use (or export
 if used externally).


 In contrib/dist/tor.sh.in line 26:
 ARGS=""
 ^--^ SC2034: ARGS appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 30:
    . /etc/rc.d/init.d/functions
      ^------------------------^ SC1091: Not following:
 /etc/rc.d/init.d/functions was not specified as input (see shellcheck -x).


 In contrib/dist/tor.sh.in line 32:
    . /etc/init.d/functions
      ^-------------------^ SC1091: Not following: /etc/init.d/functions
 was not specified as input (see shellcheck -x).


 In contrib/dist/tor.sh.in line 50:
     SUPROG=/bin/su
     ^----^ SC2034: SUPROG appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 56:
         system_max=`cat /proc/sys/fs/file-max`
                    ^-------------------------^ SC2006: Use $(...) notation
 instead of legacy backticked `...`.


 In contrib/dist/tor.sh.in line 80:
 NICE=""
 ^--^ SC2034: NICE appears unused. Verify use (or export if used
 externally).


 In contrib/dist/tor.sh.in line 86:
                 echo -n "Raising maximum number of filedescriptors (ulimit
 -n) to $MAX_FILEDESCRIPTORS"
                      ^-- SC2039: In POSIX sh, echo flags are undefined.


 In contrib/dist/tor.sh.in line 87:
                 if ulimit -n "$MAX_FILEDESCRIPTORS" ; then
                           ^-- SC2039: In POSIX sh, ulimit -n is undefined.


 In contrib/dist/tor.sh.in line 94:
     action $"Starting tor:" $TORCTL start
            ^--------------^ SC2039: In POSIX sh, $".." is undefined.


 In contrib/dist/tor.sh.in line 99:
     action $"Stopping tor:" $TORCTL stop
            ^--------------^ SC2039: In POSIX sh, $".." is undefined.


 In contrib/dist/tor.sh.in line 104:
     action $"Restarting tor:" $TORCTL restart
            ^----------------^ SC2039: In POSIX sh, $".." is undefined.


 In contrib/dist/tor.sh.in line 109:
     action $"Reloading tor:" $TORCTL reload
            ^---------------^ SC2039: In POSIX sh, $".." is undefined.

 For more information:
   https://www.shellcheck.net/wiki/SC2034 -- ARGS appears unused. Verify
 use (...
   https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, $".." is
 undefined.
   https://www.shellcheck.net/wiki/SC1091 -- Not following:
 /etc/init.d/functi...
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30075>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list