Winter Break 2014

Dug up my github blog again to post some more on it. So, what was I doing?

  • Watching shadypenguinn's youtube videos out of boredom
  • Omega Ruby IV Breeding in preparation for online Pokemon battling
  • Thumbing through mikidown source code to prepare it for translation
  • Getting flooded with presents (no, really)
  • Randomly painting and sketching
  • Switching from copy.com to SyncThing
  • Watching anime (Parasyte quickly shot up to one of my top shows to continue watching)

Trying out Fish Shell

I changed my current shell in stjerm and lilyterm to fish a few months ago. I
can't believe why I wasn't using this before since it's like having kupfer on
the commandline in terms of ease of use. Of course, I had to port my aliases
and some of my functions over to fish, but that was pretty easy to do.

Resources

My Experiences with ninit [Part 2]

Here's part 1 for those of you who missed the previous one.

So far, I didn't have to change my setup except to enable kernel logging since I've been having some
hibernate issues since moving my Linux desktop to another computer so I could convert my current
desktop to a server.

That's... pretty much it asides from swapping out wicd for connman.

My Experiences with ninit [Part 1]

This post is a collection of notes of the process I went through to take out
systemd for ninit. Pardon for the scarcity, but I'll revisit this with better descriptions.

What IS ninit?

Preparation

  1. Install procps-ng-nosystemd
  2. Temporary symlink to systemd-udevd
  3. Install ninit
  4. Set up service directories. You can find a rough copy (though not perfectly
    synced) copy of my /etc/ninit dir here
  5. Reboot

Post-install

eudev{,-systemdcompat}

  1. manually build eudev and eudev-systemdcompat
  2. Remove the symlink from preparations in systemd
  3. intall eudev and eudev-systemdcompat
  4. Reboot to test things

nsvc -o {halt,reboot} vs ninit-shutdown -{o,r}

I recommend ninit-shutdown -{o,r} if you don't want to manually handle turning
services off before doing shutdown preparations in the halt service. ninit-shutdown
also assumes quite a few things about how a system should be cleaned up, so if you
want more control, you're going to have to fiddle with the halt service to shutdown
the services you want in the correct order before halting.

Optional: pretty messages for every section started

[Edit]: Forgot to fill this section out. Basically, all that's needed for this is a
setup file that echos out a simple message.

Depends aren't really "depends" - more like "start before"

Title says it all. ninit won't actually check if the services that a service depends
on have finished executing with success or are running. Just ran some tests in my
test box. Didn't seem to restart dbus even when I had two things dependent on it.
However, statement about whether something finishes with success is still valid.

Some ways to work around this include:

  • Specify the order daemons are started in like /etc/rc.conf, except with
    /etc/ninit/daemon/depends: Simple enough work around. Everything's also started
    in parallel like this.
  • Patch ninit to include a separate file for services (opt) that specifies true
    deps that're only run once OR modifies the depends of certain services once it's
    done running: Too complex, but could be done.
    to do something about the return
    code for one-run services.
  • Use setup, rsetup, or sys-rsetup to do the dependency checking for shared
    dependencies: One of the things that the ninit docs don't tell you is that using
    nsvc as a synced or waited service is NOT a good idea (nor as a services that's in
    depends either). I really wouldn't recommend this because this makes things complex.

    Only applicable for one-run services.

Thoughts

ninit's good enough if you've got a static configuration that doesn't have too many depends
that can be easily managed and that don't require too many static initializations. It also
doesn't seem to keep track of exit codes for error spotting (since a service could fail, but
report back as finished. This is especially bad in mounting cases unless you force the mount
to be verbose or write a wrapper to do something on that error). However, it'll happily report
if something failed to run if it was a continuous service. There also isn't much documentation
on what the nsvc -L output indicates. I'll try to document these later.

For true depends for one-time initializations, I'd recommend something else (at least until I can
figure out how to patch the run helper in ninit to work around this). I'm thinking of maybe also
trying out busybox init+(monit or perp), initng, OpenRC, or initscripts-fork. Currently, I'm
interested in trying monit (even though this'd probably be a little too big for my own needs) since
it does this dependency checking on its own and provides some additional security features that can
be coded (eg: stop running a compromised service). The only thing that scares me about it is that it
prefers pid files instead of being a direct parent of the process (as evidenced by with matching|pidfile
when asking what to check for a pid). I just need to figure out which init system to run it from before
I start trying it out.

Resources

Transferred Github Pages generator to Nikola Generated site

Took the time the past few days to migrate my Github userpage to be generated by Nikola. Looks kinda bland, buuut, at least I have more control over the theme. I WILL be making it more pretty later. Promise...ish? Be sure to also check the about page for all that juicy bio stuff on me.

Share