<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tail -f ZS64.log &#187; freebsd</title>
	<atom:link href="http://blog.zs64.net/tag/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zs64.net</link>
	<description>Random Ramblings</description>
	<lastBuildDate>Sat, 18 Jun 2011 17:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Getting sshd to start as early as possible</title>
		<link>http://blog.zs64.net/2011/06/getting-sshd-to-start-as-early-as-possible/</link>
		<comments>http://blog.zs64.net/2011/06/getting-sshd-to-start-as-early-as-possible/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 17:16:01 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=309</guid>
		<description><![CDATA[In FreeBSD, sshd by default gets started quite late in the boot process, about the same time a console will show the login prompt. There’s quite a few services that can make trouble and hang before that. Annoyingly, you can’t fix a stuck system via ssh, since it’s not started yet. But as it turns [...]]]></description>
			<content:encoded><![CDATA[<p>In FreeBSD, sshd by default gets started quite late in the boot process, about the same time a console will show the login prompt. There’s quite a few services that can make trouble and hang before that. Annoyingly, you can’t fix a stuck system via ssh, since it’s not started yet. But as it turns out, sshd can be started quite a bit earlier than FreeBSD does by default.</p>
<p>The rcorder keywords in /etc/rc.d/sshd normally look like this:</p>
<pre># PROVIDE: sshd
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
</pre>
<p>Change the rcorder keywords like so:</p>
<pre># PROVIDE: sshd
# REQUIRE: NETWORKING cleanvar
# BEFORE: mountcritremote
# KEYWORD: shutdown</pre>
<p>&nbsp;</p>
<p>Now sshd will be started right after the network has been configured.</p>
<p>Note that starting sshd before certain parts of the system are ready might give you temporary or permanent errors. For example, starting sshd before the user home directories are mounted might cause problems with logins. However, if your machine has all critical filesystems on local disks, making these changes should not pose any problems, and will allow you to log in while the rc scripts are still running, giving you the opportunity to fix any misbehaving services.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2011/06/getting-sshd-to-start-as-early-as-possible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running bash as root&#8217;s shell only when it&#8217;s not broken</title>
		<link>http://blog.zs64.net/2011/06/running-bash-as-roots-shell-only-when-its-not-broken/</link>
		<comments>http://blog.zs64.net/2011/06/running-bash-as-roots-shell-only-when-its-not-broken/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 16:35:18 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[ash]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=304</guid>
		<description><![CDATA[I like bash, mostly for its interactive features over FreeBSD’s standard Bourne-compatible shell, ash. Setting bash as the default shell for the root user however has a big downside: if you ever break bash or any of the libraries it depends on, you can&#8217;t log in as root anymore to fix it. I’ve tried quite [...]]]></description>
			<content:encoded><![CDATA[<p>I like bash, mostly for its interactive features over FreeBSD’s standard Bourne-compatible shell, ash.</p>
<p>Setting bash as the default shell for the root user however has a big downside: if you ever break bash or any of the libraries it depends on, you can&#8217;t log in as root anymore to fix it. I’ve tried quite a few ways to work around this, and I think I’ve finally figured out a good solution: leave the root shell as /bin/sh, and add this snippet at the end of /root/.profile:</p>
<pre>[ -z "$BASH" ] &amp;&amp; /usr/local/bin/bash -c 'true' &amp;&amp; exec /usr/local/bin/bash</pre>
<p>This will start bash, but only if the shell sourcing .profile isn&#8217;t bash, and bash can actually successfully be executed.</p>
<p>In FreeBSD 9, ash has apparently grown command name completion. Together with the editing functions (already available in FreeBSD 7), this might allow me to switch to ash as the default shell.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2011/06/running-bash-as-roots-shell-only-when-its-not-broken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD, CUPS and iPad printing</title>
		<link>http://blog.zs64.net/2011/05/freebsd-cups-and-ipad-printing/</link>
		<comments>http://blog.zs64.net/2011/05/freebsd-cups-and-ipad-printing/#comments</comments>
		<pubDate>Thu, 19 May 2011 21:48:08 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[clp 315]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[samsung]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=300</guid>
		<description><![CDATA[For the longest time, I couldn’t get CUPS configured on my FreeBSD server successfully. Between CUPS access rules, foomatic drivers and avahi announcements, I had terrible trouble making heads or tails of the nondescript error messages I was getting. Spurned on by the arrival of an iPad, I finally sat down and worked through configuring [...]]]></description>
			<content:encoded><![CDATA[<p>For the longest time, I couldn’t get CUPS configured on my FreeBSD server successfully. Between CUPS access rules, foomatic drivers and avahi announcements, I had terrible trouble making heads or tails of the nondescript error messages I was getting.</p>
<p>Spurned on by the arrival of an iPad, I finally sat down and worked through configuring CUPS and avahi. So I don&#8217;t have to go through all the fiddling again, here&#8217;s <a title="FreeBSD, CUPS and iPad printing" href="http://wiki.zs64.net/FreeBSD,_CUPS_and_iPad_printing">a recipe of what I did</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2011/05/freebsd-cups-and-ipad-printing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with IPv6</title>
		<link>http://blog.zs64.net/2010/03/getting-started-with-ipv6/</link>
		<comments>http://blog.zs64.net/2010/03/getting-started-with-ipv6/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 22:19:36 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hurricane electric]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=253</guid>
		<description><![CDATA[Getting started with IPv6 on FreeBSD with Hurricane Electric&#8217;s free Tunnelbroker service is really straightforward. Since I&#8217;m behind a residential ADSL connection, my IPv4 address changes every 24 hours, so whenever that happens, the Tunnelbroker needs to learn my new address. We&#8217;ve put up a quick how-to on the wiki on how to do that.]]></description>
			<content:encoded><![CDATA[<p>Getting started with IPv6 on FreeBSD with Hurricane Electric&#8217;s free Tunnelbroker service is really straightforward. Since I&#8217;m behind a residential ADSL connection, my IPv4 address changes every 24 hours, so whenever that happens, the Tunnelbroker needs to learn my new address. We&#8217;ve put up a <a href="http://wiki.zs64.net/Tunnelbroker.net_and_dynamic_IP_address_on_FreeBSD">quick how-to on the wiki</a> on how to do that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2010/03/getting-started-with-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD ppp(8): work around invalid remote address</title>
		<link>http://blog.zs64.net/2009/08/freebsd-ppp8-work-around-invalid-remote-address/</link>
		<comments>http://blog.zs64.net/2009/08/freebsd-ppp8-work-around-invalid-remote-address/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 16:51:56 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[ppp]]></category>
		<category><![CDATA[umts]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=159</guid>
		<description><![CDATA[How to fix a ppp problem when trying to establish a connection via a Huawei E169 UMTS USB stick.]]></description>
			<content:encoded><![CDATA[<p>When connecting via a Huawai E169 UTMS USB stick through O2 Germany&#8217;s network, the data stick or the network suggests a PPP IPCP remote address of 0.0.0.0. FreeBSD refuses to ifconfig the tun interface with this endpoint address.</p>
<p>Fortunately, <a href="http://www.FreeBSD.org/cgi/man.cgi?query=ppp&#038;apropos=0&#038;sektion=0&#038;manpath=FreeBSD+8-current&#038;format=html">ppp(8)</a> offers a configuration parameter to influence the IP addresses negotiated with the peer (ifaddr), and suggesting a different address will make the configuration work.</p>
<p>If you get this log output from ppp, you need to configure address selection:</p>
<blockquote>
<pre>IPCP: deflink: RecvConfigAck(4) state = Req-Sent
IPCP:  IPADDR[6] 10.68.235.57
IPCP:  PRIDNS[6] 193.189.244.197
IPCP:  SECDNS[6] 193.189.244.205
IPCP: deflink: State change Req-Sent --&gt; Ack-Rcvd
IPCP: deflink: RecvConfigReq(47) state = Ack-Rcvd
IPCP:   [EMPTY]
IPCP: deflink: SendConfigAck(47) state = Ack-Rcvd
IPCP:   [EMPTY]
IPCP: deflink: State change Ack-Rcvd --&gt; Opened
IPCP: deflink: LayerUp.
IPCP: myaddr 10.68.235.57 hisaddr = 0.0.0.0
Warning: iface add: ioctl(SIOCAIFADDR, 10.68.235.57 -&gt; 0.0.0.0): Destination address required
Error: ipcp_InterfaceUp: unable to set ip address</pre>
</blockquote>
<p>Here&#8217;s my complete ppp.conf, with the ifaddr line included:</p>
<blockquote>
<pre>u3g:
	set device /dev/cuaU0.0
	set speed 115200
	<strong>set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0</strong>
	set authname internet
	set authkey  internet
	set log local phase ipcp
	set dial "ABORT BUSY TIMEOUT 2 \
		\"\" \
		AT OK-AT-OK \
		AT+CFUN=1 OK-AT-OK \
		AT+CMEE=2 OK-AT-OK \
		AT+CSQ OK \
		AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
		AT+CGACT? OK-AT-OK \
		AT+CGATT? OK \
		AT+CGCLASS? OK \
		AT+COPS? OK \
		ATD*99***1# CONNECT"
	set crtscts on
	nat enable yes
	add default HISADDR
	disable dns</pre>
</blockquote>
<p>This applies to both 7-stable and 8-stable (with both the old and the new USB stacks). I&#8217;ve used <a href="http://www.FreeBSD.org/cgi/man.cgi?query=u3g&#038;apropos=0&#038;sektion=0&#038;manpath=FreeBSD+8-current&#038;format=html">u3g(4)</a> on both occasions. The original ppp.conf for 3G modems is based off <a href="http://people.freebsd.org/~n_hibma/pppconfig.html">this one from Nick Hibma</a>.</p>
<p>This is how it looks like when using ifaddr:</p>
<blockquote>
<pre>IPCP:  PRIDNS[6] 10.11.12.13
IPCP:  SECDNS[6] 10.11.12.14
IPCP:  PRINBNS[6] 10.11.12.13
IPCP: MS NBNS req 130 - NAK??
IPCP:  SECNBNS[6] 10.11.12.14
IPCP: MS NBNS req 132 - NAK??
IPCP: deflink: SendConfigReq(2) state = Req-Sent
IPCP:  IPADDR[6] 10.0.0.1
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: RecvConfigReq(50) state = Req-Sent
IPCP:   [EMPTY]
IPCP: deflink: SendConfigNak(50) state = Req-Sent
IPCP:  IPADDR[6] 10.0.0.2
IPCP: deflink: RecvConfigRej(2) state = Req-Sent
IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
IPCP: deflink: SendConfigReq(3) state = Req-Sent
IPCP:  IPADDR[6] 10.0.0.1
IPCP: deflink: RecvConfigNak(3) state = Req-Sent
IPCP:  IPADDR[6] 10.42.237.110
IPCP:  IPADDR[6] changing address: 10.0.0.1  --&gt; 10.42.237.110
IPCP: deflink: SendConfigReq(4) state = Req-Sent
IPCP:  IPADDR[6] 10.42.237.110
IPCP: deflink: RecvConfigAck(4) state = Req-Sent
IPCP:  IPADDR[6] 10.42.237.110
IPCP: deflink: State change Req-Sent --&gt; Ack-Rcvd
IPCP: deflink: RecvConfigReq(51) state = Ack-Rcvd
IPCP:   [EMPTY]
IPCP: deflink: SendConfigAck(51) state = Ack-Rcvd
IPCP:   [EMPTY]
IPCP: deflink: State change Ack-Rcvd --&gt; Opened
IPCP: deflink: LayerUp.
IPCP: myaddr 10.42.237.110 hisaddr = 10.0.0.2
PPP ON freebsd-current&gt;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2009/08/freebsd-ppp8-work-around-invalid-remote-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonts are finally coming to the web</title>
		<link>http://blog.zs64.net/2009/07/fonts-are-finally-coming-to-the-web/</link>
		<comments>http://blog.zs64.net/2009/07/fonts-are-finally-coming-to-the-web/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 20:19:41 +0000</pubDate>
		<dc:creator>stb</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.zs64.net/?p=94</guid>
		<description><![CDATA[I have to admit that I didn&#8217;t follow developments too closely for the last couple of years, but I was rather surprised today to find that Safari 4, Firefox 3.5 and Internet Explorer 6 to 8 support downloadable TrueType fonts in a compatible and useful manner. Slashdot post, linked Slate article, nice overview page. A [...]]]></description>
			<content:encoded><![CDATA[<p>I have to admit that I didn&#8217;t follow developments too closely for the last couple of years, but I was rather surprised today to find that Safari 4, Firefox 3.5 and Internet Explorer 6 to 8 support downloadable TrueType fonts in a compatible and useful manner.</p>
<p><a href="http://tech.slashdot.org/story/09/07/16/1335256/Typography-On-the-Web-Gets-Different?art_pos=11">Slashdot post</a>, linked <a href="http://www.slate.com/id/2222745/">Slate article</a>, nice <a href="http://craigmod.com/journal/font-face/">overview page</a>.</p>
<p>A couple of things that are buried in the pages linked above, but which helped me to get up to speed:</p>
<ul>
<li><a href="http://code.google.com/p/ttf2eot/wiki/Demo">CSS rules</a>:</li>
</ul>
<blockquote>
<pre style="padding-left: 30px; "><span style="color: #000000;">&lt;style&gt;</span><span style="color: #000000;">
</span><span style="color: #000000;">@font</span><span style="color: #000000;">-</span><span style="color: #000000;">face </span><span style="color: #000000;">{</span><span style="color: #000000;">
    font</span><span style="color: #000000;">-</span><span style="color: #000000;">family</span><span style="color: #000000;">:</span><span style="color: #000000;"> </span><span style="color: #000000;">"testing"</span><span style="color: #000000;">;</span><span style="color: #000000;">
    src</span><span style="color: #000000;">:</span><span style="color: #000000;"> url</span><span style="color: #000000;">(</span><span style="color: #000000;">"output.ttf"</span><span style="color: #000000;">)</span><span style="color: #000000;"> format</span><span style="color: #000000;">(</span><span style="color: #000000;">"truetype"</span><span style="color: #000000;">);</span><span style="color: #000000;">
</span><span style="color: #000000;">}</span><span style="color: #000000;">
</span><span style="color: #000000;">&lt;/style&gt;</span><span style="color: #000000;">
</span><span style="color: #000000;">&lt;!--[if IE]&gt;
    &lt;style&gt;
    @font-face {
        font-family: "testing";
        src: url("output.eot");
    }
    &lt;/style&gt;
&lt;![endif]--&gt;</span><span style="color: #000000;">
</span><span style="color: #000000;">&lt;div</span><span style="color: #000000;"> </span><span style="color: #000000;">style</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">font</span><span style="color: #000000;">-</span><span style="color: #000000;">family</span><span style="color: #000000;">:</span><span style="color: #000000;"> testing</span><span style="color: #000000;">"</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">
Hello, Multiple Browser World!
</span><span style="color: #000000;">&lt;/div&gt;</span></pre>
</blockquote>
<ul>
<li><a href="http://www.webfonts.info/wiki/index.php?title=Fonts_available_for_%40font-face_embedding">Fonts available free of charge or under free licenses</a></li>
<li><a href="http://code.google.com/p/ttf2eot/">Utility to convert TTF into EOT files</a> (should be available as a FreeBSD port as www/ttf2eot shortly)</li>
</ul>
<p>Now I just need to quickly build a WordPress and a MediaWiki template, and we&#8217;re all set <img src='http://blog.zs64.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<ul></ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.zs64.net/2009/07/fonts-are-finally-coming-to-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

