~ubuntu-branches/debian/wheezy/byobu/wheezy

« back to all changes in this revision

Viewing changes to bin/network

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-09-21 11:27:09 UTC
  • mfrom: (1.1.5 upstream) (0.1.33 karmic)
  • Revision ID: james.westby@ubuntu.com-20090921112709-uc9331o7ricmafiy
* bin/users: use wc -l, since pgrep -c doesn't work in some
  distros (busybox, Arch), LP: #434047
* byobu.1: fix manpage, mem_used was listed twice, mail was in the wrong
  place, LP: #434052
* byobu-export.1, byobu-launcher.1, byobu-select-profile.1: minor manpage
  fixes, updating the names of the utilities to use "byobu" rather than
  "screen"

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
PKG="byobu"
21
21
 
22
 
# Allow interface overrides in configuration directory
23
 
if [ -r "$HOME/.$PKG/network" ]; then
24
 
        interface=`cat "$HOME/.$PKG/network"`
 
22
# Allow interface overrides in $HOME/.$PKG/status
 
23
if [ -n "$MONITORED_NETWORK" ]; then
 
24
        interface="$MONITORED_NETWORK"
25
25
else
26
26
        interface=`tail -n1 /proc/net/route  | awk '{print $1}'`
27
27
fi
31
31
        exit 0
32
32
fi
33
33
 
 
34
[ -d "/var/run/screen/S-$USER" ] && DIR="/var/run/screen/S-$USER" || DIR="$HOME/.byobu"
34
35
t2=`date +%s`
35
36
for i in up down; do
36
 
        cache="/var/run/screen/S-$USER/$PKG.network_$i"
 
37
        cache="$DIR/$PKG.network_$i"
37
38
        t1=`stat -c %Y "$cache"` 2>/dev/null || t1=0
38
39
        unit="kB/s"
39
40
        if [ $t2 -le $t1 ]; then