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,And have rc.once do a 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.
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
Code:
chmod 644 $0
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