Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

mount,cmount: adapt to sdnotify API change

Nick Craig-Wood77806494c81f
diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go
index 8bfd13c28..9aa0b0a71 100644
--- a/cmd/cmount/mount.go
+++ b/cmd/cmount/mount.go
@@ -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")
}
diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go
index bbde3076e..9240c66d2 100644
--- a/cmd/mount/mount.go
+++ b/cmd/mount/mount.go
@@ -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")
}