aanuke: check both /net and /net.alt (thanks, mischief)

This commit is contained in:
stanley lieber 2014-04-14 19:24:27 -04:00
parent 1c3e6a3e5a
commit d8e4904d0a

View file

@ -1,6 +1,6 @@
#!/bin/rc
rfork e
for(i in `{ps | grep -e '[ ]+aan$' | awk '{print $2}'}){
if(! grep -s -e '[ ]+\/net\/tcp\/[0-9]+\/data$' /proc/$i/fd)
if(! grep -s -e '[ ]+\/net(\.alt)?\/tcp\/[0-9]+\/data$' /proc/$i/fd)
echo '@{echo kill>/proc/'$i'/note} # aan (idle)'
}