Roy's Blog

A Hacker's musings on Code | Tech | Life

baselayout buffers einfo and friends output when running in parallel, so messages don't get mixed up with other services. It does this by storing each einfo command in a file and then processes them when it obtains a lock.

baselayout-2 now buffers stdout and stderr to a file which means the errors are aligned too, so the output should be pretty much perfect.

This is not without any downsides. Firstly, the buffer files take space. Secondly, the buffered output can look a little strange when a long running init script, like say a wireless interface scanning for AP's, suddenly appears in one go.

ciaranm proposed an alternative - prefixing each line with the init script name. He was even kind enough to point to some sample C++ code which did just this for paludis. So after writing a C equivalent (not that hard) baselayout can now do the same. We even colour code for extra prettiness as you can see below :D

This is toggled through `RC_PREFIX="yes"` and works independently of `RC_PARALLEL`.

Discuss this Post

:jawdrop: A long time in the coming, but alpha1 is now out. You will need ~ARCH versions of many packages and you'll have to manually re-emerge xinit if you're a KDM user. If you switch over to using dash or busybox as /bin/sh then you will need to upgrade glibc for a new nscd init script or de-bashify it yourself.Just after it went into portage, vapier twisted my arm into changing from GNU style C to LKML style C. I didn't really have a preference, so it's been changed. So if you do cut a patch for us, please base it on our svn repo! ;)I'm running this on my stable home server, and all the init scripts work fine with bash so the upgrade should be quite smooth :DEnjoy :P

Discuss this Post

Slacking

tech

OK, so I'm a slacker as I've not blogged for over a month now :(However, I have been a very busy beaver! baselayout-2 is nearing completion. The only outstanding bug I know of is a service timeout of the local resolver when using resolvconf and parallel startup. All init scripts on my workstations and personal servers have been de-bashified and most of them bumped. A few have not been bumped - nscd (glibc) being one of them. Basic rule of thumb - if it's a base system package (glibc isn't - that's toolchain) it's been bumped. If it works on FreeBSD it's been bumped, otherwise it's not been bumped as you would have to manually change the system shell to dash or busybox to be affected by any script bugs.Speaking of busybox, the chances are that we won't work with busybox as the default shell right away as their bundled mount/umount, swapon/off/ctl, find implementations differ from our requirements. At this point I'm gunning for patches to modify busybox. Although we should work with the start-stop-daemon busybox builtin, it's use is not optimal as we then loose the nice features the baselayout version provides such as daemon tracking and ensuring it actually starts/stops. Although I'm sure many people would prefer this anyway ;)On another note, someone found an obscure bug in dhcpcd-3 where we requested an IP address of 0.0.0.0 if we failed to renew after a day. This and openntp support will work their way into dhcpcd-3.0.17, at which point I'll probably create a new branch so I can implement RFC 4361.

Discuss this Post