• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

insserv und Required-Stop

Habe ein Problem mit innserv. (SuSE 10.0)

Habe drei init-scripte, welche in einer bestimmten Reihenfolge gestartet werden sollen, was mit Required-Start sehr gut funzt.

ABER:
die Reihenfolge, in welcher die scripte gestoppt werden sollten funzt nicht, jedenfalls nicht bei mir.

unterstützt jetzt insserv: Required-Stop oder nicht:
man insserv:
Code:
Please note, that the Required-Stop,  Should-Stop,  and  Default-Stop are ignored in SuSE Linux, because the SuSE boot script concept uses a differential link scheme (see init.d(7)).  With known dependencies and  runlevel(s)  insserv  sets  and reorders  the corresponding  symbolic links of the concerned runlevels directories (see init.d(7)).
but this manpage is from Aug 28, 2003

Ich poste nur den "INIT INFO"
bacula-fd:
Code:
### BEGIN INIT INFO
# Provides:             bacula-fd
# Required-Start:       $local_fs $network
# Should-Start:         haldaemon
# Required-Stop:        $local_fs $network bacula-sd bacula-dir
# Should-Stop:          haldaemon
# Default-Start:        3 5
# Default-Stop:         0 1 2 6
# Short-Description:    bacula file daemon
# Description:          Bacula network backup system file daemon
### END INIT INFO

bacula-sd:
Code:
### BEGIN INIT INFO
# Provides:             bacula-sd
# Required-Start:       $local_fs $network bacula-fd
# Should-Start:         
# Required-Stop:        $local_fs $network bacula-dir
# Should-Stop:          
# Default-Start:        3 5
# Default-Stop:         0 1 2 6
# Short-Description:    bacula storage daemon
# Description:          Bacula network backup system storage daemon
### END INIT INFO

bacula-dir:

Code:
### BEGIN INIT INFO
# Provides:             bacula-dir
# Required-Start:       $local_fs $network mysql bacula-fd bacula-sd
# Should-Start:
# Required-Stop:        $local_fs $network mysql
# Should-Stop:          
# Default-Start:        3 5
# Default-Stop:         0 1 2 6
# Short-Description:    bacula director daemon
# Description:          Bacula network backup system director daemon
### END INIT INFO

Startreihenfolge:
    • bacula-fd
      • bacula-sd
        • bacula-dir

        Stopreihenfolge:
          • bacula-fd
            • bacula-sd
              • bacula-dir

              insserv macht das auf Basis der "INIT INFO":
              Code:
              K06bacula-dir
              K07bacula-sd
              K08bacula-fd
              S14bacula-fd
              S15bacula-sd
              S16bacula-dir

              laut Beschreibung in "/etc/init.d/skeleton"
              Code:
              # * The services specified in the stop tags 
              #   (Required-Stop/Should-Stop)
              #   specify which services need to be still running when this service
              #   is shut down. Often the entries there are just copies or a subset 
              #   from the respective start tag

              sollte aber eigentlich das machen:
              Code:
              K06bacula-fd
              K07bacula-sd
              K08bacula-dir
              K09haldaemon
              S13haldaemon
              S14bacula-fd
              S15bacula-sd
              S16bacula-dir

              Bin für jede HIlfe dankbar ;)
 
Frag mal lieber auf einer der SUSE-Mailinglisten nach.

Aber soweit ich weiß, ist es wirklich so, dass die *-Stop-Abhängigkeiten nicht beachtet werden, sondern die Reihenfolge beim Herunterfahren einfach umgedreht wird.

Das hat etwas mit dem Ansatz zu tun, dass man aus einem Runlevel in einen anderen booten kann, ohne alle Dienste nochmal abzuarbeiten (sondern nur diejenigen, in denen sich die Runlevel unterscheiden - das ist mit "differential" gemeint).
 
Oben