Andrew McGlashan writes:

> At 2:45 he says that you tell systemd what the dependencies of things
> are, and systemd figures out at boot time what to do. Hey, couldn't
> that be done with a make file, with a whole less code and fanfare? LOL,
> make boot.

This is called startpar, and SuSE already wrote it, in 2003.
Debian 7 uses it by default.  Here's my halt dependency DAG:

    # cat /etc/init.d/.depend.stop
    TARGETS = quotarpc mdadm busybox-syslogd smartmontools busybox-klogd 
urandom hwclock.sh quota sendsigs umountnfs.sh networking umountfs umountroot 
mdadm-raid mdadm-waitidle live halt reboot
    quota: quotarpc
    sendsigs: quotarpc quota mdadm busybox-klogd busybox-syslogd
    umountnfs.sh: quotarpc quota sendsigs busybox-klogd busybox-syslogd
    networking: umountnfs.sh
    umountfs: quotarpc quota networking umountnfs.sh mdadm busybox-klogd 
busybox-syslogd hwclock.sh urandom
    umountroot: umountfs
    mdadm-raid: umountfs mdadm
    mdadm-waitidle: umountroot
    live: umountroot
    halt: live umountroot mdadm-waitidle
    reboot: live umountroot mdadm-waitidle

It's invoked with these args by default:

    /etc/init.d/rc:95: eval "$(startpar -p 4 -t 20 -T 3 -M $1 -P $previous -R 
$runlevel)"

That is, it runs up to four jobs per CPU in parallel.
"The -M option  switches startpar into a make(1) like behaviour."

You may also want to look at minit / cinit.

_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to