ecryptfsd is a resident program, i.e. daemon. According to systemd documentation, Type=oneshot/RemainAfterExit=yes should be used for programs that do not remain working after exit. But for daemons we should use Type=forked to indicate that the service remains running in background. ecryptfs provides option -f to run in foreground. This option is preferred when the service is started from init/systemd. That is why we use Type=simple (default) to indicate that the service runs in foreground. To manage the service properly systemd uses its type. E.g. if ecryptfsd silently dies, systemd will recognize its failure in case of simple or forked, but not in case of oneshot.
Best regards, Mikhail -----Original Message----- From: Khem Raj [mailto:[email protected]] Sent: Thursday, 20 June, 2013 13:32 To: Noor, Ahsan Cc: [email protected]; [email protected]; [email protected]; Mikhail Durnev Subject: Re: [yocto] [PATCH] ecryptfs-utils: Modify systemd service file to 'simple'. reasoning why it is being turned into simple service would be nice On Jun 19, 2013, at 3:53 AM, "Noor, Ahsan" <[email protected]> wrote: > From: Noor <[email protected]> > > Signed-off-by: Mikhail Durnev <[email protected]> > Signed-off-by: Noor Ahsan <[email protected]> > --- > .../ecryptfs-utils/ecryptfs-utils/ecryptfs.service | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git > a/recipes-support-ivi/ecryptfs-utils/ecryptfs-utils/ecryptfs.service > b/recipes-support-ivi/ecryptfs-utils/ecryptfs-utils/ecryptfs.service > index ba12aa3..52f3397 100644 > --- > a/recipes-support-ivi/ecryptfs-utils/ecryptfs-utils/ecryptfs.service > +++ b/recipes-support-ivi/ecryptfs-utils/ecryptfs-utils/ecryptfs.servi > +++ ce > @@ -3,9 +3,7 @@ Description=A userspace daemon that runs as the user > perform file operations und After=udev.service > > [Service] > -Type=oneshot > -ExecStart=/usr/bin/ecryptfsd > -RemainAfterExit=yes > +ExecStart=/usr/bin/ecryptfsd -f > > [Install] > WantedBy=multi-user.target > -- > 1.7.9.5 > > _______________________________________________ > yocto mailing list > [email protected] > https://lists.yoctoproject.org/listinfo/yocto _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
