mount,cmount: adapt to sdnotify API change

s3-about
Nick Craig-Wood 2018-08-18 14:27:43 +01:00
parent ff8de59d2b
commit 77806494c8
2 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ func Mount(f fs.Fs, mountpoint string) error {
sigHup := make(chan os.Signal, 1)
signal.Notify(sigHup, syscall.SIGHUP)
if err := sdnotify.SdNotifyReady(); err != nil && err != sdnotify.SdNotifyNoSocket {
if err := sdnotify.Ready(); err != nil && err != sdnotify.ErrSdNotifyNoSocket {
return errors.Wrap(err, "failed to notify systemd")
}
@ -234,7 +234,7 @@ waitloop:
}
}
_ = sdnotify.SdNotifyStopping()
_ = sdnotify.Stopping()
if err != nil {
return errors.Wrap(err, "failed to umount FUSE fs")
}

View File

@ -140,7 +140,7 @@ func Mount(f fs.Fs, mountpoint string) error {
signal.Notify(sigHup, syscall.SIGHUP)
atexit.IgnoreSignals()
if err := sdnotify.SdNotifyReady(); err != nil && err != sdnotify.SdNotifyNoSocket {
if err := sdnotify.Ready(); err != nil && err != sdnotify.ErrSdNotifyNoSocket {
return errors.Wrap(err, "failed to notify systemd")
}
@ -165,7 +165,7 @@ waitloop:
}
}
_ = sdnotify.SdNotifyStopping()
_ = sdnotify.Stopping()
if err != nil {
return errors.Wrap(err, "failed to umount FUSE fs")
}