feature: fshaper.sh: support tc on NixOS (#6431)

Fixes #6426.
This commit is contained in:
glitsj16 2024-08-07 02:56:46 +00:00 committed by GitHub
parent de85522248
commit 5d68062f12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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