Skip to contentSkip to conversation

Modern 2.6 kernels - Notification for changing hostname from proc/sys/kernel/hostname ?

DISCUSSION Shawn Starr 3 participants 4 messages May 19, 2008 – May 21, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

I was looking at utsname_sysctl.c (if this is the right place) and noticed there doesn't seem to be any notification via the connector bus to tell userspace the hostname has changed? Is this correct?

if so, would not not make sense to add such event triggers so that things like KDE would not have to poll to determine if the hostname changes and instead had D-BUS tell userspace the hostname changed?

Perhaps this could be applied to other values (where applicable) in /proc/sys/kernel?

Or is this all going to go into sysfs eventually (where some of this really might belong)

Thoughts?

Thanks,
Shawn.

#1 lore raw
Quoted 3 lines · Shawn Starr

I was looking at utsname_sysctl.c (if this is the right place) and noticed there doesn't seem to be any notification via the connector bus to tell userspace the hostname has changed? Is this correct?

Yes. No notifications.

Quoted 3 lines

if so, would not not make sense to add such event triggers so that things like KDE would not have to poll to determine if the hostname changes and instead had D-BUS tell userspace the hostname changed?

Why does it want to know if and when hostname changes?

Quoted 2 lines

Perhaps this could be applied to other values (where applicable) in /proc/sys/kernel?

Probably, what other stuff desktop crowd wants?

Quoted 2 lines

Or is this all going to go into sysfs eventually (where some of this really might belong)

Hopefully, not. There is already uname(2), sysctls -- proc and binary,

#2 lore raw
Quoted 5 lines · Alexey Dobriyan
Quoted 3 lines · Shawn Starr

I was looking at utsname_sysctl.c (if this is the right place) and noticed there doesn't seem to be any notification via the connector bus to tell userspace the hostname has changed? Is this correct?

Quoted 8 lines

Yes. No notifications.

Quoted 3 lines

if so, would not not make sense to add such event triggers so that things like KDE would not have to poll to determine if the hostname changes and instead had D-BUS tell userspace the hostname changed?

Why does it want to know if and when hostname changes?

Well, It's for keeping track of the X session, if the hostname changes things go bad.

Quoted 4 lines
Quoted 2 lines

Perhaps this could be applied to other values (where applicable) in /proc/sys/kernel?

Probably, what other stuff desktop crowd wants?

No idea on the other values, but maybe others can jump in on this discussion?

Quoted 5 lines
Quoted 3 lines

Or is this all going to go into sysfs eventually (where some of this really might belong)

Hopefully, not. There is already uname(2), sysctls -- proc and binary,

Hopefully this can all be cleaned up, we really should have one unified place for kernel tweaking/settings either /proc or /sys.

#3 lore raw
Quoted 5 lines · Shawn Starr
Quoted 3 lines

Why does it want to know if and when hostname changes?

Well, It's for keeping track of the X session, if the hostname changes things go bad.

Then these should be resolved. Sometimes, even setting just the time with ntpdate makes X go blank for a few seconds, or even exit.