init.d start order

johnbock

Mitglied
Mitglied seit
2 Mrz 2008
Beiträge
310
Punkte für Reaktionen
0
Punkte
0
Is there "freetz" way to ensure a particular init script will be executed first? I want to start syslogd as soon as the basic system is up. At least before the other mod daemons;)
 
The easiest way I think is to change the "$(PKG)_STARTLEVEL" in the $(pgk).mk-file
 
Looks good, thanx.

The earliest seems to be inetd with 20. I believe syslogd/klogd should be one of the first daemons started i.e. 10.

Can someone confirm this?
 
Startlevel was forgotten in r1655. You are right.

Greets Oliver
 
Which startlevel should we use? Is a startlevel of 10 fine?
 
The original start level was 8.

See Oliver's posted link to changeset 1655.
 
The original start level was 8.

See Oliver's posted link to changeset 1655.

daahh, oversaw S08 in the changeset. I'll try it this evening and open a ticket with the patch...

thanx;)
 
That did the trick:D
Code:
Index: make/syslogd-cgi/syslogd-cgi.mk
===================================================================
--- make/syslogd-cgi/syslogd-cgi.mk     (revision 2061)
+++ make/syslogd-cgi/syslogd-cgi.mk     (working copy)
@@ -1,4 +1,5 @@
 $(call PKG_INIT_BIN,0.2.3)
+$(PKG)_STARTLEVEL=08
 
 $(PKG_UNPACKED)
 
@@ -8,4 +9,4 @@
 
 $(pkg)-clean:
 
-$(PKG_FINISH)
\ No newline at end of file
+$(PKG_FINISH)
and I moved stunnel to 30 to let the services (like inadyn) tunnel in the default level
Code:
Index: make/stunnel/stunnel.mk
===================================================================
--- make/stunnel/stunnel.mk     (revision 2061)
+++ make/stunnel/stunnel.mk     (working copy)
@@ -3,6 +3,7 @@
 $(PKG)_SITE:=http://www.stunnel.org/download/stunnel/src
 $(PKG)_BINARY:=$($(PKG)_DIR)/src/$(pkg)
 $(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/sbin/$(pkg)
+$(PKG)_STARTLEVEL=30
 
 $(PKG)_DEPENDS_ON := openssl zlib
 
Thanks for checking in the patches. Do we need to explicitly set STARTLEVEL for packages started in the default STARTLEVEL? If the default STARTLEVEL should be changed then we would need change every file...

stunnel.mk was checked in with
Code:
$(PKG)_STARTLEVEL=40
instead of
Code:
$(PKG)_STARTLEVEL=30

Was that on purpose? Packages started in the default STARTLEVEL (40) and which are sorted before 'stunnel' will not be able to tunnel.
 
Zuletzt bearbeitet:
Packages started in the default STARTLEVEL (40) and which are sorted before 'stunnel' will not be able to tunnel.

At the moment, if you don't specify $(PKG)_STARTLEVEL, the default startlevel is 99. You see that when looking at the .static file in the root directory of your SVN trunk folder.

Best regards,
Whoopie
 
But I think johnbock is right, perhaps using something other than 99 as default runlevel would make more sense, as there may be packages which should be started at the end of the boot process.
 
As Paul Panzer would say, "Richtig!"

But I was reading the README.makefiles... That's why I though 40 was the default.

I'm not sure if the team wants to talk about this stuff or if it should be considered before freetz v1.0...

Defining STARTLEVELs even for the default (base) packages would eliminate the need to make exceptions for those in the startup routine (rc.mod). It would also make easier to move things around when packages with priority are introduced.

This is somewhat reorganized...
Code:
00 webcfg
02 swap
02 syslogd
04 iptables

10 crond
10 inetd

30 stunnel
30 telnetd

40 default runlevel
40 inadyn
40 nfs exports
40 samba
40 wol

60 non critical mounts

xx sqlite
xx imap, ldap
xx postfix, qmail

90 rc.custom (rc.local?)

95 backup
96 what ever
 
The value 40 in make/README.Makefiles is only an example, not a default value.

The default is 99, but that is intended for packages that have no start script, although this is currently not enforced in the code.

So every package with a start script should specify an appropriate startlevel.

Including the basic services in the list of startlevels would be nice, but I'm not sure if /etc/static.pkg is also used for other purposes. The build system would have to be modified to specify the default services with their startlevels.
At the moment, there are few hard coded services in /etc/init.d/rc.mod, so I'm not sure whether it is worth or not.
 
Never the less, I do believe level 30 for stunnel would be better than 40.
 
It could be built a depency- & priority-tree and so the startorder could be calculated every boot dynamically
 
It's okay when you answer here. There's no need to open a ticket.

OT:
Maybe I have misunderstood the quoted text, but ...
Tickets serve a very good purpose: it allows to track changes and the reasons for those changes; eventually release notes document the changes that are present in a release, with the tickets it's possible to account for the changes.
 
Kostenlos!

Statistik des Forums

Themen
248,917
Beiträge
2,305,038
Mitglieder
378,638
Neuestes Mitglied
Patrick89