Etwas seltsam in /etc/rc0.d

797
Rodnower

Ich benutze Ubuntu 12.04.1
Ich wollte nur ein gutes Werkzeug für die Verwaltung von Diensten finden, und ich sehe, dass es nicht vorhanden ist ...
Native "update-rc.d", die Dienste verwaltet, aber keine Informationen bereitstellen und nicht nativ " chkconfig "liefert Informationen, wirft jedoch einen Fehler, wenn ich versuche, einen Dienst in einem Run-Level zu aktivieren.
Wie auch immer, ich habe gerade das Verzeichnis /etc/rc0.d/ aufgelistet und einen Startlink für ein Netzwerkskript gefunden (Link beginnt mit "S"):

user@comp:/etc/rc0.d$ ls -la total 20 drwxr-xr-x 2 root root 4096 окт. 11 16:45 . drwxr-xr-x 139 root root 12288 окт. 21 11:55 .. lrwxrwxrwx 1 root root 17 окт. 11 16:45 K09apache2 -> ../init.d/apache2 lrwxrwxrwx 1 root root 29 окт. 11 04:39 K10unattended-upgrades -> ../init.d/unattended-upgrades lrwxrwxrwx 1 root root 27 окт. 11 04:39 K20speech-dispatcher -> ../init.d/speech-dispatcher -rw-r--r-- 1 root root 353 июля 26 20:23 README lrwxrwxrwx 1 root root 18 окт. 11 04:39 S20sendsigs -> ../init.d/sendsigs lrwxrwxrwx 1 root root 17 окт. 11 04:39 S30urandom -> ../init.d/urandom lrwxrwxrwx 1 root root 22 окт. 11 04:39 S31umountnfs.sh -> ../init.d/umountnfs.sh lrwxrwxrwx 1 root root 20 окт. 11 04:39 S35networking -> ../init.d/networking lrwxrwxrwx 1 root root 18 окт. 11 04:39 S40umountfs -> ../init.d/umountfs lrwxrwxrwx 1 root root 20 окт. 11 04:39 S60umountroot -> ../init.d/umountroot lrwxrwxrwx 1 root root 14 окт. 11 04:39 S90halt -> ../init.d/halt 

Meine einzige Frage: Ist es in Ordnung?
Wenn dies der Fall ist, warum sollte der Netzwerkdienst auf der Ebene mit angehaltener Ausführung gestartet werden?
Wenn es nicht OK ist, wie behebe ich es?

0
Ich bin nicht mit Ubuntu vertraut, aber es ist sehr wahrscheinlich, dass Ubuntu auch auf die Systemd-Verwaltung von Diensten umschaltet Serge vor 11 Jahren 1
Ich habe versucht, Befehl und Paket zu finden, keiner von ihnen ... Rodnower vor 11 Jahren 0
Ubuntu verwendet [Upstart] (https://help.ubuntu.com/community/UpstartHowto) als _init_-Prozess. Pedro Romano vor 11 Jahren 1

1 Antwort auf die Frage

1
Claudius

Have a look at /etc/init.d/halt. This file surely belongs in /etc/rc0.d - and the only thing it defines is the stop functionality (i.e. /etc/init.d/halt start is a no-op). We can hence assume that scripts in /etc/rc0.d are called with the stop rather than start argument.

Then having a look at /etc/init.d/networking, we see:

stop) check_network_file_systems check_network_swap log_action_begin_msg "Deconfiguring network interfaces" if ifdown -a --exclude=lo $verbose; then log_action_end_msg $? else log_action_end_msg $? fi ;; 

which first makes sure that no filesystems are mounted on the network anymore (which should be the case after umountnfs.sh ran) and then disables networking (via ifdown) to, for example, release DHCP leases or anything else sensibly one would want to do upon network deconfiguration.

To conclude, having a link to /etc/init.d/networking in /etc/rc0.d is perfectly fine.

(Note that I use Debian, but the scripts should essentially be the same.)

Furthermore, you should normally use update-rc.d, which is able of enabling/disabling services, either for specific runlevels or in general, and ls in order to see which services are enabled/disabled. I guess Ubuntu won’t switch to systemd any time soon, although one can apparently install it in Debian already, if one choses to do so.

Leider habe ich den Computer gewechselt, aber ich bin sicher, dass Ihre Erklärung meine Frage beantwortet. Vielen Dank. Rodnower vor 11 Jahren 0