mount,cmount: adapt to sdnotify API change
This commit is contained in:
parent
ff8de59d2b
commit
77806494c8
2 changed files with 4 additions and 4 deletions
|
@ -213,7 +213,7 @@ func Mount(f fs.Fs, mountpoint string) error {
|
||||||
sigHup := make(chan os.Signal, 1)
|
sigHup := make(chan os.Signal, 1)
|
||||||
signal.Notify(sigHup, syscall.SIGHUP)
|
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")
|
return errors.Wrap(err, "failed to notify systemd")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ waitloop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = sdnotify.SdNotifyStopping()
|
_ = sdnotify.Stopping()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to umount FUSE fs")
|
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)
|
signal.Notify(sigHup, syscall.SIGHUP)
|
||||||
atexit.IgnoreSignals()
|
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")
|
return errors.Wrap(err, "failed to notify systemd")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ waitloop:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = sdnotify.SdNotifyStopping()
|
_ = sdnotify.Stopping()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "failed to umount FUSE fs")
|
return errors.Wrap(err, "failed to umount FUSE fs")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue