github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/cmds/core/hostname/hostname_plan9.go (about)

     1  // Copyright 2012-2017 the u-root Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build plan9
     6  
     7  package main
     8  
     9  import "io/ioutil"
    10  
    11  func Sethostname(n string) error {
    12  	return ioutil.WriteFile("#c/sysname", []byte(n), 0644)
    13  }