DietPi-Automation | Static IP not being applied prior to dietpi-update #660

Closed
yunussandikci opened this Issue Dec 23, 2016 · 6 comments

Projects

None yet

2 participants

@yunussandikci
yunussandikci commented Dec 23, 2016 edited

Hello, Firstly thank you for the this best operation system for raspberry pi 3.
The problem is about static ip. When you write v136(latest downloadable) image and make changes in dietpi.txt (wifi=1 static ip = 192.168.1.100.. bla bla) the raspberry pi 3 doesnt take the static ip on "FIRST" boot, its just getting an ip from dhcp. And then when you find this ip from you router and connect it via ssh its directs you to dietpi-update and make you device version to v140 and then it restarting itself. And your raspberry takes the static ip adress that you writed at dietpi.txt. Sorry For My Bad English.
Summary)
1)Write İmage and change dietpi.txt for static ip
2)RPi3 get random ip from router
3)RPi3 makes update and restart
4)RPi3 gets static ip you writed in dietpi.txt
Note : Im Using Only Wi-Fi

@Fourdee Fourdee added this to the v141 milestone Dec 26, 2016
@Fourdee
Owner
Fourdee commented Dec 26, 2016

@yunussandikci

Thanks for the report, i'll take a look

@Fourdee Fourdee changed the title from Static IP Bug to DietPi-Automation | Static IP not being applied prior to dietpi-update Dec 26, 2016
@Fourdee Fourdee added the bug label Dec 27, 2016
@Fourdee
Owner
Fourdee commented Dec 27, 2016 edited

Looks like dhclient is still active after we apply 1st run network changes, overriding static IP. Even though we do kill the process before bringing back up networking:
image

Believe its either

  • ifdown
  • systemctl stop networking.service
    that is somehow restarting dhclient. Killing dhclient just before network restart did the trick.
@Fourdee Fourdee added a commit that referenced this issue Dec 27, 2016
@Fourdee v141
+ fix static IPs not being applied during 1st run dietpi-update stage:
#660
da62fe9
@Fourdee
Owner
Fourdee commented Dec 27, 2016 edited

Tested changes, works fine.

@yunussandikci

Any chance you would be willing to also test and confirm working?

@Fourdee Fourdee added a commit that referenced this issue Dec 27, 2016
@Fourdee v141 ebe95b5
@yunussandikci

I made it, and it works well now. Thanks :)

@Fourdee
Owner
Fourdee commented Dec 30, 2016 edited

@yunussandikci
Excellent 👍

This will only take effect on DietPi v140 images or higher, as the boot script does not update until after dietpi-update. Until then, if you do any reinstalls, make sure to copy the updated boot file, before booting system.

Task:

  • Update RPi image to v140
@Fourdee Fourdee referenced this issue Dec 31, 2016
Merged

v141 #682

@Fourdee
Owner
Fourdee commented Dec 31, 2016

I'll mark this as closed. Created a ticket to update the RPi image, so this fix takes effect on new installs: #676

@Fourdee Fourdee closed this Dec 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment