Skip to content

Commit 98dbf5d

Browse files
authored
Unlike /etc/hostname, this should always be present (#92)
Should fix: #84 I had thought `/etc/hostname` was universal - it is not, notably on some `GCP` instances. `/proc/sys/kernel/hostname` should be, however.
1 parent 79337ca commit 98dbf5d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/preinstall_cmd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub async fn do_preinstall(
125125
let mut all_groups_result = Passed;
126126

127127
let hostname = host_executor
128-
.spawn_in_host_ns(async { std::fs::read_to_string("/etc/hostname").unwrap() })
128+
.spawn_in_host_ns(async { std::fs::read_to_string("/proc/sys/kernel/hostname").unwrap() })
129129
.await?;
130130

131131
let base_dir = if let Some(dir) = report_dir {

0 commit comments

Comments
 (0)