hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

--hostname only works if --userdata already contains a hostname section #159

Open tommack opened 4 years ago

tommack commented 4 years ago

At the very least a warning would be helpful if --hostname is used but there is nothing to replace.

rafaeleyng commented 4 years ago

Could you elaborate? I had what seems to be the exact opposite problem. I've tried to set the hostname via --userdata to no avail. But --hostname worked just fine.

killerwhile commented 3 years ago

A bit more details: in image such as ubuntu 20.04, which doesn't include user-data file by default, if no user-data file is provided or the one provided doesn't include a hostname: xxx section, the parameter --hostname doesn't do anything. flash is testing the presence of user-data file and replace an existing hostname: xxx directive to what is provided.