[Tails-dev] Improvement of the shutdown sequence

Üzenet törlése

Válasz az üzenetre
Szerző: Ague Mill
Dátum:  
Címzett: tails-dev
Tárgy: [Tails-dev] Improvement of the shutdown sequence
Hi!

I have noticed that there is some seconds in the shutdown sequence that
might be wasted by properly shutting down services that we don't care
much about.

Here is the current init scripts that are currently called (same scripts
and order for shutdown and reboot sequences) in Tails 0.11 and an
analysis of what might be removed:

First batch
-----------

All these scripts are run at the same priority (and time):

* alsa-utils

Store soundcards levels. As we are amnesic, candidate for
**removal**.

* fuse

Unmount fuse filesystems and remove kernel module. Sounds
like a good idea to keep it to avoid data loss.

* gdm3

Stop the graphical environment. Keep?

* gdomap

Stop the "GNUstep distributed object mapper". Let init kill it:
**remove**.

* haveged

Stop the entropy daemon. Let sendsigs kill it: **remove**.

* kexec-load

Load kernel and initrd. Keep.

* laptop-mode

Revert laptop settings. I think that's actually not a good thing to
do. **Remove**

* memlockd

Stop memlockd. Memwipe files will not kept in memory after that.
Better let sendsigs kill it, or even, add its PID to
/var/run/sendsigs.omit. **Remove**

* network-manager

Stop Network Manager. Maybe we ought to keep it to release DHCP
leases?

* pdnsd

Stop the proxy DNS server. sendsigs can do it: **remove**

* polipo

Stop the polipo daemon. sendsigs can do it: **remove**

* resolvconf

Cleanup /etc/resolv.conf. No need to, we are amnesic: **remove**

* saned

Does nothing except print a warning: **remove**

* spice-vdagent

Stop the agent daemon for Spice guests. sendsigs can do it: **remove**

* ttdnsd

Stop ttdnsd. sendsigs can do it: **remove**

* urandom

Save the random seed. We are amnesic: **remove**

* virtualbox-guest-utils

Stop VBoxService daemon. I am unsure. Is it needed to properly
unmount virtualbox shares?

Following sequence
------------------

And then, in order:

* tor

Stop Tor. We could probably leave that to sendsigs.

* sendsigs

Send TERM signals to every remaining process and then KILL if any
remains.

* rsyslog

Shutdown the logging daemon. Keep?

* umountnfs.sh

Umount NFS mountpoints. Keep.

* networking

Unconfigure networking. As we are using network-manager

* ifupdown

Clean ifupdown status. We are amnesic: **remove**.

* open-vm-tools

Stop VMWare daemon and modules. I say **remove**.

* umountfs

Unmount filesystems which are not root. Keep.

* cryptdisks

Deconfigure dm-crypt volumes. Keep.

* lvm2

Deconfigure LVM volumes. Keep.

* cryptdisks-early

Deconfigure dm-crypt for root volumes. No need for Tails: **remove**.

* umountroot

Unmount root filesystem. Keep?

* live-boot

Resyncing snapshots and cache reboot files. That can be removed for
Tails, right?

* tails-kexec

Keep, captain obvious.

What do other thinks?

Any advice on how to implement the removal of those extra scripts?
A hook with a bunch of `rm` commands? It looks like `update-rc.d` really
wants to have shutdown scripts in place...

--
Ague