Hi Oleg, 2024/03/11, Oleg Pykhalov:
>> I'd like to add a shepherd requirement to an existing service, as >> provided by guix, to prevent it from starting before some other service >> starts. >> >> For exampple: I have NAS which is very slow to start after a power >> failure so I created a simple service to keep trying to mount an NFS >> share until it succeeds. This share contains files shared through >> syncthing, so I want syncthing to start after the NFS service is >> started. > > How do you mount the NFS share? From my understanding, system services > typically wait for all mounts listed in 'file-systems' to be mounted > unless 'mount?' is specifically set to false. I tried the file-systems declaration about a year ago but found it didn't work all the time when automatically booting after a power failure. There's also routers and stuff booting at the same time so the order of things may have been an issue. Anyway, a simple service trying to mount until it succeeds works pretty reliably. >> Is there any way to do this apart from defining my own >> syncthing-shepherd-service which includes the extra shepherd >> requirement? > > To my knowledge, unless the service definition explicitly allows for it, > there may not be an alternative approach aside from creating a custom > syncthing-shepherd service that incorporates the additional shepherd > requirement. I was afraid so. There may be other situations where I'd like some home grown service to startup before another pre-existing one, so maybe this should be a feature request, if others are also running into this.