Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 102763 Details for
Bug 156297
net-misc/shaperd (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/shaperd
shaperd (text/plain), 1.52 KB, created by
Tomasz Mon
on 2006-11-26 11:39:25 UTC
(
hide
)
Description:
files/shaperd
Filename:
MIME Type:
Creator:
Tomasz Mon
Created:
2006-11-26 11:39:25 UTC
Size:
1.52 KB
patch
obsolete
>#!/sbin/runscript > >start() { > ebegin "Starting shaperd: " > for c in `ls -1 /etc/shaper | grep "shaper\.[0123456789]\.cfg$" | cut -d '.' -f2 | cut -d '.' -f1` > do > if [ ! -f /var/run/shaperd.$c.pid ];then > echo -n "shaperd.$c " > /sbin/shaperd -config=$c > fi > done > echo >} > >stop() { > ebegin "Shutting down shaperd: " > for c in `ls -1 /etc/shaper | grep "shaper\.[0123456789]\.cfg$" | cut -d '.' -f2 | cut -d '.' -f1` > do > if [ -f /var/run/shaperd.$c.pid ];then > pid=`cat /var/run/shaperd.$c.pid` > echo -n "shaperd.$c " > if [ `ps ax | grep shaperd | grep $pid | wc -l` -eq 1 ];then > kill $pid 2> /dev/null > a=0 > while [ `ps ax | grep shaperd | grep $pid | wc -l` -eq 1 ];do > echo -n "." > sleep 1 > a=`expr $a + 1` > if [ $a -ge 60 ];then > kill -9 $pid 2> /dev/null > rm -f /var/run/shaperd.$c.pid > echo "-9 killed" > break > fi > done > rm -f /var/run/shaperd.$c.pid > echo killed > else > rm -f /var/run/shaperd.$c.pid > echo "is dead but PID exists - removed PID file." > fi > fi > done >} > >status() { > echo -n "Status of shaperd: " > echo > for c in `ls -1 /etc/shaper | grep "shaper\.[0123456789]\.cfg$" | cut -d '.' -f2 | cut -d '.' -f1` > do > if [ -f /var/run/shaperd.$c.pid ];then > pid=`cat /var/run/shaperd.$c.pid` > fin=`ps j $pid | grep shaperd | wc -l` > if [ $fin -eq 1 ];then > echo "shaperd.$c is working" > else > echo "shaperd.$c is'nt working but PID file exists" > fi > else > echo "shaperd.$c is stopped" > fi > done >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 156297
:
102762
| 102763 |
102764