Greg Erskine wrote: 
> Hi Jeff,
> 
> I think if you go to Tweaks > Host name, type a new host name, then
> press save and then reboot. Everything should be OK.
> 
> We haven't changed this code since 2014-12-10 so I wouldn't expect a new
> problem, but you never know.
> 
> But... you are not going crazy.
> 
> piCorePlayer sets the hostname on reboot. So you will  see a different
> name in the host name field and what it actually is, until a reboot.
> 
> If you set host name to nothing, on the next reboot piCorePlayer will
> set your host name to the piCore default which is "box".
> 
> Also, the current code wraps quotes around the host name so it is
> possible to have "piCorePlayer" instead of piCorePlayer initially.
> 
> If you like playing around, there are 3 files that come into play, well
> actually more, but a simple task is already too complicated.
> 
> sethostname
> /etc/hosts
> /etc/hostname
> 
> If you run sethostname with no parameters it will set you hostname to
> box.
> 
> I think /etc/hosts explains you dns issue.
> 
> Also, in ssh your Linux prompt has your current hostname in it. Play
> with hostname or sethostname and watch it change dynamically, but
> remember it will change back to the piCorePlayer setting on reboot.
> 
> Following poing post here:
> 
> http://forums.slimdevices.com/showthread.php?97803-piCorePlayer-Squeezelite-on-Microcore-linux-An-embedded-OS-in-RAM-with-Squeezelit&p=828695&viewfull=1#post828695
> 
> Steen has changed the code to dynamically set the hostname, rather than
> waiting for a reboot and changed the handling of the quotes.
> 
> So, thanks for reporting your finding, hopefully the next version of the
> code will eliminate the potential for confusion.
> 
> regards
> Greg

Hi Greg,
Thanks for the reply.

My problem was not quite the same as the post you mention, my /etc/hosts
and /etc/hostname were updated OK when changed in the tweaks section of
the webgui however its appears that udhcp does not pass the name back to
the dhcp/dns server.

Since my last post nothing has changed and contents of files on
picoplayer are :-

/etc/hosts
127.0.0.1 RPi2-1 localhost localhost.local
# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/hostname
RPi2-1

The tweaks/hostname section of the webgui was "RPi2-1"

from dnsmasq server :-
[root@linuxserver ~]# nslookup box
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   box.NOT_MY_REAL_DOMAIN.com
Address: 10.44.4.92

After this I changed the hostname to "testhost" with the webgui

/etc/hosts and /etc/hostname did not change (as expected)

performed a reboot and from dnsmasq server monitored dnsmasq:-



[root@linuxserver ~]# tail -f /var/log/dnsmasq | grep -C 10 "name: box"
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 available DHCP range:
10.44.4.4 -- 10.44.4.252
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 vendor class: udhcp
1.23.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 client provides name:
box
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 DHCPDISCOVER(eno16780032)
b8:27:eb:88:80:a9
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 tags: eno16780032
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 DHCPOFFER(eno16780032)
10.44.4.92 b8:27:eb:88:80:a9
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 requested options:
1:netmask, 3:router, 6:dns-server, 12:hostname,
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 requested options:
15:domain-name, 28:broadcast, 42:ntp-server
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 next server: 10.44.4.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  1 option: 53
message-type  2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 54
server-identifier  10.44.4.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 51
lease-time  7d
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 58
T1  3d12h
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 59
T2  6d3h
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 28
broadcast  10.44.4.255
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size: 15 option: 15
domain-name  NOT_MY_REAL_DOMAIN.com
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 42
ntp-server  10.44.4.254
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option:  6
dns-server  10.44.4.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option:  3
router  10.44.4.254
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option:  1
netmask  255.255.255.0
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 available DHCP range:
10.44.4.4 -- 10.44.4.252
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 vendor class: udhcp
1.23.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 client provides name:
box
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 DHCPREQUEST(eno16780032)
10.44.4.92 b8:27:eb:88:80:a9
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 tags: eno16780032
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 DHCPACK(eno16780032)
10.44.4.92 b8:27:eb:88:80:a9 box
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 requested options:
1:netmask, 3:router, 6:dns-server, 12:hostname,
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 requested options:
15:domain-name, 28:broadcast, 42:ntp-server
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 next server: 10.44.4.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  1 option: 53
message-type  5
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 54
server-identifier  10.44.4.2
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 51
lease-time  7d
Sep  2 23:13:03 dnsmasq-dhcp[28092]: 286084956 sent size:  4 option: 58
T1  3d12h


from the dns server:-
root@linuxserver ~]# nslookup box
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   box.NOT_MY_REAL_DOMAIN.com
Address: 10.44.4.92

[root@linuxserver ~]# nslookup 10.44.4.92
Server:         127.0.0.1
Address:        127.0.0.1#53

92.4.44.10.in-addr.arpa name = box.NOT_MY_REAL_DOMAIN.

checked /etc/hosts and /etc/hostname both show "testhost" is the
hostname !

Performed a second reboot, no change

hope that all makes sense !
Jeff



*Players:* SliMP3, Squeezebox Classic x 3, SqueezePlayer (Galaxy
TAB(Android)), PiCorePlayer on RPi 2 with Hifiberry DAC+ x 2
*Server:* Logitech Media Server Version: 7.9.0 - 1440747495 on Centos 7
VM
*Plugins:* AutoRescan / BBCiPlayer / PlayHLS / PowerSave (Excellent !) /
PowerSwitchIII
*Remotes:* iPhone5 running iPeng8 / GalaxyTab 7 running Orangesqueeze /
PC
*Music:* 383GB, 1269 albums with 17756 songs by 4381 artists all FLACs /
Last FM / Soundcloud
------------------------------------------------------------------------
Jeff07971's Profile: http://forums.slimdevices.com/member.php?userid=49290
View this thread: http://forums.slimdevices.com/showthread.php?t=97803

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to