[Mpd-users] Re: MSS and mpd
Harald Schmalzbauer
h at schmalzbauer.de
Thu Mar 18 03:21:35 PST 2004
Am Donnerstag, 18. März 2004 09:57 schrieb Michael Bretterklieber:
> Hi,
>
> On Thu, 18 Mar 2004, Harald Schmalzbauer wrote:
> > Thank you very much for investigating. Since I don't have any spare line
> > I was forced to reselect PPTP.
>
> no problem, the better solution would be having a ng_tcpmss rather then
> passing every TCP-SYN packet to Mpd.
Hmm, this really sounds good. Great idea, but again I can't help since I
hardly speak C.
I also would love to see mpd in the FreeBSD base-system. I know that GENERIC
doesn't include NETGRAPH at all but afaik all modules can be loaded at
runtime.
I did it for me privatly, if someone's interested, here's my diff (mpd with PF
on -current with line disconnect at 5 past 6 in the morning since the
provider forces 24h disconnect and refreshing PF and ntp)
Thanks all,
-Harry
--- /dev/null Thu Mar 18 12:00:21 2004
+++ /etc/rc.d/mpd Thu Mar 18 00:38:54 2004
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD: src/etc/rc.d/mpd, $
+#
+
+# PROVIDE: mpd
+# REQUIRE: netif isdnd
+# KEYWORD: FreeBSD nojail
+
+. /etc/rc.subr
+
+name=mpd
+rcvar="mpd_enable"
+start_cmd="mpd_start"
+stop_cmd="killall mpd"
+pidfile="/var/run/${name}.pid"
+
+mpd_start()
+{
+ # start mpd daemon
+ #
+
+ echo "Starting mpd..."
+ /usr/local/sbin/mpd -b -c 2121 -p $pidfile
+
+}
+
+load_rc_config $name
+run_rc_command "$1"
--- /etc/rc.d/NETWORKING.orig Thu Mar 18 12:16:30 2004
+++ /etc/rc.d/NETWORKING Tue Mar 16 02:37:05 2004
@@ -5,7 +5,7 @@
#
# PROVIDE: NETWORKING NETWORK
-# REQUIRE: dhclient netif routing network_ipv6 isdnd ppp-user
+# REQUIRE: dhclient netif mpd routing network_ipv6 isdnd ppp-user
# REQUIRE: routed mrouted route6d mroute6d
# KEYWORD: FreeBSD
--- /etc/defaults/rc.conf.orig Thu Mar 18 12:10:16 2004
+++ /etc/defaults/rc.conf Thu Mar 18 12:09:20 2004
@@ -133,6 +133,8 @@
ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf.
ppp_user="root" # Which user to run ppp as
+mpd_enable="NO"
+
### Network daemon (miscellaneous) ###
syslogd_enable="YES" # Run syslog daemon (or NO).
syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a
different one.
--- /dev/null Thu Mar 18 12:18:17 2004
+++ /etc/rc.local Wed Mar 17 23:57:45 2004
@@ -0,0 +1,3 @@
+echo "loading PF rules..."
+sleep 10
+pfctl -f /etc/pf.conf -e
--- /etc/crontab.orig Thu Mar 18 12:11:39 2004
+++ /etc/crontab Thu Mar 18 00:48:35 2004
@@ -17,10 +17,12 @@
0 * * * * root newsyslog
#
# Perform daily/weekly/monthly maintenance.
-1 3 * * * root periodic daily
-15 4 * * 6 root periodic weekly
-30 5 1 * * root periodic monthly
+#1 3 * * * root periodic daily
+#15 4 * * 6 root periodic weekly
+#30 5 1 * * root periodic monthly
#
# Adjust the time zone if the CMOS clock keeps local time, as opposed to
# UTC time. See adjkerntz(8) for details.
1,31 0-5 * * * root adjkerntz -a
+# Zwecks Zwangstrennung und dynamischer IP ein reload alle 24h
+5 6 * * * root /usr/local/sbin/reconnect.sh
--- /dev/null Thu Mar 18 12:12:17 2004
+++ /usr/local/sbin/reconnect.sh Thu Mar 18 00:41:41 2004
@@ -0,0 +1,14 @@
+#!/bin/sh
+echo "stoping mpd (M-net PPTP)"
+/etc/rc.d/mpd stop
+pfctl -F all
+echo "waiting 70 seconds until reconnect.................."
+sleep 70
+/etc/rc.d/mpd start
+sleep 10
+echo "reinitialising Packet Filter..."
+pfctl -f /etc/pf.conf
+echo "updating timeserver..."
+/etc/rc.d/ntpd stop
+/etc/rc.d/ntpd start
+echo "reconnect done. "
>
> > I'm very interested in things going on, but couldn't find a web interface
> > for the mpd-users list, which is the one from
> > http://sourceforge.net/projects/mpd isn't it?
>
> http://lists.sourceforge.net/lists/listinfo/mpd-users
>
> bye,
> --
> ------------------------------- ----------------------------------
> Michael Bretterklieber - http://www.bretterklieber.com
> A-Quadrat Automation GmbH - http://www.a-quadrat.at
> Tel: ++43-(0)3172-41679 - GSM: ++43-(0)699 12861847
> ------------------------------- ----------------------------------
> "...the number of UNIX installations has grown to 10, with more
> expected..." - Dennis Ritchie and Ken Thompson, June 1972
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040318/264fbc5a/attachment.bin
More information about the freebsd-current
mailing list