We have moved to a new Sailfish OS Forum. Please start new discussions there.
20

DHCP client seems to send "localhost" as hostname [released]

asked 2013-12-24 17:58:01 +0200

duesselschorsch gravatar image

updated 2014-04-13 11:00:02 +0200

ApB gravatar image

When asking for a DHCP lease my Jolla seems to send "localhost" as a hostname when asking for a lease. I'd prefer the bluetooth name for it, otherwise the Jolla is a bit difficult to reach when you have a name server that assigns these requested hostnames to addresses assigned by DHCP- I'm wondering what happens at a Jolla party with 30 localhosts ;)

edit retag flag offensive close delete

4 Answers

Sort by » oldest newest most voted
13

answered 2013-12-24 18:17:48 +0200

fivepointsquare gravatar image

updated 2013-12-25 16:33:37 +0200

I had a similar issue and fixed it with sysctl kernel.hostname=NAME and made it survive reboots by creating the file hostname.conf in /etc/sysctl.d/ with kernel.hostname = NAME in it.

Edit: I saw on the sailfish dev mailing list that creating /etc/hostname will also work. I haven't tried it myself though.

edit flag offensive delete publish link more

Comments

~~I think (but don't quote me on that) that you're also supposed to update /etc/hosts and add the corresponding hostname to the localhost/127.0.0.1 line~~ (apparently not). Also, I wonder if there are any parts of Sailfish expecting the hostname to be 'localhost', that might break if it's changed...

FireFly ( 2013-12-27 18:30:21 +0200 )edit

sysctl solution works for me, haven't encountered any issues sofar

tiemen ( 2013-12-28 02:40:45 +0200 )edit

yep. using "echo your-loved-hostname > /etc/hostname" (as root ofc.) works as well.

etam ( 2014-02-05 21:13:45 +0200 )edit

This works just as well:

cat > /etc/hostname

yourhostname

ctrl-c

Juuba ( 2014-05-08 13:35:05 +0200 )edit
9

answered 2013-12-28 14:27:11 +0200

llornkcor gravatar image

This will be fixed in future update. Thank you

edit flag offensive delete publish link more
4

answered 2014-04-13 10:17:36 +0200

duesselschorsch gravatar image

updated 2014-04-13 10:18:57 +0200

Seems to be fixed with version 1.0.5.16 Paarlampi, now the hostname is set to "Jolla". Much better than localhost (I would still prefer it to take the name set in the Bluetooth preferences, though)

edit flag offensive delete publish link more

Comments

My router is showing the hostname for ipv6 dhcp lease as "?". So I guess this isn't fixed for ipv6.

DeeGee ( 2015-05-09 04:01:55 +0200 )edit
2

answered 2013-12-28 01:40:15 +0200

pizzulicchio gravatar image

I can confirm that creating the file "hostname" into "/etc" folder you can assign a true hostname to the Jolla Phone instead of "localhost"

So : nano /etc/hostname Chose a name for your phone, save the changes, and reboot the phone! :-)

edit flag offensive delete publish link more

Comments

This works, even if I can't use nano, had to "cat > /etc/hostname"

Juuba ( 2014-01-21 21:59:48 +0200 )edit
2

Altrough it seems to something that needs to be added through an update instead of some commandline playing.

BonoNL ( 2014-01-22 12:22:02 +0200 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2013-12-24 17:58:01 +0200

Seen: 2,852 times

Last updated: Apr 13 '14