Skip to content

Commit

Permalink
feature: fshaper.sh: support tc on NixOS (#6431)
Browse files Browse the repository at this point in the history
Fixes #6426.
  • Loading branch information
glitsj16 committed Aug 7, 2024
1 parent de85522 commit 5d68062
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/fshaper/fshaper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
# Copyright (C) 2014-2024 Firejail Authors
# License GPL v2

TCFILE=""
if [ -x "/usr/sbin/tc" ]; then
TCFILE="/usr/sbin/tc"
elif [ -x "/sbin/tc" ]; then
TCFILE="/sbin/tc";
else
echo "Error: traffic control utility (tc) not found";
TCFILE="$(PATH=/usr/sbin:/sbin:/run/current-system/sw/bin command -v tc)"
if [ -z "$TCFILE" ]; then
echo "Error: traffic control utility (tc) not found"
exit 1
fi

Expand Down

0 comments on commit 5d68062

Please sign in to comment.