LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2020, 10:53 AM   #1
thomasbb
Member
 
Registered: Mar 2019
Location: Nice
Distribution: Xubuntu
Posts: 123

Rep: Reputation: Disabled
[systemctl enable] how to modify the waiting time at startup


Some time ago, I enabled a dhcpcd service to have Internet access through my mobile by USB:
Code:
sudo enable dhcpcd@enp0s26f7u2.service
But now, I plan to use an ethernet link, without disabling the service. The problem is that at startup, "a start job is running"... Is there a way to reduce the waiting time from 1'30" to say 10"?

When I type systemctl cat dhcpcd @ enp0s26f7u2.service, I get:
Code:
$ systemctl cat dhcpcd@enp0s26f7u2.service
# /usr/lib/systemd/system/dhcpcd@.service
[Unit]
Description=dhcpcd on %I
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=forking
PIDFile=/run/dhcpcd/%I.pid
ExecStart=/usr/bin/dhcpcd -q -w %I
ExecStop=/usr/bin/dhcpcd -x %I

[Install]
WantedBy=multi-user.target
is there a way to add a timer there?
 
Old 12-27-2020, 03:18 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by thomasbb View Post
Some time ago, I enabled a dhcpcd service to have Internet access through my mobile by USB:
But now, I plan to use an ethernet link, without disabling the service. The problem is that at startup, "a start job is running"... Is there a way to reduce the waiting time from 1'30" to say 10"?
Yes.
A 1 minute search got this result: https://unix.stackexchange.com/quest...-timeout-value
I hope it helps.
I must say I don't find this very elegant though; you should probably use some network managing tool, they exist in various colors, graphical or not. Some of them pretty close to systemd itself. Maybe netctl can do the job.
 
1 members found this post helpful.
Old 12-28-2020, 06:55 AM   #3
thomasbb
Member
 
Registered: Mar 2019
Location: Nice
Distribution: Xubuntu
Posts: 123

Original Poster
Rep: Reputation: Disabled
Sorry for not being too aware of the terminology... Apparently it calls drop-in files, here is what I did:

Code:
$ sudo systemctl edit dhcpcd@.service
and then the file has:
Code:
[Service]
ExecStart=/usr/bin/dhcpcd -q -w -t 10 %I
At next startup, I'll let you know how it went. Editing systemd "override" configuration files don't seem too dirty though?

Edit: the startup is much faster now... To the point I'm wondering if the service is waiting at all

Last edited by thomasbb; 12-28-2020 at 09:58 AM. Reason: add info
 
Old 12-28-2020, 12:32 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by thomasbb View Post
Editing systemd "override" configuration files don't seem too dirty though?
Better to do it "the systemd way".

SOLVED?
 
1 members found this post helpful.
Old 12-28-2020, 04:11 PM   #5
thomasbb
Member
 
Registered: Mar 2019
Location: Nice
Distribution: Xubuntu
Posts: 123

Original Poster
Rep: Reputation: Disabled
Solved, thanks again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restart systemctl*daemon​ - systemctl command not found cjosephl Linux - Newbie 7 11-11-2017 04:53 PM
unable to START MySQL server at BOOT "systemctl enable mysqld.service" does not work cyberdome Linux - Newbie 2 03-11-2014 02:35 AM
[SOLVED] systemctl enable mysqld.service, command not working. cyberdome Fedora 5 03-10-2014 12:36 PM
Hard Drive Problems: timeout waiting for DMA; error waiting for DMA mintee Linux - Hardware 10 09-21-2007 05:06 AM
My browser, all day today: 'waiting for linuxquestions.org...' ..waiting.. waiting .. GrapefruiTgirl LQ Suggestions & Feedback 18 05-25-2007 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration