mirror of
https://github.com/rclone/rclone
synced 2025-01-13 17:06:24 +01:00
mount,cmount: adapt to sdnotify API change
This commit is contained in:
parent
ff8de59d2b
commit
77806494c8
@ -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")
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user