Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4803

Raspberry Pi OS • Re: Static IP with Bookworm

$
0
0
Thanks. I've never messed with rc.local before. I'll give it a try.

I think I'll play with rc.local first, then figure out what to put in it to set static IP address.

It seems to me just from a quick glance online, and your example, that what I'll do is add these lines to rc.local,

Code:

if [ -x /usr/local/bin/rc.once ] ; then  /usr/local/bin/rc.oncefiif [ -x /usr/local/bin/rc.custom ] ; then  /usr/local/bin/rc.customfi
And have rc.once do a

Code:

chmod 644 $0
at the very top, so that it only runs once, but doesn't have to be recreated.

Then, my "clone" script can do a simple substitution on the ip address in the script, and I should be good to go.

That way, I won't run the risk of somehow leaving rc.local non-existent.

Statistics: Posted by bdixon — Wed Dec 18, 2024 3:50 pm



Viewing all articles
Browse latest Browse all 4803

Trending Articles