Bridged interfaces with Vagrant

It took me a while to work out how to specify the bridged interface in Vagrant‘s Vagrantup file so that it doesn’t prompt you for it when you run vagrant up. I can be dumb at times, so it’s probably just me, but in case you don’t know Ruby syntax (like me), this is how you do it. In your Vagrantup file, assuming eth0 is the interface you want to bridge to, specify it like this:- :bridged, :bridge => "eth0"

That’s it! If you’re not familiar with Vagrant, it’s a tool written in Ruby to provide a fast way to deploy virtual machines with VirtualBox. For more information, have a look at the overview over on the project’s website.

Fixing Likewise startup scripts on Debian Squeeze

Just a quick one, this…

If you install Likewise Open on Debian Squeeze, you may notice that it doesn’t start on boot-up. The reason is because the new dependency-based boot sequence doesn’t like the init scripts Likewise provides.

Luckily, it’s pretty easy to fix. First, make sure you have chkconfig installed (apt-get install chkconfig if not), change into your /etc/init.d directory and do this:-

for INIT in lsassd lwiod eventlogd dcerpcd netlogond lwregd srvsvcd; do \
   echo "Fixing '${INIT}'..."; \
   sed -i -e 's/^#LWI_STARTUP_TYPE_SUSE#/#/g' \
      -e 's/Default-Start: 3 5/Default-Start: 2 3 4 5/g' \
      -e 's/Default-Stop: 0 1 2 6/Default-Stop: 0 1 6/g' ${INIT}; \
for INIT in lsassd lwiod netlogond eventlogd dcerpcd; do \
   echo "Disabling ${INIT}..."; \
   chkconfig -d ${INIT}; \
for INIT in dcerpcd eventlogd netlogond lwiod lsassd; do \
   echo "Re-enabling ${INIT}..."; \
   chkconfig -a ${INIT}; \

This uncomments the SUSE parts of the init scripts, which chkconfig wants. It then calls chkconfig to first delete each entry, and then re-add it to make sure everything’s okay. Reboot, and you should have working domain authentication without having to manually start it up.