guysoft / FullPageOS

A raspberrypi distro to display a full page browser on boot
GNU General Public License v3.0
3.86k stars 237 forks source link

set hostname in /boot/hostname.txt or similar #334

Open ThomasCr opened 4 years ago

ThomasCr commented 4 years ago

It would be nice, to set the hostname automatically over simple file in /boot - it makes it easy to set up multiple devices.

ThomasCr commented 4 years ago

and yes i know how to manually set the name in /etc/hosts & /etc/hostname - but this requires to boot the sdcard or mount the image (needs linux host)

guysoft commented 4 years ago

There is an implantation of this on OctoPI here: https://github.com/guysoft/OctoPi/blob/devel/src/modules/octopi/start_chroot_script#L210

A PR is welcome, even a PR in to CustomPiOS in the base module: https://github.com/guysoft/CustomPiOS/tree/devel/src/modules/base

I am kinda busy for this now.