Opened 12 days ago

Last modified 3 days ago

#30075 needs_review defect

shellcheck: contrib/dist/tor.sh.in issues

Reported by: rl1987 Owned by:
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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...

Child Tickets

Change History (2)

comment:1 Changed 12 days ago by nickm

Milestone: Tor: 0.4.1.x-final

batch-assigning shellcheck tickets to 0.4.1

comment:2 Changed 3 days ago by rl1987

Status: newneeds_review

Let's remove this one as well. Reasoning at #30076.

https://github.com/torproject/tor/pull/964

Note: See TracTickets for help on using tickets.