Commit graph

5 commits

Author SHA1 Message Date
György Teubel
e9cf735ff4 main/busybox: udhcpc script improvements
* Export $RESOLV_CONF to make it available to hook scripts
* Quote directory variables
* Use direct variable names in arithmetic expressions
2025-04-08 16:25:45 +00:00
Christian Kohlschütter
aea2aa6973 main/busybox: Fix resolv.conf update in udhcpc default.script
udhcpc updates /etc/resolv.conf by default (unless disabled by setting
"RESOLV_CONF=no" in /etc/udhcpc/udhcpc.conf).

The update is performed in the default script by writing to a temporary
resolv.conf file, which is then moved to /etc/resolv.conf via "mv". That
"mv" operation may become interactive, prompting "mv: overwrite
'/etc/resolv.conf'?", for example when /etc/resolv.conf is marked
immutable (chattr +i)

Since udhcpc is usually called during unattended boot, this may block
the device.

Change "mv" to "mv -f", which will not block (but may still fail to
update the file when /etc/resolv.conf is immutable).

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
2022-10-04 02:21:01 +00:00
Andreas Pachler
a3e77d0ed7 main/busybox: add support for RFC3442 classless static routes on udhcp 2021-01-06 11:21:18 +00:00
Natanael Copa
40d5521924 main/busybox: fix udhcpc script with multiple interfaces
Do not overwrite resolv.conf if there are no dns servers from dhcp. This
fixes issue with alpine as virtualbox guest with one nat (dhcp)
interface and one host-only (dhcp) interface.

ref 
2020-06-16 11:00:15 +00:00
Natanael Copa
d8d56f3702 main/busybox-initscripts: move default.script to main/busybox
fixes 
2019-12-16 15:16:46 +00:00
Renamed from main/busybox-initscripts/default.script (Browse further)