summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-15 00:47:32 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-15 00:47:32 +0000
commita8afbc2d0fe8dfdd2d9b170156cfbdee5c1b4fe7 (patch)
treed72a4b8abd3f0b1fff57784d9b7e0988aea7dacf /net-misc/cbqinit/files
parentMark 0.8.10 stable on alpha, mark 0.8.11 ~alpha (diff)
downloadhistorical-a8afbc2d0fe8dfdd2d9b170156cfbdee5c1b4fe7.tar.gz
historical-a8afbc2d0fe8dfdd2d9b170156cfbdee5c1b4fe7.tar.bz2
historical-a8afbc2d0fe8dfdd2d9b170156cfbdee5c1b4fe7.zip
Clean up ebuild, add a patch from Fedora, and add back in missing KEYWORDS along with arm love.
Package-Manager: portage-2.0.53_rc7
Diffstat (limited to 'net-misc/cbqinit/files')
-rw-r--r--net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch53
-rw-r--r--net-misc/cbqinit/files/digest-cbqinit-0.7.3-r11
-rw-r--r--net-misc/cbqinit/files/rc_cbqinit-r113
3 files changed, 67 insertions, 0 deletions
diff --git a/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch
new file mode 100644
index 000000000000..edd78da2451e
--- /dev/null
+++ b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch
@@ -0,0 +1,53 @@
+Use Gentoo friendly config paths and incorporate
+cbq-0.7.1-avpkt-enhancement.patch from Fedora
+
+--- cbqinit
++++ cbqinit
+@@ -484,8 +484,8 @@
+ PRIO_REALM_DEFAULT=${PRIO_REALM:-300}
+
+ ### Default CBQ_PATH & CBQ_CACHE settings
+-CBQ_PATH=${CBQ_PATH:-/etc/sysconfig/cbq}
+-CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbq.init}
++CBQ_PATH=${CBQ_PATH:-/etc/cbqinit}
++CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbqinit}
+
+ ### Uncomment to enable logfile for debugging
+ #CBQ_DEBUG="/var/run/cbq-$1"
+@@ -501,6 +501,9 @@
+ CBQ_WORDS="$CBQ_WORDS|PRIO_MARK|PRIO_RULE|PRIO_REALM|BUFFER"
+ CBQ_WORDS="$CBQ_WORDS|LIMIT|PEAK|MTU|QUANTUM|PERTURB"
+
++### Source AVPKT if it exists
++[ -r "${CBQ_PATH}/avpkt" ] && . "${CBQ_PATH}/avpkt"
++AVPKT=${AVPKT:-1000}
+
+ #############################################################################
+ ############################# SUPPORT FUNCTIONS #############################
+@@ -749,7 +752,7 @@
+
+ ### Setup root qdisc + class for device
+ tc qdisc add dev $dev root handle 1 cbq \
+- bandwidth $DEVBWDT avpkt 1000 cell 8
++ bandwidth $DEVBWDT avpkt $AVPKT cell 8
+
+ ### Set weight of the root class if set
+ [ -n "$DEVWGHT" ] &&
+@@ -766,7 +769,7 @@
+ ### Create the class
+ tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \
+ bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \
+- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED ||
++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED ||
+ cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!"
+
+ ### Create leaf qdisc if set
+@@ -940,7 +943,7 @@
+ ### Replace CBQ class
+ tc class replace dev $DEVICE classid 1:$CLASS cbq \
+ bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \
+- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED
++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED
+
+ ### Replace leaf qdisc (if any)
+ if [ "$LEAF" = "tbf" ]; then
diff --git a/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1 b/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1
new file mode 100644
index 000000000000..69332f51a251
--- /dev/null
+++ b/net-misc/cbqinit/files/digest-cbqinit-0.7.3-r1
@@ -0,0 +1 @@
+MD5 c319f136059aadf7b3f0a38a12f3f3e0 cbq.init-v0.7.3 33438
diff --git a/net-misc/cbqinit/files/rc_cbqinit-r1 b/net-misc/cbqinit/files/rc_cbqinit-r1
index 2887db5162bc..b6ffad898e87 100644
--- a/net-misc/cbqinit/files/rc_cbqinit-r1
+++ b/net-misc/cbqinit/files/rc_cbqinit-r1
@@ -1,10 +1,23 @@
#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
+checkconfig() {
+ if [ ! -d /etc/cbqinit ] ; then
+ eerror "You need to create some config files in /etc/cbqinit first"
+ eerror "Please read the README file"
+ return 1
+ fi
+
+ return 0
+}
+
start() {
+ checkconfig || return 1
ebegin "Starting cbqinit"
/usr/sbin/cbqinit start
eend $?