DHCPD Logging under a chroot on FreeBSD

This only applies to running ISC-DHCPD in a chroot environment on FreeBSD. (The port option is “PARANOIA” and is default).

Ensure /usr/local/etc/dhcpd.conf has the following:

log-facility local7;

Add this to /etc/rc.conf

syslogd_flags="-l /var/db/dhcpd/var/run/log"

Add this to /etc/syslogd.conf

local7.*       /var/log/dhcpd.log
!dhcpd
*.*            /var/log/dhcpd.log

Create the log file:

touch /var/log/dhcpd.log && chmod 640 /var/log/dhcpd.log

And restart services:

service syslogd restart
service isc-dhcpd restart

You’ll also want to rotate the logs. Here’s an example.
/etc/newsyslog.conf:

# This will rotate daily at 5 AM, keep 7 copies, and bzip2 the older logs.
/var/log/dhcpd.log                      640     7       *       $D05    JC

See the man pages for syslogd and newsyslog.conf for more information.

The Wild West

I begrudgingly live in Western South Dakota. South Dakota is reliably a dark red state of absolute conservatism, aside from the large population of Sioux.

Here’s some of the crazy shit that’s gone on in this state and city over just the past two weeks.

This doesn’t include our asinine abortion laws linking abortion to suicide and bizarre waiting periods, our governor refusing to comply with “ObamaCare”, lawmakers urge schools to increase bible instruction in public schools, and the other usual shit you’d expect from your far-right American taliban.

I’m sick of hearing these bastards whine about the “undoing of America” or “I want MY country back” – undoing of WHO’s America?  WHO’s country do they want back?  White, judeo-Christian far-right baby boomers?  What about the rest of us?  When do we get “our” country back?

Why are carriers so damn expensive?

As big of a geek as I am, I still don’t have a smart phone. In fact, my cell phone is a crappy flip-phone that my employer provides and I use Google Voice quite heavily for things like SMS.

I entertain the idea of getting something every now and then, but this is why I never do (and still refuse to):

So I’m looking at a minimum monthly charge of ~$100. My cable (extended w/ dvr and HD) + broadband (modest 35 Mbps) is cheaper than that even after taxes!

Grive-Sync for Google Drive

Update 2012-09-08: I suggest Insync, which offers a tray icon and Google Docs support.

Previously:
Unfortunately, Google still hasn’t delivered a native Google Drive client for Linux. Until then, we have Grive by Nestal Wan.

Grive by itself doesn’t have any sort of GUI or notifications. I’ve hacked up a script to be called via cron that will run Grive to sync and display desktop notifications of what happened.

Here’s a couple of screenshots:

Upgrade to Lion or Mountain Lion with Linux in place

I have a MacBook Pro from my employer that I triple boot Mac OS X, Ubuntu, and Windows 7 on (see rEFIt)

Last year, I wasn’t easily able to upgrade to Lion because the installer refused to install – apparently because I had Linux partitions. It failed with a vague error “This disk cannot be used to start up your computer.” Without much investigation, I decided to just rebuild the system.

This year, I wanted to upgrade from Lion to Mountain Lion but encountered the same issue. Ugh. Pulling off all three partitions, installing Mountain Lion, then re-creating them and restoring data didn’t sound too appealing. Apple mentions this in this article, but that method doesn’t work, unfortunately.

Solution: I booted to a Linux live disk and used GParted to shrink the size of the Mac (HFS+) partition slightly. As Apple’s document mentions, shrinking it by at least 128MB should work. After that, I was able to install.

Hope this helps someone Googling this.

Home Server, Google Apps, and Netfirms Sucks

I migrated the various services I hosted at Linode to my home FreeBSD server over the weekend. I love Linode, but wanted to utilize my humble home server more.

I decided to migrate my various domains’ e-mail to Google Apps. This was a hard transition for me. I’ve hosted my own e-mail for 10 years or so now, even from my home cable connections. GMail is excellent. I’ve started using it exclusively by using its POP3 checking functionality to aggregate all my various accounts into a single location and use GMail’s labels and filters to clean things up. Google Apps is free for non-profits for up to 10 accounts (and you can set a catch-all address). No regrets so far and really enjoying it.

Netfirms Sucks

So one thing I’ve migrated is DNS to my own server, where it was previously Linode. This would be painless, but my registrar, Netfirms, sucks. One thing after another there.

I registered two domains with them two years ago and transferred my “hewbert.com” domain to them at the same time. I logged into the control panel and “hewbert.com” showed that it wasn’t transferred, despite whois confirming they were the registrar. My other two domains (this one included) showed I was overdue for renewal by 277 days, despite whois confirming the accurate truth – I have 77 days left! So I did a chat support, where I was met with a scripted, incompetent sounding person that ultimately had to “file an escalation.” The two domains were sorted out.

In the meantime, I started changing my DNS records at the registrar. I previously had ~6 nameservers set for each domain. I started with this domain – changing it to a new set. As soon as I changed them, their control panel chopped off all but two of them. I was left with only two nameservers with no way to change. Chat support again. They say “we limit you to two nameservers. You need to contact us if you want more.” Umm… okay, I’m contacting you. They direct me to a completely separate site that looks like it was made 15 years ago, but I was able to modify the nameservers as I wanted there. I asked the agent twice if I’d be able to update all of my domains there and she said yes. After logging in, I could only modify one domain. Ugh.

Continue reading

Ubuntu 10.04 to 12.04 Upgrade Woes

I’m going to add to this as I find them. These are server-specific, but likely apply to certain desktop situations as well.

Upgrade fails because /var/lib/defoma/fontconfig.d/ isn’t empty

This pisses me off. Remove /var/lib/defoma/fontconfig.d before upgrading.

If you already started an upgrade and it bails, complaining about fontconfig.d, remove that directory and restart the upgrade. If the upgrade says no releases are available, do apt-get install -f
Link to bug report

libvirt lost my VMs

virsh list shows up empty.
Solution: Remove the <console> entries from the XML files in /etc/libvirt/qemu/*.xml
I haven’t looked into this yet, but I’ll edit this post once I do.
Link to bug report