So I made this simple script startnet.sh that i put in /usr/bin and run it during boot:
Code: Select all
#! /bin/sh
sleep 1
netcfg cultofthedeadcow_00147FD90B57
exit 0
As you can see it simply waits one second and starts the netcfg profile cultofthedeadcow_00147FD90B57.
Now this works fine or it does not because the lease from the router can be a challenge. very often it fails because it cannot lease from the router.
setting sleep to 15 seconds does not help either in those cases.
So what I do is repetedly run startnet.sh until it finally comes up.
That is not good at all and I have read about people having problems with dhcpd so I decided to fix it berserk style by dictating a fixed IP to the box like this:
Code: Select all
#! /bin/sh
sleep 1
ifconfig wlan0 10.0.0.8 up
netcfg cultofthedeadcow_00147FD90B57
exit 0
And that seems to have fixed the problem But all the fancy gurus over at Arch always say that ifconfig is depreciated and that everyone must use ip like ip addr.
Now that is mostly a display of arrogance because I think it is a lie that ifconfig is depriciated, but in any case ip is supposed to be better.
And I do not want to be out of fashion so I need to know how
Code: Select all
ifconfig wlan0 10.0.0.8 up
I get that ifconfig wlan0 up = ip link set wlan0 up
But the big point in my case is to dictate the ip adress (10.0.0.8) in the same prosess and here the commands differ
ifconfig wlan0 10.0.0.8 up works and ip link set wlan0 10.0.0.8 up does not.
So there it is - how is this done with ip?