I've got tired of setting up my system after clean installs of -current so I wrote this simple script which I pipe to perl immediately after first boot.
Maybe someone finds it useful. #!/usr/bin/perl # Usage: ftp -o - -V http://dl.ramov.com/bootstrap.pl | perl - use 5.010; use strict; use warnings; die "This script must be run as root.\n" unless $> eq 0; my $arch = qx/machine/; chomp $arch; $ENV{PKG_PATH} = "http://obsd.si/pub/OpenBSD/snapshots/packages/$arch/"; sub install_packages { my @packages = qw/ ImageMagick-- adsuck antiword autocutsel btpd cantarell-fonts droid-fonts dtach fdm git gtk2-rezlooks-engine inconsolata-font ledger mercurial mpg123 mplayer mupdf mutt-1.5.21p0v0 p5-Text-Autoformat p5-ack p7zip-rar perltidy pngcrush ratpoison rxvt-unicode unclutter vorbis-tools w3m-- xcursor-dmz xxxterm /; foreach (@packages) { system('pkg_add', $_); } } sub mount_raid { use List::Util qw/first/; my $DUID = (split(':', first {/duid/} qx/disklabel -n sd3/))[1]; chomp $DUID; $DUID =~ s/^\s+|\s+$//; open my $fstab_fh, '>>', '/etc/fstab' or die "$!"; print {$fstab_fh} "$DUID.a /storage ffs rw,nodev,nosuid,softdep 1 2\n"; close($fstab_fh); mkdir '/storage' or die "$!"; system('mount', '/storage'); } sub configure_system { system('sh', '/storage/src/etc/bootstrap.sh'); system('pkill', 'sendmail'); system('newaliases'); system('/usr/libexec/smtpd/makemap', '/etc/mail/secrets'); system('smtpd'); system('sh', '/storage/src/dotfiles/bootstrap.sh'); } say 'Installing packages.'; install_packages(); print "Done.\n\n"; say 'Mounting RAID storage.'; mount_raid(); print "Done.\n\n"; say 'Configuring system'; configure_system(); say 'Done.';