sethostname doesn't make permanet the hostname

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

sethostname doesn't make permanet the hostname

1,348件の閲覧回数
Ratataplam
Contributor II

I use

 sethostname()

to write my custom hostname on embedded device and works because I don't get back any error and if I read the new hostname with 

gethostname()

 the name is cotrrect, but after hw reboot my hostname go back to old value .

Why? And how can make permament the new value without update any configuration file (e.g. /etc/hostname )?

Thanks

0 件の賞賛
返信
0 返答(返信)