3 ms·
Yes, modern linux and sysvinit are pigs compared to some alternatives (though systemd is worse). The choice isn't a binary choice between sysvinit and systemd.
by clarry 12y ago
Yes, modern linux and sysvinit are pigs compared to some alternatives (though systemd is worse). The choice isn't a binary choice between sysvinit and systemd. How about this? init + rc + all the scripts combined are smaller than your handful of daemon-specific scripts. And I understand exactly how all of this works (the kernel parts included). I can easily change any part of it, I can easily debug any part of it, I can easily extend any of it if I need special features. With systems that comprise hundreds of thousands of lines of code, just beginning to understand how all of it works together takes much more time...
Simplicity really does buy me something.
$ wc -l /usr/src/sbin/init/init.c
1450 /usr/src/sbin/init/init.c
$ wc -l /etc/rc
537 /etc/rc
$ wc -l /etc/rc.d/*
21 /etc/rc.d/amd
11 /etc/rc.d/apmd
21 /etc/rc.d/avahi_daemon
21 /etc/rc.d/avahi_dnsconfd
11 /etc/rc.d/bgpd
15 /etc/rc.d/bootparamd
9 /etc/rc.d/cron
14 /etc/rc.d/cvsyncd
16 /etc/rc.d/dbus_daemon
15 /etc/rc.d/dhcpd
11 /etc/rc.d/dhcrelay
12 /etc/rc.d/dvmrpd
11 /etc/rc.d/ftpd
11 /etc/rc.d/ftpproxy
9 /etc/rc.d/hostapd
9 /etc/rc.d/hotplugd
11 /etc/rc.d/httpd
13 /etc/rc.d/identd
9 /etc/rc.d/ifstated
17 /etc/rc.d/iked
9 /etc/rc.d/inetd
17 /etc/rc.d/isakmpd
17 /etc/rc.d/iscsid
11 /etc/rc.d/ldapd
15 /etc/rc.d/ldattach
11 /etc/rc.d/ldomd
11 /etc/rc.d/ldpd
11 /etc/rc.d/lockd
9 /etc/rc.d/lpd
16 /etc/rc.d/mopd
17 /etc/rc.d/mountd
9 /etc/rc.d/mrouted
18 /etc/rc.d/nfsd
11 /etc/rc.d/npppd
38 /etc/rc.d/nsd
12 /etc/rc.d/ntpd
11 /etc/rc.d/ospf6d
11 /etc/rc.d/ospfd
24 /etc/rc.d/pflogd
11 /etc/rc.d/popa3d
11 /etc/rc.d/portmap
16 /etc/rc.d/rarpd
9 /etc/rc.d/rbootd
289 /etc/rc.d/rc.subr
11 /etc/rc.d/relayd
11 /etc/rc.d/ripd
9 /etc/rc.d/route6d
11 /etc/rc.d/rsyncd
11 /etc/rc.d/rtadvd
11 /etc/rc.d/rtsold
9 /etc/rc.d/rwhod
11 /etc/rc.d/sasyncd
13 /etc/rc.d/sendmail
9 /etc/rc.d/sensorsd
11 /etc/rc.d/slowcgi
13 /etc/rc.d/smtpd
11 /etc/rc.d/sndiod
12 /etc/rc.d/snmpd
26 /etc/rc.d/spamd
25 /etc/rc.d/spamlogd
13 /etc/rc.d/sshd
11 /etc/rc.d/statd
15 /etc/rc.d/syslogd
12 /etc/rc.d/tftpd
11 /etc/rc.d/tftpproxy
9 /etc/rc.d/tor
32 /etc/rc.d/unbound
9 /etc/rc.d/watchdogd
11 /etc/rc.d/wsmoused
9 /etc/rc.d/xdm
16 /etc/rc.d/ypbind
11 /etc/rc.d/ypldap
28 /etc/rc.d/yppasswdd
13 /etc/rc.d/ypserv
1285 total
- albertzeyer 12y agoI think you also need to count the Bash source code there.
- clarry 12y agoThat's not really fair since the shell is an independent part of the system and could be swapped out for another implementation. Plus, it's not there just for the init system; it'd be there regardless of the init system. It's an already existing independent component, which is used for leverage. Otherwise should we also count the C compiler, libc, all the CLI utilities and the kernel? But here you go. Still smaller than systemd. Sysvinit needs a shell too... $ wc -l /usr/src/bin/ksh/*.[ch] 127 /usr/src/bin/ksh/alloc.c 1412 /usr/src/bin/ksh/c_ksh.c 935 /usr/src/bin/ksh/c_sh.c 560 /usr/src/bin/ksh/c_test.c 53 /usr/src/bin/ksh/c_test.h 201 /usr/src/bin/ksh/c_ulimit.c 60 /usr/src/bin/ksh/config.h 829 /usr/src/bin/ksh/edit.c 86 /usr/src/bin/ksh/edit.h 2163 /usr/src/bin/ksh/emacs.c 1333 /usr/src/bin/ksh/eval.c 1433 /usr/src/bin/ksh/exec.c 107 /usr/src/bin/ksh/expand.h 593 /usr/src/bin/ksh/expr.c 984 /usr/src/bin/ksh/history.c 438 /usr/src/bin/ksh/io.c 1653 /usr/src/bin/ksh/jobs.c 13 /usr/src/bin/ksh/ksh_limval.h 1643 /usr/src/bin/ksh/lex.c 132 /usr/src/bin/ksh/lex.h 196 /usr/src/bin/ksh/mail.c 786 /usr/src/bin/ksh/main.c 1149 /usr/src/bin/ksh/misc.c 91 /usr/src/bin/ksh/mknod.c 285 /usr/src/bin/ksh/path.c 267 /usr/src/bin/ksh/proto.h 420 /usr/src/bin/ksh/sh.h 1161 /usr/src/bin/ksh/shf.c 82 /usr/src/bin/ksh/shf.h 897 /usr/src/bin/ksh/syn.c 231 /usr/src/bin/ksh/table.c 183 /usr/src/bin/ksh/table.h 420 /usr/src/bin/ksh/trap.c 708 /usr/src/bin/ksh/tree.c 141 /usr/src/bin/ksh/tree.h 57 /usr/src/bin/ksh/tty.c 37 /usr/src/bin/ksh/tty.h 1210 /usr/src/bin/ksh/var.c 10 /usr/src/bin/ksh/version.c 2128 /usr/src/bin/ksh/vi.c 25214 total
- xenophonf 12y agoYou cannot assume that /bin/sh always refers to Bash. There's a lot more to Unix than just Linux and Mac OS X. On FreeBSD /bin/sh is a 1989 rewrite of the SVR4 Bourne shell. As of 10.0-RELEASE it comes to 21167 lines, including its Makefile, ancillary shell scripts, and documentation.