This was my previous /etc/network/interfaces file:
# automatically generated by enigma 2
# do NOT change manually!
auto lo
iface lo inet loopback
iface ath0 inet dhcp
pre-up wpa_supplicant -iath0 -c/etc/wpa_supplicant.ath0.conf -B -dd -Dmadwifi || true
pre-down wpa_cli -iath0 terminate || true
auto eth0
iface eth0 inet dhcp
# EOF
When ifup -a is called by /etc/init.d/network while booting it reads /etc/network/interfaces and carries out
(run 'ifup -a -f -n' by hand to see this):
run-parts /etc/network/if-pre-up.d
ifconfig lo 127.0.0.1 up
run-parts /etc/network/if-up.d
run-parts /etc/network/if-pre-up.d
ifconfig eth0 up
udhcpc -R -b -p /var/run/udhcpc.eth0.pid -i eth0
run-parts /etc/network/if-up.d
With this setup the STB's hostname has is not been recognized by any of my routers.
I have added the hostname option for the corresponding interface in /etc/network/interfaces:
# automatically generated by enigma 2
# do NOT change manually!
auto lo
iface lo inet loopback
iface ath0 inet dhcp
pre-up wpa_supplicant -iath0 -c/etc/wpa_supplicant.ath0.conf -B -dd -Dmadwifi || true
pre-down wpa_cli -iath0 terminate || true
auto eth0
iface eth0 inet dhcp
hostname dm8000
# EOF
Now, ifup -a calls udhcpc with hostname option:
run-parts /etc/network/if-pre-up.d
ifconfig lo 127.0.0.1 up
run-parts /etc/network/if-up.d
run-parts /etc/network/if-pre-up.d
ifconfig eth0 up
udhcpc -R -b -p /var/run/udhcpc.eth0.pid -i eth0 -H dm8000
run-parts /etc/network/if-up.d
My router now sees a the STB's hostname and is able to respond dns client requests for hostname dm8000.
But, when I edit interfaces using enigmas network menu, the hostname option will be deleted again.
I propose two solutions:
1. enigma should take the content of /etc/hostname and add it in /etc/network/interfaces when
changes in the network menue are made
or
2. patch/configure busybox to run udhcpc with -h <hostname> by default.
Thank you.
Forcing udhcpc to report STB's hostname
Started by positron, 05 Mar 2012 16:48
network busybox dhcp dns
3 replies to this topic
Re: Forcing udhcpc to report STB's hostname #2
Posted 5 March 2012 - 17:57
Re: Forcing udhcpc to report STB's hostname #3
Posted 5 March 2012 - 18:19
1. enigma should take the content of /etc/hostname and add it in /etc/network/interfaces when
changes in the network menue are made
rather not, as that would mean duplicating data in several config files.
2. patch/configure busybox to run udhcpc with -h <hostname> by default.
Indeed, we don't even need to patch it, busybox allows to do this from the defconfig
Re: Forcing udhcpc to report STB's hostname #4
Posted 5 March 2012 - 22:50
Indeed, we don't even need to patch it, busybox allows to do this from the defconfig
Thank you for changing CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b -H `hostname`"
This keeps things simple and works for me.
For some cases with several NICs and networks it can be useful to have specific per-interface hostnames.
I guess both solutions do not exclude each other. The question is which hostname will be chosen by ifup and new defconfig
when hostnames are also present in the interfaces file.
If /etc/networking/interfaces has hostname records, they are supposed to override the default value from /etc/hostname.
In that case andyblac's patch should also be applied.
I will see when the altered busybox is on the feed.
RX: DM7000; DM8000; ET9000 - SW: OpenPli 8.3 - ANT: T90 9°/10°;13°;19°;28°Ost; MS 17/8
Also tagged with one or more of these keywords: network, busybox, dhcp, dns
OpenPli 9.0 freeze by network mount managerStarted by LVM, 19 Dec 2023 network, mount manager |
|
|||
Zgemma H7S repeated crashes paralyze the entire home networkStarted by alabama, 3 Apr 2020 H7S, Crash, Network |
|
|||
Openpli V6.1 Network problemStarted by leonlive, 22 Aug 2019 Network, mounting, mount and 1 more... |
|
|||
network
Netzwerkprobleme - Statische IP von Openpli ignoriertStarted by UnIoN, 31 May 2016 network, static ifconfig |
|
|||
Dns info lost after restart using fixed ip adresses on lanStarted by Statisfied user, 21 Feb 2016 DNS, restart |
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users