Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rc.local depreciated #821

Closed
KenArck opened this issue May 4, 2023 · 20 comments
Closed

rc.local depreciated #821

KenArck opened this issue May 4, 2023 · 20 comments

Comments

@KenArck
Copy link

KenArck commented May 4, 2023

I notice that ethtool is being used to set eth0 to non auto negotiate and set speed to 100 Mbs.

This command does not work at boot as rc.local was depreciated

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

I see that it's being run on 3.23.4.0 - are you not seeing this?

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Nope. Have to manually run it after the node boots in order to actually set eth0. True on both 3.32.4.0 and the nightly builds

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

Could you add the line

touch /tmp/rc-local-ran

At the top of /etc/rc.local and then reboot. I did this and the file was created after rebooting.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Nope

Screenshot 2023-05-04 125817

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

This is a PowerBeam AC5 400 or do I misunderstand the node name? Could you send me the support data for this, preferably just after you rebooted the node - thanks.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Right, it's a Powerbeam AC5 400

file is attached (just downloaded it prior to posting)
supportdata-WA7ABU-PB400-AC-REV-202305041312.gz

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

I see this in your log file:

Thu May  4 12:27:33 2023 daemon.notice procd: /etc/rc.d/S95done: /etc/rc.local: line 4: itouch: not found

Which suggests /etc/rc.local was being run as expected.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

interesting. So the issue might that be rc.local is running BEFORE eth0 comes up?

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

I'm not sure why it would do anything on this hardware anyway as it should not have a matching board id to trigger the ethtool command.

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

Interestingly though, it looks like we might be able to remove this completely, as OpenWRT has fixed the driver issue which required this on some hardware.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

The problem is it is connected to a Cisco router than is a #$@#$*$# to work with and won't auto negotiate properly. Unfortunately, the node is in a difficult to reach site so we're kinda stuck with the Cisco router for now.

When we manually run ethtool, the router becomes happy and we assumed the rc.local call should do that for us (it is there by default, no?)

@KenArck
Copy link
Author

KenArck commented May 4, 2023

I just caught something

"itouch"????? Let me check I didn't fudge the entry in rc.local

Edit: Doesn't matter. Either way it does show rc.local did run

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

Yes ... but as you note, it doesnt have the desired effect on eth0. The networking has changed substantially in the recent release, and clearly this code is no longer doing what it once did. I suspect, for our purposes at least, it's no longer required as the driver has been fixed. Once I get some confirmation from people with the appropriate hardware, I'll remove this.

Which doesnt help your situation much. I'm not sure were best to put code which is guaranteed to run once the network configuration has been completed.

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

I notice in the logs that the node appears to have successfully negotiated 100Mb full duplex with your switch. No idea what your switch thinks of course.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Yes, switch not router. In any case, we have major route flopping through that node until we run ethtool after a reboot. Then it settles down

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

I should note that any changes you make to /etc/rc.local will not survive an upgrade.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Understand (that's been my experience up to this point!)

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

If you put your ethtool at the end of /etc/rc.d/S99local it should happen very later in the boot process.

@KenArck
Copy link
Author

KenArck commented May 4, 2023

Worth a try, thanks!

@aanon4
Copy link
Contributor

aanon4 commented May 4, 2023

Closing. /etc/rc.local is still executed and has not been deprecated. It appears to be executed earlier in the boot process than before.

@aanon4 aanon4 closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants