Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How can I change the order of init scripts?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Sun Mar 26, 2017 3:19 am    Post subject: [Solved] How can I change the order of init scripts? Reply with quote

My default boot level looks like this:

Code:

rc default logging started at Sat Mar 25 20:41:06 2017

 * Starting dbus ...
 [ ok ]
 * /etc/init.d/sysklogd uses runscript, please convert to openrc-run.
 * sysklogd -> start: syslogd ...
 [ ok ]
 * sysklogd -> start: klogd ...
 [ ok ]
 * Starting consolekit ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
 * /etc/init.d/iptables uses runscript, please convert to openrc-run.
 * Loading iptables state and starting firewall ...
 [ ok ]
 * Bringing up interface enp2s0
 *   Caching network module dependencies
 *   dhcp ...
 *     Running dhcpcd ...
DUID [snip]
enp2s0: IAID [snip]
enp2s0: rebinding lease of 192.168.0.3
enp2s0: soliciting an IPv6 router
enp2s0: probing address 192.168.0.3/24
enp2s0: leased 192.168.0.3 for 86400 seconds
enp2s0: adding route to 192.168.0.0/24
enp2s0: adding default route via 192.168.0.1
forked to background, child pid 2394
 [ ok ]
 *     received address 192.168.0.3/24
 [ ok ]
 * Starting cupsd ...
 [ ok ]
 * Mounting network filesystems ...
 [ ok ]
 * Setting up lxdm-binary ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting tinyproxy ...
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Sat Mar 25 20:41:19 2017


I'd like to start xdm first so I get to a login screen faster and let everything else happen in the background. However, I don't see anything in the handbook about changing the order of init scripts except for this section, but that's only for scripts I write myself.

What's the recommended way to do this? Is it a good idea to put xdm before consolekit, dbus and sysklogd?


Last edited by Astronome on Sun Mar 26, 2017 4:14 am; edited 1 time in total
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Sun Mar 26, 2017 3:41 am    Post subject: Reply with quote

Check /usr/share/doc/openrc-0.23.2/guide.md.bz2 or it's equivalent on your system.

Look for the part headed "The Depend Function"

Edit to add: I don't run xdm, but the LAST thing I get, after all the services have started, is a login screen, and the way I see it, display manager is akin to a login prompt. If you want a graphical appearance while services start, I know of splashutils. There may be other ways to stifle the usual startup display until the system is ready for login, but I have never looked for one.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Sun Mar 26, 2017 3:54 am    Post subject: Reply with quote

cboldt wrote:
Check /usr/share/doc/openrc-0.23.2/guide.md.bz2 or it's equivalent on your system.

Look for the part headed "The Depend Function"

Edit to add: I don't run xdm, but the LAST thing I get, after all the services have started, is a login screen, and the way I see it, display manager is akin to a login prompt. If you want a graphical appearance while services start, I know of splashutils. There may be other ways to stifle the usual startup display until the system is ready for login, but I have never looked for one.


I'm not wanting to hide information as much as I am wanting a faster login screen. In particular, the network interface usually takes 3-4 seconds to come up, but it'd be cool if it did that after showing the login screen. I don't need network access until after I've logged in, anyway.
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Sun Mar 26, 2017 4:01 am    Post subject: Reply with quote

I don't have an xdm here, but I'd look at /etc/init.d/xdm (or /etc/init.d/gdm, or whatever you are using for X login) to see what it claims to depend on. I jumped the gun a little bit, took your question literally about "how to change order" when really, your question is more along th elines of "how do I start xdm FIRST. I know you don;t literally want to start it first, but that's a good way to view or approach earliest starting of XDM. What stands in the way of that? I don't know, honestly.
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Sun Mar 26, 2017 4:14 am    Post subject: Reply with quote

I noticed the xdm script depends on netmount, so I just disabled that since I don't use networked drives. Now my default boot level looks like this:

Code:

rc default logging started at Sat Mar 25 22:10:10 2017

 * Starting dbus ...
 [ ok ]
 * /etc/init.d/sysklogd uses runscript, please convert to openrc-run.
 * sysklogd -> start: syslogd ...
 [ ok ]
 * sysklogd -> start: klogd ...
 [ ok ]
 * Starting consolekit ...
 [ ok ]
 * Setting up lxdm-binary ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
 * /etc/init.d/iptables uses runscript, please convert to openrc-run.
 * Loading iptables state and starting firewall ...
 [ ok ]
 * Bringing up interface enp2s0
 *   Caching network module dependencies
 *   dhcp ...
 *     Running dhcpcd ...
DUID [snip]
enp2s0: IAID [snip]
enp2s0: soliciting an IPv6 router
enp2s0: rebinding lease of 192.168.0.3
enp2s0: probing address 192.168.0.3/24
enp2s0: leased 192.168.0.3 for 86400 seconds
enp2s0: adding route to 192.168.0.0/24
enp2s0: adding default route via 192.168.0.1
forked to background, child pid 2486
 [ ok ]
 *     received address 192.168.0.3/24
 [ ok ]
 * Starting cupsd ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting tinyproxy ...
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Sat Mar 25 22:10:27 2017


Good 'nuf :)


Last edited by Astronome on Sun Mar 26, 2017 3:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 26, 2017 4:50 am    Post subject: Reply with quote

Astronome wrote:
Code:
 * /etc/init.d/sysklogd uses runscript, please convert to openrc-run.

Astronome ... so do so:

Code:
# sed -i -- '1s/runscript/openrc-run/' /etc/init.d/sysklogd

Astronome wrote:
Code:
 *     Running dhcpcd ...
DUID 00:01:00:01:1e:17:87:51:00:24:8c:48:53:8d
enp2s0: IAID 8c:48:53:8d
enp2s0: soliciting an IPv6 router
enp2s0: rebinding lease of 192.168.0.3
enp2s0: probing address 192.168.0.3/24
enp2s0: leased 192.168.0.3 for 86400 seconds
enp2s0: adding route to 192.168.0.0/24
enp2s0: adding default route via 192.168.0.1
forked to background, child pid 2486

You might want to add the following to net (and so surpess the about output) ...

/etc/conf.d/net:
dhcpcd_enp2s0="--quiet"

Also, as it looks like you're not using ipv6

/etc/conf.d/net:
enable_ipv6_enp2s0="false"

best ... khay
Back to top
View user's profile Send private message
Astronome
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jan 2016
Posts: 148

PostPosted: Sun Mar 26, 2017 3:27 pm    Post subject: Reply with quote

khayyam wrote:

Astronome wrote:
Code:
 * /etc/init.d/sysklogd uses runscript, please convert to openrc-run.

Astronome ... so do so:

Code:
# sed -i -- '1s/runscript/openrc-run/' /etc/init.d/sysklogd



Shouldn't that be fixed upstream?

Thanks for the tips!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 26, 2017 3:48 pm    Post subject: Reply with quote

Astronome wrote:
khayyam wrote:
Astronome wrote:
Code:
 * /etc/init.d/sysklogd uses runscript, please convert to openrc-run.

Code:
# sed -i -- '1s/runscript/openrc-run/' /etc/init.d/sysklogd

Shouldn't that be fixed upstream?

Astronome ... it is (at least as much as anything to do with the 'runscript => openrc-run' migration could be called a "fix").

Code:
% egrep '^#!/sbin/(runscript|openrc-run)$' ~portdir/app-admin/sysklogd/files/sysklogd.rc7
#!/sbin/openrc-run

... but that would require you re-merge the package (so that etc-update/dispatch-conf would provide it for updating) and the above sed is a far easier solution.

Astronome wrote:
Thanks for the tips!

np ... you're welcome.

best ... khay
Back to top
View user's profile Send private message
fcl
n00b
n00b


Joined: 31 Dec 2016
Posts: 71

PostPosted: Sun Mar 26, 2017 3:55 pm    Post subject: Reply with quote

You can configure dhcpcd to start instantly in the "background" so boot wil continue without waiting for DHCP lease... I don't remember how it was done with OpenRC though..
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun Mar 26, 2017 6:18 pm    Post subject: Reply with quote

fcl wrote:
You can configure dhcpcd to start instantly in the "background" so boot wil continue without waiting for DHCP lease... I don't remember how it was done with OpenRC though..

fcl ... I expect by providing '-b, --background' in dhcpcd_enp2s0= (which from the man page seems to be the opposite of '-w, --waitip'). Roy will be along shortly ;)

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum