ratox-nuggets

useful ratox related scripts
git clone git://git.2f30.org/ratox-nuggets
Log | Files | Refs | LICENSE

commit cb282dbc43bf619f59111b30df2b663e3a644f74
parent c7389c188334f97ee20e3bd99e55738058065e3d
Author: sin <sin@2f30.org>
Date:   Fri, 10 Oct 2014 11:58:03 +0100

Use fstat instead of lsof

On some systems you need to be root to use lsof.

Diffstat:
Mrat-list | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rat-list b/rat-list @@ -20,7 +20,7 @@ set_state() { # a ratox directory and complain if not. check_if_dir(){ # "grouping hack" to prevent output to stdout on FreeBSD - if ! { lsof id |grep -q '^ratox';} > /dev/null 2>&1 || [ ! -r id ]; then + if ! { fstat id |grep -q 'ratox';} > /dev/null 2>&1 || [ ! -r id ]; then echo "ERROR: Is this a ratox directory?" >&2 exit 1 fi