toasting CDs

2007/04/15

The simplest way to create a hybrid CD is to create the image using a directory as the source. All data is shared by default:
hdiutil makehybrid -o /tmp/my.iso yourfolder
Then to burn the image:
hdiutil burn /tmp/my.iso -speed 8
How hard is that?

The following options could also help:

  • -testburn for doing a dry run
  • -sizequery to see if the CD will be big enough
  • -[full]erase for rewritable disks

manual pages are listed at hdiutil and also hdid

pf.conf hell

2007/03/31

so far, I’ve not been able to get packets to flow across the pf.conf interface. Better luck another day! i can see that they’re getting blocked immediately by rule0 but no way to work out what rule0 actually is.

pf & bridging

2007/03/25

as part of tidying up “all those damn cables” and making it possible to walk around the study, I’ve been replacing the long 10+m cables I’ve used over recent years with shorter cross-over cables. Some of the newer NICs support automatic detection of the cable type & you can freely use normal cables instead of cross-over without issues. My soekris box unfortunately doesn’t support this with its 3 onboard NICs.

Anyway, once I’ve got the cross-overs in place, the 2 workhorses, sendai & continuity, are wired directly into the soekris. Setting up a bridge was as easy as:

  • reading the brconfig & bridgename.if man pages
  • setting up hostname.ath0 with the desired IP & subnet
  • configuring hostname.sis0 & sis1 with “up”
  • and creating a simple bridgename.bridge0 linking the three interfaces, and accepting only IP traffic across them

The next step, getting PF to send the traffic the right way, proved a little troublesome….

WP as site root

2007/03/25

About 3 months ago, I was trying to get WP to run my whole site — but still allow access to existing pages. This seemed easy, using the new features of WP2.1 but I couldn’t seem to get the right apache magic. Recently, a few other people have had similar issues (check out WP support forums) and finally the last bits of the puzzle fell into place. It’s a mix of working with the chroot magic on OpenBSD and also correct settings for WP itself. The recipe follows:

I have a symlink from /var/www/htdocs/wordpress back to the original /var/www/wordpress directory that I sync regularly from the subversion repository.

  • Create /var/www/htdocs/.htaccess with following content:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    # END WordPress

  • and then ensure permissions are sorted out appropriately:

    chown root:daemon /var/www/htdocs/.htaccess
    chmod 0644 /var/www/htdocs/.htaccess

  • but that’s still not quite enough to have it run under OpenBSD’s chroot. By default, the permissions places on /var/www/htdocs by httpd.conf prevent WP from performing the rewrite magic, specifically disabling file tests. The way Apache knows whether to direct pages to WP or to the file you asked for is simple - if a file or directory exists with the name you asked for, it will be served up; if nothing exists then your request gets handed over to WP first. So, here are the changes needed to /var/www/conf/httpd.conf:

    # This controls which options the .htaccess files in directories can
    # override. Can also be “All”, or any combination of “Options”, “FileInfo”,
    # “AuthConfig”, and “Limit”
    #
    # AllowOverride None
    AllowOverride FileInfo

  • and then you can set up where you want your blog to appear under WP options menu as usual