[arch-general] [arch-dev-public] Migration to systemd
Kyle
kyle at gmx.ca
Wed Aug 15 14:36:21 EDT 2012
According to Felipe Contreras:
#It is general knowledge that scripting languages are generally simpler
#than compiling languages.
#
#But fine, compare a few lines of rc.sysinit:
#
## mount the API filesystems
## /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm
#mountpoint -q /proc || mount -t proc proc /proc -o
#nosuid,noexec,nodev
#mountpoint -q /sys || mount -t sysfs sys /sys -o
#nosuid,noexec,nodev
<snip>
#To their equivalent in systemd:
I do believe the C code is indeed simpler. I can't believe that a shell script that calls a compiled binary, i.e. mountpoint, is any more simple than the C code without an interveening script. So in the case of rc.sysinit, we have a shell script that calls compiled binaries, while also requiring an instance of Bash. In the case of systemd, we have a restrictive configuration format that is specifically designed to boot a system by calling compiled binaries when necessary. This is no different from calling these compiled binaries in a shell script, except for the fact that no shell is required to run systemd units, and the format of unit files is strictly designed for making the boot sequence work correctly, and therefore is much more simple. And if you needed to debug or patch the mountpoint binary as used in the snippit from rc.sysinit, you would find it just as simple or as difficult as debugging or patching systemd's C code that performs the same operations but doesn't need to be
called over and over, since the loop is already in the systemd code.
~Kyle
--
Kyle is a droid.
The whole world knows it.
This e-mail shows it.
More information about the arch-general
mailing list