﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
8	coreutils: hostid does not support setting host id	Yuri Dario		"From http://svn.netlabs.org/rpm/ticket/14, OS/2 hostid.exe support setting the current host id, while coreutils hostid can only report current value.

This code should work:
{{{
#include <sys/param.h>
#include <sys/sysctl.h>

#if __STDC__
long
sethostid(long hostid)
#else
long
sethostid(hostid)
	long hostid;
#endif
{
	int mib[2];

	mib[0] = CTL_KERN;
	mib[1] = KERN_HOSTID;
	if (sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid) == -1)
		return (-1);
	return (0);
}
}}}
"	defect	closed	major		coreutils		highest	fixed		fbakan
