@@ -246,7 +246,7 @@ func CurrentUnitName() (unit string, err error) {
246
246
}
247
247
248
248
// IsRunningSystemd checks whether the host was booted with systemd as its init
249
- // system. This functions similar to systemd's `sd_booted(3)`: internally, it
249
+ // system. This functions similarly to systemd's `sd_booted(3)`: internally, it
250
250
// checks whether /run/systemd/system/ exists and is a directory.
251
251
// http://www.freedesktop.org/software/systemd/man/sd_booted.html
252
252
func IsRunningSystemd () bool {
@@ -257,10 +257,10 @@ func IsRunningSystemd() bool {
257
257
return fi .IsDir ()
258
258
}
259
259
260
- // GetMachineID returns a host's 128-bit machine ID as a string. There is a systemd
261
- // library function, sd_id128_get_machine, which can be used to obtain the
262
- // machine ID. However, this function simply reads the string from /etc/machine-id.
263
- // To simplify things, we'll just read it directly from the file, too.
260
+ // GetMachineID returns a host's 128-bit machine ID as a string. This functions
261
+ // similarly to systemd's ` sd_id128_get_machine`: internally, it simply reads
262
+ // the contents of /etc/machine-id
263
+ // http://www.freedesktop.org/software/systemd/man/sd_id128_get_machine.html
264
264
func GetMachineID () (string , error ) {
265
265
machineID , err := ioutil .ReadFile ("/etc/machine-id" )
266
266
if err != nil {
0 commit comments